Bug Summary

File:var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h
Warning:line 1213, column 5
Dereference of null pointer (loaded from field 'stack')

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 TestExampleGenBinding.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++ ../TestExampleGenBinding.cpp

../TestExampleGenBinding.cpp

1/* THIS FILE IS AUTOGENERATED FROM TestExampleGen.webidl BY Codegen.py - DO NOT EDIT */
2
3#include <type_traits>
4#include "CustomEventBinding.h"
5#include "EventBinding.h"
6#include "EventHandlerBinding.h"
7#include "MainThreadUtils.h"
8#include "TestBindingHeader.h"
9#include "TestCodeGenBinding.h"
10#include "TestDictionaryBinding.h"
11#include "TestExampleGenBinding.h"
12#include "TestExampleInterface-example.h"
13#include "TestExampleProxyInterface-example.h"
14#include "TestExampleThrowingConstructorInterface-example.h"
15#include "TestExampleWorkerInterface-example.h"
16#include "WrapperFactory.h"
17#include "XrayWrapper.h"
18#include "js/Array.h"
19#include "js/CallAndConstruct.h"
20#include "js/Exception.h"
21#include "js/ForOfIterator.h"
22#include "js/MapAndSet.h"
23#include "js/Object.h"
24#include "js/PropertyAndElement.h"
25#include "js/PropertyDescriptor.h"
26#include "js/experimental/JitInfo.h"
27#include "js/shadow/Object.h"
28#include "jsfriendapi.h"
29#include "mozilla/Atomics.h"
30#include "mozilla/BasePrincipal.h"
31#include "mozilla/FloatingPoint.h"
32#include "mozilla/OriginTrials.h"
33#include "mozilla/OwningNonNull.h"
34#include "mozilla/ProfilerLabels.h"
35#include "mozilla/dom/BindingCallContext.h"
36#include "mozilla/dom/BindingUtils.h"
37#include "mozilla/dom/CanvasGradient.h"
38#include "mozilla/dom/CanvasPattern.h"
39#include "mozilla/dom/CustomElementRegistry.h"
40#include "mozilla/dom/DOMJSClass.h"
41#include "mozilla/dom/DOMJSProxyHandler.h"
42#include "mozilla/dom/DocGroup.h"
43#include "mozilla/dom/Document.h"
44#include "mozilla/dom/Element.h"
45#include "mozilla/dom/ImageData.h"
46#include "mozilla/dom/NonRefcountedDOMObject.h"
47#include "mozilla/dom/Nullable.h"
48#include "mozilla/dom/ObservableArrayProxyHandler.h"
49#include "mozilla/dom/PrimitiveConversions.h"
50#include "mozilla/dom/Promise.h"
51#include "mozilla/dom/ProxyHandlerUtils.h"
52#include "mozilla/dom/Record.h"
53#include "mozilla/dom/RootedDictionary.h"
54#include "mozilla/dom/ToJSValue.h"
55#include "mozilla/dom/TypedArray.h"
56#include "mozilla/dom/UnionTypes.h"
57#include "mozilla/dom/WebIDLPrefs.h"
58#include "mozilla/dom/XrayExpandoClass.h"
59#include "nsContentUtils.h"
60#include "nsIContent.h"
61#include "nsJSPrincipals.h"
62#include "nsJSUtils.h"
63
64namespace mozilla::dom {
65
66namespace binding_detail {}; // Just to make sure it's known as a namespace
67using namespace mozilla::dom::binding_detail;
68
69
70namespace TestExampleInterface_Binding {
71
72static bool
73_Example(JSContext* cx_, unsigned argc, JS::Value* vp)
74{
75 BindingCallContext cx(cx_, "Example constructor");
76 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject78( cx, "Example", "constructor"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
77 "Example", "constructor", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject78( cx, "Example", "constructor"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
78 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject78( cx, "Example", "constructor"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
79
80 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
81 JS::Rooted<JSObject*> obj(cx, &args.callee());
82 if (!args.isConstructing()) {
83 return ThrowConstructorWithoutNew(cx, "Example");
84 }
85
86 JS::Rooted<JSObject*> desiredProto(cx);
87 if (!GetDesiredProto(cx, args,
88 prototypes::id::TestExampleInterface,
89 CreateInterfaceObjects,
90 &desiredProto)) {
91 return false;
92 }
93
94 unsigned argcount = std::min(args.length(), 1u);
95 switch (argcount) {
96 case 0: {
97 GlobalObject global(cx, obj);
98 if (global.Failed()) {
99 return false;
100 }
101
102 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
103 Maybe<JSAutoRealm> ar;
104 if (objIsXray) {
105 // Since our object is an Xray, we can just CheckedUnwrapStatic:
106 // we know Xrays have no dynamic unwrap behavior.
107 obj = js::CheckedUnwrapStatic(obj);
108 if (!obj) {
109 return false;
110 }
111 ar.emplace(cx, obj);
112 if (!JS_WrapObject(cx, &desiredProto)) {
113 return false;
114 }
115 }
116 FastErrorResult rv;
117 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Example(global, rv)));
118 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "Example constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "Example constructor"
)), 0))
) {
119 return false;
120 }
121 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 121); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 121; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
122 static_assert(!std::is_pointer_v<decltype(result)>,
123 "NewObject implies that we need to keep the object alive with a strong reference.");
124 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
125 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 125); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 125; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
126 return false;
127 }
128 return true;
129 break;
130 }
131 case 1: {
132 GlobalObject global(cx, obj);
133 if (global.Failed()) {
134 return false;
135 }
136
137 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
138 binding_detail::FakeString<char16_t> arg0;
139 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
140 return false;
141 }
142 Maybe<JSAutoRealm> ar;
143 if (objIsXray) {
144 // Since our object is an Xray, we can just CheckedUnwrapStatic:
145 // we know Xrays have no dynamic unwrap behavior.
146 obj = js::CheckedUnwrapStatic(obj);
147 if (!obj) {
148 return false;
149 }
150 ar.emplace(cx, obj);
151 if (!JS_WrapObject(cx, &desiredProto)) {
152 return false;
153 }
154 }
155 FastErrorResult rv;
156 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Example(global, NonNullHelper(Constify(arg0)), rv)));
157 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "Example constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "Example constructor"
)), 0))
) {
158 return false;
159 }
160 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 160); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 160; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
161 static_assert(!std::is_pointer_v<decltype(result)>,
162 "NewObject implies that we need to keep the object alive with a strong reference.");
163 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
164 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 164); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 164; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
165 return false;
166 }
167 return true;
168 break;
169 }
170 default: {
171 // Using nsPrintfCString here would require including that
172 // header. Let's not worry about it.
173 nsAutoCString argCountStr;
174 argCountStr.AppendPrintf("%u", args.length());
175 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
176 }
177 }
178 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 178); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 178; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
179 return false;
180}
181
182static bool
183_Example2(JSContext* cx_, unsigned argc, JS::Value* vp)
184{
185 BindingCallContext cx(cx_, "Example2 constructor");
186 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject188( cx, "Example2", "constructor"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
187 "Example2", "constructor", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject188( cx, "Example2", "constructor"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
188 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject188( cx, "Example2", "constructor"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
189
190 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
191 JS::Rooted<JSObject*> obj(cx, &args.callee());
192 if (!args.isConstructing()) {
193 return ThrowConstructorWithoutNew(cx, "Example2");
194 }
195
196 JS::Rooted<JSObject*> desiredProto(cx);
197 if (!GetDesiredProto(cx, args,
198 prototypes::id::TestExampleInterface,
199 CreateInterfaceObjects,
200 &desiredProto)) {
201 return false;
202 }
203
204 unsigned argcount = std::min(args.length(), 8u);
205 switch (argcount) {
206 case 1: {
207 GlobalObject global(cx, obj);
208 if (global.Failed()) {
209 return false;
210 }
211
212 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
213 LongOrStringAnyRecord arg0;
214 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
215 return false;
216 }
217 Maybe<JSAutoRealm> ar;
218 if (objIsXray) {
219 // Since our object is an Xray, we can just CheckedUnwrapStatic:
220 // we know Xrays have no dynamic unwrap behavior.
221 obj = js::CheckedUnwrapStatic(obj);
222 if (!obj) {
223 return false;
224 }
225 ar.emplace(cx, obj);
226 if (!JS_WrapObject(cx, &desiredProto)) {
227 return false;
228 }
229 if (arg0.IsStringAnyRecord()) {
230 for (auto& mapEntry0 : arg0.GetAsStringAnyRecord().Entries()) {
231 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&mapEntry0.mValue))) {
232 return false;
233 }
234 }
235 }
236 }
237 FastErrorResult rv;
238 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Example2(global, Constify(arg0), rv)));
239 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "Example2 constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "Example2 constructor"
)), 0))
) {
240 return false;
241 }
242 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 242); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 242; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
243 static_assert(!std::is_pointer_v<decltype(result)>,
244 "NewObject implies that we need to keep the object alive with a strong reference.");
245 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
246 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 246); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 246; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
247 return false;
248 }
249 return true;
250 break;
251 }
252 case 5: {
253 [[fallthrough]];
254 }
255 case 6: {
256 [[fallthrough]];
257 }
258 case 7: {
259 [[fallthrough]];
260 }
261 case 8: {
262 GlobalObject global(cx, obj);
263 if (global.Failed()) {
264 return false;
265 }
266
267 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
268 RootedDictionary<binding_detail::FastDictForConstructor> arg0(cx);
269 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
270 return false;
271 }
272 JS::Rooted<JS::Value> arg1(cx);
273 arg1 = args[1];
274 JS::Rooted<JSObject*> arg2(cx);
275 if (args[2].isObject()) {
276 arg2 = &args[2].toObject();
277 } else {
278 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 3");
279 return false;
280 }
281 JS::Rooted<JSObject*> arg3(cx);
282 if (args[3].isObject()) {
283 arg3 = &args[3].toObject();
284 } else if (args[3].isNullOrUndefined()) {
285 arg3 = nullptr;
286 } else {
287 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 4");
288 return false;
289 }
290 binding_detail::AutoSequence<Dict> arg4;
291 SequenceRooter<Dict> arg4_holder(cx, &arg4);
292 if (args[4].isObject()) {
293 JS::ForOfIterator iter(cx);
294 if (!iter.init(args[4], JS::ForOfIterator::AllowNonIterable)) {
295 return false;
296 }
297 if (!iter.valueIsIterable()) {
298 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 5", "sequence");
299 return false;
300 }
301 binding_detail::AutoSequence<Dict> &arr = arg4;
302 JS::Rooted<JS::Value> temp(cx);
303 while (true) {
304 bool done;
305 if (!iter.next(&temp, &done)) {
306 return false;
307 }
308 if (done) {
309 break;
310 }
311 Dict* slotPtr = arr.AppendElement(mozilla::fallible);
312 if (!slotPtr) {
313 JS_ReportOutOfMemory(cx);
314 return false;
315 }
316 Dict& slot = *slotPtr;
317 if (!slot.Init(cx, temp, "Element of argument 5", false)) {
318 return false;
319 }
320 }
321 } else {
322 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 5", "sequence");
323 return false;
324 }
325 JS::Rooted<JS::Value> arg5(cx);
326 if (args.hasDefined(5)) {
327 arg5 = args[5];
328 } else {
329 arg5 = JS::UndefinedValue();
330 }
331 Optional<JS::Handle<JSObject*>> arg6;
332 if (args.hasDefined(6)) {
333 arg6.Construct(cx);
334 if (args[6].isObject()) {
335 arg6.Value() = &args[6].toObject();
336 } else {
337 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 7");
338 return false;
339 }
340 }
341 Optional<JS::Handle<JSObject*>> arg7;
342 if (args.hasDefined(7)) {
343 arg7.Construct(cx);
344 if (args[7].isObject()) {
345 arg7.Value() = &args[7].toObject();
346 } else if (args[7].isNullOrUndefined()) {
347 arg7.Value() = nullptr;
348 } else {
349 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 8");
350 return false;
351 }
352 }
353 Maybe<JSAutoRealm> ar;
354 if (objIsXray) {
355 // Since our object is an Xray, we can just CheckedUnwrapStatic:
356 // we know Xrays have no dynamic unwrap behavior.
357 obj = js::CheckedUnwrapStatic(obj);
358 if (!obj) {
359 return false;
360 }
361 ar.emplace(cx, obj);
362 if (!JS_WrapObject(cx, &desiredProto)) {
363 return false;
364 }
365 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mAny1))) {
366 return false;
367 }
368 if (arg0.mDict.WasPassed()) {
369 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mAnotherAny))) {
370 return false;
371 }
372 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mAnotherObj))) {
373 return false;
374 }
375 if (arg0.mDict.Value().mArrayBuffer.WasPassed()) {
376 if (!arg0.mDict.Value().mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
377 return false;
378 }
379 }
380 if (arg0.mDict.Value().mCustomEventInit.WasPassed()) {
381 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mCustomEventInit.Value().mDetail))) {
382 return false;
383 }
384 }
385 if (arg0.mDict.Value().mDictionaryTypedef.WasPassed()) {
386 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mDictionaryTypedef.Value().mDetail))) {
387 return false;
388 }
389 }
390 if (arg0.mDict.Value().mEventInitOrLong2.WasPassed()) {
391 if (arg0.mDict.Value().mEventInitOrLong2.Value().IsCustomEventInit()) {
392 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
393 return false;
394 }
395 }
396 }
397 if (arg0.mDict.Value().mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
398 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
399 return false;
400 }
401 }
402 if (arg0.mDict.Value().mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
403 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
404 return false;
405 }
406 }
407 if (!arg0.mDict.Value().mFloat64Array.IsNull()) {
408 if (!arg0.mDict.Value().mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
409 return false;
410 }
411 }
412 if (arg0.mDict.Value().mNullableArrayBuffer.WasPassed()) {
413 if (!arg0.mDict.Value().mNullableArrayBuffer.Value().IsNull()) {
414 if (!arg0.mDict.Value().mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
415 return false;
416 }
417 }
418 }
419 if (arg0.mDict.Value().mNullableEventInitOrLong2.WasPassed()) {
420 if (!arg0.mDict.Value().mNullableEventInitOrLong2.Value().IsNull()) {
421 if (arg0.mDict.Value().mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
422 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
423 return false;
424 }
425 }
426 }
427 }
428 if (!arg0.mDict.Value().mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
429 if (arg0.mDict.Value().mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
430 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
431 return false;
432 }
433 }
434 }
435 if (!arg0.mDict.Value().mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
436 if (arg0.mDict.Value().mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
437 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
438 return false;
439 }
440 }
441 }
442 if (arg0.mDict.Value().mNullableObjectSequenceOrLong.WasPassed()) {
443 if (!arg0.mDict.Value().mNullableObjectSequenceOrLong.Value().IsNull()) {
444 if (arg0.mDict.Value().mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
445 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict.Value().mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName0) {
446 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName0]))) {
447 return false;
448 }
449 }
450 }
451 }
452 }
453 if (!arg0.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
454 if (arg0.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
455 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName0) {
456 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName0]))) {
457 return false;
458 }
459 }
460 }
461 }
462 if (!arg0.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
463 if (arg0.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
464 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName0) {
465 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName0]))) {
466 return false;
467 }
468 }
469 }
470 }
471 if (arg0.mDict.Value().mObjectOrLong.WasPassed()) {
472 if (arg0.mDict.Value().mObjectOrLong.Value().IsObject()) {
473 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mObjectOrLong.Value().GetAsObject()))) {
474 return false;
475 }
476 }
477 }
478 if (arg0.mDict.Value().mObjectSequenceOrLong.WasPassed()) {
479 if (arg0.mDict.Value().mObjectSequenceOrLong.Value().IsObjectSequence()) {
480 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict.Value().mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName0) {
481 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName0]))) {
482 return false;
483 }
484 }
485 }
486 }
487 if (arg0.mDict.Value().mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
488 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict.Value().mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName0) {
489 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName0]))) {
490 return false;
491 }
492 }
493 }
494 if (arg0.mDict.Value().mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
495 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict.Value().mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName0) {
496 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName0]))) {
497 return false;
498 }
499 }
500 }
501 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mRequiredObject))) {
502 return false;
503 }
504 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mSomeAny))) {
505 return false;
506 }
507 if (arg0.mDict.Value().mSomeObj.WasPassed()) {
508 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict.Value().mSomeObj.Value()))) {
509 return false;
510 }
511 }
512 if (arg0.mDict.Value().mUint8Array.WasPassed()) {
513 if (!arg0.mDict.Value().mUint8Array.Value().WrapIntoNewCompartment(cx)) {
514 return false;
515 }
516 }
517 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict.Value().mParentAny))) {
518 return false;
519 }
520 }
521 if (arg0.mDict2.WasPassed()) {
522 if (arg0.mDict2.Value().mMemberDict.WasPassed()) {
523 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mAnotherAny))) {
524 return false;
525 }
526 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mAnotherObj))) {
527 return false;
528 }
529 if (arg0.mDict2.Value().mMemberDict.Value().mArrayBuffer.WasPassed()) {
530 if (!arg0.mDict2.Value().mMemberDict.Value().mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
531 return false;
532 }
533 }
534 if (arg0.mDict2.Value().mMemberDict.Value().mCustomEventInit.WasPassed()) {
535 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mCustomEventInit.Value().mDetail))) {
536 return false;
537 }
538 }
539 if (arg0.mDict2.Value().mMemberDict.Value().mDictionaryTypedef.WasPassed()) {
540 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mDictionaryTypedef.Value().mDetail))) {
541 return false;
542 }
543 }
544 if (arg0.mDict2.Value().mMemberDict.Value().mEventInitOrLong2.WasPassed()) {
545 if (arg0.mDict2.Value().mMemberDict.Value().mEventInitOrLong2.Value().IsCustomEventInit()) {
546 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
547 return false;
548 }
549 }
550 }
551 if (arg0.mDict2.Value().mMemberDict.Value().mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
552 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
553 return false;
554 }
555 }
556 if (arg0.mDict2.Value().mMemberDict.Value().mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
557 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
558 return false;
559 }
560 }
561 if (!arg0.mDict2.Value().mMemberDict.Value().mFloat64Array.IsNull()) {
562 if (!arg0.mDict2.Value().mMemberDict.Value().mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
563 return false;
564 }
565 }
566 if (arg0.mDict2.Value().mMemberDict.Value().mNullableArrayBuffer.WasPassed()) {
567 if (!arg0.mDict2.Value().mMemberDict.Value().mNullableArrayBuffer.Value().IsNull()) {
568 if (!arg0.mDict2.Value().mMemberDict.Value().mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
569 return false;
570 }
571 }
572 }
573 if (arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLong2.WasPassed()) {
574 if (!arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLong2.Value().IsNull()) {
575 if (arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
576 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
577 return false;
578 }
579 }
580 }
581 }
582 if (!arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
583 if (arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
584 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
585 return false;
586 }
587 }
588 }
589 if (!arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
590 if (arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
591 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
592 return false;
593 }
594 }
595 }
596 if (arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.WasPassed()) {
597 if (!arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.Value().IsNull()) {
598 if (arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
599 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName0) {
600 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName0]))) {
601 return false;
602 }
603 }
604 }
605 }
606 }
607 if (!arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
608 if (arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
609 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName0) {
610 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName0]))) {
611 return false;
612 }
613 }
614 }
615 }
616 if (!arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
617 if (arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
618 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName0) {
619 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName0]))) {
620 return false;
621 }
622 }
623 }
624 }
625 if (arg0.mDict2.Value().mMemberDict.Value().mObjectOrLong.WasPassed()) {
626 if (arg0.mDict2.Value().mMemberDict.Value().mObjectOrLong.Value().IsObject()) {
627 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mObjectOrLong.Value().GetAsObject()))) {
628 return false;
629 }
630 }
631 }
632 if (arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLong.WasPassed()) {
633 if (arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLong.Value().IsObjectSequence()) {
634 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName0) {
635 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName0]))) {
636 return false;
637 }
638 }
639 }
640 }
641 if (arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
642 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName0) {
643 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName0]))) {
644 return false;
645 }
646 }
647 }
648 if (arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
649 for (uint32_t indexName0 = 0; indexName0 < arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName0) {
650 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName0]))) {
651 return false;
652 }
653 }
654 }
655 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mRequiredObject))) {
656 return false;
657 }
658 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mSomeAny))) {
659 return false;
660 }
661 if (arg0.mDict2.Value().mMemberDict.Value().mSomeObj.WasPassed()) {
662 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mSomeObj.Value()))) {
663 return false;
664 }
665 }
666 if (arg0.mDict2.Value().mMemberDict.Value().mUint8Array.WasPassed()) {
667 if (!arg0.mDict2.Value().mMemberDict.Value().mUint8Array.Value().WrapIntoNewCompartment(cx)) {
668 return false;
669 }
670 }
671 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mDict2.Value().mMemberDict.Value().mParentAny))) {
672 return false;
673 }
674 }
675 }
676 if (arg0.mObj1.WasPassed()) {
677 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mObj1.Value()))) {
678 return false;
679 }
680 }
681 if (arg0.mObj2.WasPassed()) {
682 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mObj2.Value()))) {
683 return false;
684 }
685 }
686 if (arg0.mSeq1.WasPassed()) {
687 for (uint32_t indexName0 = 0; indexName0 < arg0.mSeq1.Value().Length(); ++indexName0) {
688 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mAnotherAny))) {
689 return false;
690 }
691 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mAnotherObj))) {
692 return false;
693 }
694 if (arg0.mSeq1.Value()[indexName0].mArrayBuffer.WasPassed()) {
695 if (!arg0.mSeq1.Value()[indexName0].mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
696 return false;
697 }
698 }
699 if (arg0.mSeq1.Value()[indexName0].mCustomEventInit.WasPassed()) {
700 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mCustomEventInit.Value().mDetail))) {
701 return false;
702 }
703 }
704 if (arg0.mSeq1.Value()[indexName0].mDictionaryTypedef.WasPassed()) {
705 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mDictionaryTypedef.Value().mDetail))) {
706 return false;
707 }
708 }
709 if (arg0.mSeq1.Value()[indexName0].mEventInitOrLong2.WasPassed()) {
710 if (arg0.mSeq1.Value()[indexName0].mEventInitOrLong2.Value().IsCustomEventInit()) {
711 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
712 return false;
713 }
714 }
715 }
716 if (arg0.mSeq1.Value()[indexName0].mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
717 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
718 return false;
719 }
720 }
721 if (arg0.mSeq1.Value()[indexName0].mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
722 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
723 return false;
724 }
725 }
726 if (!arg0.mSeq1.Value()[indexName0].mFloat64Array.IsNull()) {
727 if (!arg0.mSeq1.Value()[indexName0].mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
728 return false;
729 }
730 }
731 if (arg0.mSeq1.Value()[indexName0].mNullableArrayBuffer.WasPassed()) {
732 if (!arg0.mSeq1.Value()[indexName0].mNullableArrayBuffer.Value().IsNull()) {
733 if (!arg0.mSeq1.Value()[indexName0].mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
734 return false;
735 }
736 }
737 }
738 if (arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLong2.WasPassed()) {
739 if (!arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLong2.Value().IsNull()) {
740 if (arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
741 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
742 return false;
743 }
744 }
745 }
746 }
747 if (!arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
748 if (arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
749 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
750 return false;
751 }
752 }
753 }
754 if (!arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
755 if (arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
756 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
757 return false;
758 }
759 }
760 }
761 if (arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.WasPassed()) {
762 if (!arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.Value().IsNull()) {
763 if (arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
764 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName1) {
765 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName1]))) {
766 return false;
767 }
768 }
769 }
770 }
771 }
772 if (!arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
773 if (arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
774 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName1) {
775 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName1]))) {
776 return false;
777 }
778 }
779 }
780 }
781 if (!arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
782 if (arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
783 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName1) {
784 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName1]))) {
785 return false;
786 }
787 }
788 }
789 }
790 if (arg0.mSeq1.Value()[indexName0].mObjectOrLong.WasPassed()) {
791 if (arg0.mSeq1.Value()[indexName0].mObjectOrLong.Value().IsObject()) {
792 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mObjectOrLong.Value().GetAsObject()))) {
793 return false;
794 }
795 }
796 }
797 if (arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLong.WasPassed()) {
798 if (arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLong.Value().IsObjectSequence()) {
799 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName1) {
800 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName1]))) {
801 return false;
802 }
803 }
804 }
805 }
806 if (arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
807 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName1) {
808 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName1]))) {
809 return false;
810 }
811 }
812 }
813 if (arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
814 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName1) {
815 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName1]))) {
816 return false;
817 }
818 }
819 }
820 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mRequiredObject))) {
821 return false;
822 }
823 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mSomeAny))) {
824 return false;
825 }
826 if (arg0.mSeq1.Value()[indexName0].mSomeObj.WasPassed()) {
827 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mSomeObj.Value()))) {
828 return false;
829 }
830 }
831 if (arg0.mSeq1.Value()[indexName0].mUint8Array.WasPassed()) {
832 if (!arg0.mSeq1.Value()[indexName0].mUint8Array.Value().WrapIntoNewCompartment(cx)) {
833 return false;
834 }
835 }
836 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq1.Value()[indexName0].mParentAny))) {
837 return false;
838 }
839 }
840 }
841 if (arg0.mSeq2.WasPassed()) {
842 if (!arg0.mSeq2.Value().IsNull()) {
843 for (uint32_t indexName0 = 0; indexName0 < arg0.mSeq2.Value().Value().Length(); ++indexName0) {
844 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq2.Value().Value()[indexName0].Length(); ++indexName1) {
845 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mAnotherAny))) {
846 return false;
847 }
848 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mAnotherObj))) {
849 return false;
850 }
851 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mArrayBuffer.WasPassed()) {
852 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
853 return false;
854 }
855 }
856 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mCustomEventInit.WasPassed()) {
857 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mCustomEventInit.Value().mDetail))) {
858 return false;
859 }
860 }
861 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mDictionaryTypedef.WasPassed()) {
862 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mDictionaryTypedef.Value().mDetail))) {
863 return false;
864 }
865 }
866 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLong2.WasPassed()) {
867 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLong2.Value().IsCustomEventInit()) {
868 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
869 return false;
870 }
871 }
872 }
873 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
874 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
875 return false;
876 }
877 }
878 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
879 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
880 return false;
881 }
882 }
883 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mFloat64Array.IsNull()) {
884 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
885 return false;
886 }
887 }
888 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableArrayBuffer.WasPassed()) {
889 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableArrayBuffer.Value().IsNull()) {
890 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
891 return false;
892 }
893 }
894 }
895 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLong2.WasPassed()) {
896 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLong2.Value().IsNull()) {
897 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
898 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
899 return false;
900 }
901 }
902 }
903 }
904 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
905 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
906 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
907 return false;
908 }
909 }
910 }
911 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
912 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
913 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
914 return false;
915 }
916 }
917 }
918 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.WasPassed()) {
919 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.Value().IsNull()) {
920 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
921 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName2) {
922 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName2]))) {
923 return false;
924 }
925 }
926 }
927 }
928 }
929 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
930 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
931 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName2) {
932 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName2]))) {
933 return false;
934 }
935 }
936 }
937 }
938 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
939 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
940 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName2) {
941 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName2]))) {
942 return false;
943 }
944 }
945 }
946 }
947 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectOrLong.WasPassed()) {
948 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectOrLong.Value().IsObject()) {
949 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectOrLong.Value().GetAsObject()))) {
950 return false;
951 }
952 }
953 }
954 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLong.WasPassed()) {
955 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLong.Value().IsObjectSequence()) {
956 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName2) {
957 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName2]))) {
958 return false;
959 }
960 }
961 }
962 }
963 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
964 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName2) {
965 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName2]))) {
966 return false;
967 }
968 }
969 }
970 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
971 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName2) {
972 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName2]))) {
973 return false;
974 }
975 }
976 }
977 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mRequiredObject))) {
978 return false;
979 }
980 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mSomeAny))) {
981 return false;
982 }
983 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mSomeObj.WasPassed()) {
984 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mSomeObj.Value()))) {
985 return false;
986 }
987 }
988 if (arg0.mSeq2.Value().Value()[indexName0][indexName1].mUint8Array.WasPassed()) {
989 if (!arg0.mSeq2.Value().Value()[indexName0][indexName1].mUint8Array.Value().WrapIntoNewCompartment(cx)) {
990 return false;
991 }
992 }
993 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq2.Value().Value()[indexName0][indexName1].mParentAny))) {
994 return false;
995 }
996 }
997 }
998 }
999 }
1000 if (arg0.mSeq3.WasPassed()) {
1001 for (uint32_t indexName0 = 0; indexName0 < arg0.mSeq3.Value().Length(); ++indexName0) {
1002 if (!arg0.mSeq3.Value()[indexName0].IsNull()) {
1003 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq3.Value()[indexName0].Value().Length(); ++indexName1) {
1004 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mAnotherAny))) {
1005 return false;
1006 }
1007 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mAnotherObj))) {
1008 return false;
1009 }
1010 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mArrayBuffer.WasPassed()) {
1011 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
1012 return false;
1013 }
1014 }
1015 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mCustomEventInit.WasPassed()) {
1016 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mCustomEventInit.Value().mDetail))) {
1017 return false;
1018 }
1019 }
1020 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mDictionaryTypedef.WasPassed()) {
1021 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mDictionaryTypedef.Value().mDetail))) {
1022 return false;
1023 }
1024 }
1025 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLong2.WasPassed()) {
1026 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLong2.Value().IsCustomEventInit()) {
1027 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
1028 return false;
1029 }
1030 }
1031 }
1032 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
1033 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
1034 return false;
1035 }
1036 }
1037 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
1038 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
1039 return false;
1040 }
1041 }
1042 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mFloat64Array.IsNull()) {
1043 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
1044 return false;
1045 }
1046 }
1047 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableArrayBuffer.WasPassed()) {
1048 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableArrayBuffer.Value().IsNull()) {
1049 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
1050 return false;
1051 }
1052 }
1053 }
1054 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLong2.WasPassed()) {
1055 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLong2.Value().IsNull()) {
1056 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
1057 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
1058 return false;
1059 }
1060 }
1061 }
1062 }
1063 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
1064 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
1065 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
1066 return false;
1067 }
1068 }
1069 }
1070 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
1071 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
1072 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
1073 return false;
1074 }
1075 }
1076 }
1077 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.WasPassed()) {
1078 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.Value().IsNull()) {
1079 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
1080 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName2) {
1081 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName2]))) {
1082 return false;
1083 }
1084 }
1085 }
1086 }
1087 }
1088 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
1089 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
1090 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName2) {
1091 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName2]))) {
1092 return false;
1093 }
1094 }
1095 }
1096 }
1097 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
1098 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
1099 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName2) {
1100 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName2]))) {
1101 return false;
1102 }
1103 }
1104 }
1105 }
1106 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectOrLong.WasPassed()) {
1107 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectOrLong.Value().IsObject()) {
1108 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectOrLong.Value().GetAsObject()))) {
1109 return false;
1110 }
1111 }
1112 }
1113 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLong.WasPassed()) {
1114 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLong.Value().IsObjectSequence()) {
1115 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName2) {
1116 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName2]))) {
1117 return false;
1118 }
1119 }
1120 }
1121 }
1122 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
1123 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName2) {
1124 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName2]))) {
1125 return false;
1126 }
1127 }
1128 }
1129 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
1130 for (uint32_t indexName2 = 0; indexName2 < arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName2) {
1131 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName2]))) {
1132 return false;
1133 }
1134 }
1135 }
1136 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mRequiredObject))) {
1137 return false;
1138 }
1139 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mSomeAny))) {
1140 return false;
1141 }
1142 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mSomeObj.WasPassed()) {
1143 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mSomeObj.Value()))) {
1144 return false;
1145 }
1146 }
1147 if (arg0.mSeq3.Value()[indexName0].Value()[indexName1].mUint8Array.WasPassed()) {
1148 if (!arg0.mSeq3.Value()[indexName0].Value()[indexName1].mUint8Array.Value().WrapIntoNewCompartment(cx)) {
1149 return false;
1150 }
1151 }
1152 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq3.Value()[indexName0].Value()[indexName1].mParentAny))) {
1153 return false;
1154 }
1155 }
1156 }
1157 }
1158 }
1159 if (arg0.mSeq4.WasPassed()) {
1160 for (uint32_t indexName0 = 0; indexName0 < arg0.mSeq4.Value().Length(); ++indexName0) {
1161 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq4.Value()[indexName0]))) {
1162 return false;
1163 }
1164 }
1165 }
1166 if (arg0.mSeq5.WasPassed()) {
1167 for (uint32_t indexName0 = 0; indexName0 < arg0.mSeq5.Value().Length(); ++indexName0) {
1168 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq5.Value()[indexName0]))) {
1169 return false;
1170 }
1171 }
1172 }
1173 if (arg0.mSeq6.WasPassed()) {
1174 for (uint32_t indexName0 = 0; indexName0 < arg0.mSeq6.Value().Length(); ++indexName0) {
1175 if (arg0.mSeq6.Value()[indexName0].mOurSequence3.WasPassed()) {
1176 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq6.Value()[indexName0].mOurSequence3.Value().Length(); ++indexName1) {
1177 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg0.mSeq6.Value()[indexName0].mOurSequence3.Value()[indexName1]))) {
1178 return false;
1179 }
1180 }
1181 }
1182 if (arg0.mSeq6.Value()[indexName0].mOurSequence4.WasPassed()) {
1183 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq6.Value()[indexName0].mOurSequence4.Value().Length(); ++indexName1) {
1184 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq6.Value()[indexName0].mOurSequence4.Value()[indexName1]))) {
1185 return false;
1186 }
1187 }
1188 }
1189 if (arg0.mSeq6.Value()[indexName0].mOurSequence5.WasPassed()) {
1190 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq6.Value()[indexName0].mOurSequence5.Value().Length(); ++indexName1) {
1191 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq6.Value()[indexName0].mOurSequence5.Value()[indexName1]))) {
1192 return false;
1193 }
1194 }
1195 }
1196 if (arg0.mSeq6.Value()[indexName0].mOurSequence6.WasPassed()) {
1197 if (!arg0.mSeq6.Value()[indexName0].mOurSequence6.Value().IsNull()) {
1198 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq6.Value()[indexName0].mOurSequence6.Value().Value().Length(); ++indexName1) {
1199 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq6.Value()[indexName0].mOurSequence6.Value().Value()[indexName1]))) {
1200 return false;
1201 }
1202 }
1203 }
1204 }
1205 if (arg0.mSeq6.Value()[indexName0].mOurSequence7.WasPassed()) {
1206 if (!arg0.mSeq6.Value()[indexName0].mOurSequence7.Value().IsNull()) {
1207 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq6.Value()[indexName0].mOurSequence7.Value().Value().Length(); ++indexName1) {
1208 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq6.Value()[indexName0].mOurSequence7.Value().Value()[indexName1]))) {
1209 return false;
1210 }
1211 }
1212 }
1213 }
1214 if (!arg0.mSeq6.Value()[indexName0].mOurSequence8.IsNull()) {
1215 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq6.Value()[indexName0].mOurSequence8.Value().Length(); ++indexName1) {
1216 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq6.Value()[indexName0].mOurSequence8.Value()[indexName1]))) {
1217 return false;
1218 }
1219 }
1220 }
1221 if (!arg0.mSeq6.Value()[indexName0].mOurSequence9.IsNull()) {
1222 for (uint32_t indexName1 = 0; indexName1 < arg0.mSeq6.Value()[indexName0].mOurSequence9.Value().Length(); ++indexName1) {
1223 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg0.mSeq6.Value()[indexName0].mOurSequence9.Value()[indexName1]))) {
1224 return false;
1225 }
1226 }
1227 }
1228 }
1229 }
1230 if (!JS_WrapValue(cx, &arg1)) {
1231 return false;
1232 }
1233 if (!JS_WrapObject(cx, &arg2)) {
1234 return false;
1235 }
1236 if (!JS_WrapObject(cx, &arg3)) {
1237 return false;
1238 }
1239 for (uint32_t indexName0 = 0; indexName0 < arg4.Length(); ++indexName0) {
1240 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mAnotherAny))) {
1241 return false;
1242 }
1243 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mAnotherObj))) {
1244 return false;
1245 }
1246 if (arg4[indexName0].mArrayBuffer.WasPassed()) {
1247 if (!arg4[indexName0].mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
1248 return false;
1249 }
1250 }
1251 if (arg4[indexName0].mCustomEventInit.WasPassed()) {
1252 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mCustomEventInit.Value().mDetail))) {
1253 return false;
1254 }
1255 }
1256 if (arg4[indexName0].mDictionaryTypedef.WasPassed()) {
1257 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mDictionaryTypedef.Value().mDetail))) {
1258 return false;
1259 }
1260 }
1261 if (arg4[indexName0].mEventInitOrLong2.WasPassed()) {
1262 if (arg4[indexName0].mEventInitOrLong2.Value().IsCustomEventInit()) {
1263 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
1264 return false;
1265 }
1266 }
1267 }
1268 if (arg4[indexName0].mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
1269 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
1270 return false;
1271 }
1272 }
1273 if (arg4[indexName0].mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
1274 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
1275 return false;
1276 }
1277 }
1278 if (!arg4[indexName0].mFloat64Array.IsNull()) {
1279 if (!arg4[indexName0].mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
1280 return false;
1281 }
1282 }
1283 if (arg4[indexName0].mNullableArrayBuffer.WasPassed()) {
1284 if (!arg4[indexName0].mNullableArrayBuffer.Value().IsNull()) {
1285 if (!arg4[indexName0].mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
1286 return false;
1287 }
1288 }
1289 }
1290 if (arg4[indexName0].mNullableEventInitOrLong2.WasPassed()) {
1291 if (!arg4[indexName0].mNullableEventInitOrLong2.Value().IsNull()) {
1292 if (arg4[indexName0].mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
1293 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
1294 return false;
1295 }
1296 }
1297 }
1298 }
1299 if (!arg4[indexName0].mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
1300 if (arg4[indexName0].mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
1301 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
1302 return false;
1303 }
1304 }
1305 }
1306 if (!arg4[indexName0].mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
1307 if (arg4[indexName0].mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
1308 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
1309 return false;
1310 }
1311 }
1312 }
1313 if (arg4[indexName0].mNullableObjectSequenceOrLong.WasPassed()) {
1314 if (!arg4[indexName0].mNullableObjectSequenceOrLong.Value().IsNull()) {
1315 if (arg4[indexName0].mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
1316 for (uint32_t indexName1 = 0; indexName1 < arg4[indexName0].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName1) {
1317 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName1]))) {
1318 return false;
1319 }
1320 }
1321 }
1322 }
1323 }
1324 if (!arg4[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
1325 if (arg4[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
1326 for (uint32_t indexName1 = 0; indexName1 < arg4[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName1) {
1327 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName1]))) {
1328 return false;
1329 }
1330 }
1331 }
1332 }
1333 if (!arg4[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
1334 if (arg4[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
1335 for (uint32_t indexName1 = 0; indexName1 < arg4[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName1) {
1336 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName1]))) {
1337 return false;
1338 }
1339 }
1340 }
1341 }
1342 if (arg4[indexName0].mObjectOrLong.WasPassed()) {
1343 if (arg4[indexName0].mObjectOrLong.Value().IsObject()) {
1344 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mObjectOrLong.Value().GetAsObject()))) {
1345 return false;
1346 }
1347 }
1348 }
1349 if (arg4[indexName0].mObjectSequenceOrLong.WasPassed()) {
1350 if (arg4[indexName0].mObjectSequenceOrLong.Value().IsObjectSequence()) {
1351 for (uint32_t indexName1 = 0; indexName1 < arg4[indexName0].mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName1) {
1352 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName1]))) {
1353 return false;
1354 }
1355 }
1356 }
1357 }
1358 if (arg4[indexName0].mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
1359 for (uint32_t indexName1 = 0; indexName1 < arg4[indexName0].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName1) {
1360 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName1]))) {
1361 return false;
1362 }
1363 }
1364 }
1365 if (arg4[indexName0].mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
1366 for (uint32_t indexName1 = 0; indexName1 < arg4[indexName0].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName1) {
1367 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName1]))) {
1368 return false;
1369 }
1370 }
1371 }
1372 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mRequiredObject))) {
1373 return false;
1374 }
1375 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mSomeAny))) {
1376 return false;
1377 }
1378 if (arg4[indexName0].mSomeObj.WasPassed()) {
1379 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg4[indexName0].mSomeObj.Value()))) {
1380 return false;
1381 }
1382 }
1383 if (arg4[indexName0].mUint8Array.WasPassed()) {
1384 if (!arg4[indexName0].mUint8Array.Value().WrapIntoNewCompartment(cx)) {
1385 return false;
1386 }
1387 }
1388 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg4[indexName0].mParentAny))) {
1389 return false;
1390 }
1391 }
1392 if (!JS_WrapValue(cx, &arg5)) {
1393 return false;
1394 }
1395 if (arg6.WasPassed()) {
1396 if (!JS_WrapObject(cx, &arg6.Value())) {
1397 return false;
1398 }
1399 }
1400 if (arg7.WasPassed()) {
1401 if (!JS_WrapObject(cx, &arg7.Value())) {
1402 return false;
1403 }
1404 }
1405 }
1406 FastErrorResult rv;
1407 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Example2(global, Constify(arg0), arg1, arg2, arg3, Constify(arg4), arg5, Constify(arg6), Constify(arg7), rv)));
1408 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "Example2 constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "Example2 constructor"
)), 0))
) {
1409 return false;
1410 }
1411 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1411); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1411; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1412 static_assert(!std::is_pointer_v<decltype(result)>,
1413 "NewObject implies that we need to keep the object alive with a strong reference.");
1414 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
1415 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1415); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 1415; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
1416 return false;
1417 }
1418 return true;
1419 break;
1420 }
1421 default: {
1422 // Using nsPrintfCString here would require including that
1423 // header. Let's not worry about it.
1424 nsAutoCString argCountStr;
1425 argCountStr.AppendPrintf("%u", args.length());
1426 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
1427 }
1428 }
1429 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 1429); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 1429; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
1430 return false;
1431}
1432
1433MOZ_CAN_RUN_SCRIPT static bool
1434get_readonlyByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1435{
1436 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1439( cx, "TestExampleInterface"
, "readonlyByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1437 "TestExampleInterface", "readonlyByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1439( cx, "TestExampleInterface"
, "readonlyByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1438 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1439( cx, "TestExampleInterface"
, "readonlyByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1439 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1439( cx, "TestExampleInterface"
, "readonlyByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1440
1441 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1442 int8_t result(MOZ_KnownLive(self)(self)->ReadonlyByte());
1443 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1443); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1443; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1444 args.rval().setInt32(int32_t(result));
1445 return true;
1446}
1447
1448static const JSJitInfo readonlyByte_getterinfo = {
1449 { get_readonlyByte },
1450 { prototypes::id::TestExampleInterface },
1451 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1452 JSJitInfo::Getter,
1453 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1454 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1455 true, /* isInfallible. False in setters. */
1456 false, /* isMovable. Not relevant for setters. */
1457 false, /* isEliminatable. Not relevant for setters. */
1458 false, /* isAlwaysInSlot. Only relevant for getters. */
1459 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1460 false, /* isTypedMethod. Only relevant for methods. */
1461 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1462};
1463
1464MOZ_CAN_RUN_SCRIPT static bool
1465get_writableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1466{
1467 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1470( cx, "TestExampleInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1468 "TestExampleInterface", "writableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1470( cx, "TestExampleInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1469 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1470( cx, "TestExampleInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1470 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1470( cx, "TestExampleInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1471
1472 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1473 int8_t result(MOZ_KnownLive(self)(self)->WritableByte());
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)"
, "../TestExampleGenBinding.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
1479MOZ_CAN_RUN_SCRIPT static bool
1480set_writableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
1481{
1482 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1485( cx, "TestExampleInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1483 "TestExampleInterface", "writableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1485( cx, "TestExampleInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1484 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject1485( cx, "TestExampleInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1485 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1485( cx, "TestExampleInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1486
1487 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1488 int8_t arg0;
1489 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
1490 return false;
1491 }
1492 // NOTE: This assert does NOT call the function.
1493 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableByte(arg0))>, "Should be returning void here");
1494 MOZ_KnownLive(self)(self)->SetWritableByte(arg0);
1495 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1495); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1495; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1496
1497 return true;
1498}
1499
1500static const JSJitInfo writableByte_getterinfo = {
1501 { get_writableByte },
1502 { prototypes::id::TestExampleInterface },
1503 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1504 JSJitInfo::Getter,
1505 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1506 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1507 true, /* isInfallible. False in setters. */
1508 false, /* isMovable. Not relevant for setters. */
1509 false, /* isEliminatable. Not relevant for setters. */
1510 false, /* isAlwaysInSlot. Only relevant for getters. */
1511 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1512 false, /* isTypedMethod. Only relevant for methods. */
1513 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1514};
1515static const JSJitInfo writableByte_setterinfo = {
1516 { (JSJitGetterOp)set_writableByte },
1517 { prototypes::id::TestExampleInterface },
1518 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1519 JSJitInfo::Setter,
1520 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1521 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1522 false, /* isInfallible. False in setters. */
1523 false, /* isMovable. Not relevant for setters. */
1524 false, /* isEliminatable. Not relevant for setters. */
1525 false, /* isAlwaysInSlot. Only relevant for getters. */
1526 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1527 false, /* isTypedMethod. Only relevant for methods. */
1528 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1529};
1530
1531MOZ_CAN_RUN_SCRIPT static bool
1532passByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1533{
1534 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1537( cx, "TestExampleInterface"
, "passByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
1535 "TestExampleInterface", "passByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1537( cx, "TestExampleInterface"
, "passByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
1536 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1537( cx, "TestExampleInterface"
, "passByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
1537 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1537( cx, "TestExampleInterface"
, "passByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
1538
1539 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1540 if (!args.requireAtLeast(cx, "TestExampleInterface.passByte", 1)) {
1541 return false;
1542 }
1543 int8_t arg0;
1544 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
1545 return false;
1546 }
1547 // NOTE: This assert does NOT call the function.
1548 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassByte(arg0))>, "Should be returning void here");
1549 MOZ_KnownLive(self)(self)->PassByte(arg0);
1550 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1550); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1550; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1551 args.rval().setUndefined();
1552 return true;
1553}
1554
1555static const JSJitInfo passByte_methodinfo = {
1556 { (JSJitGetterOp)passByte },
1557 { prototypes::id::TestExampleInterface },
1558 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1559 JSJitInfo::Method,
1560 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1561 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1562 false, /* isInfallible. False in setters. */
1563 false, /* isMovable. Not relevant for setters. */
1564 false, /* isEliminatable. Not relevant for setters. */
1565 false, /* isAlwaysInSlot. Only relevant for getters. */
1566 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1567 false, /* isTypedMethod. Only relevant for methods. */
1568 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1569};
1570
1571MOZ_CAN_RUN_SCRIPT static bool
1572receiveByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1573{
1574 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1577( cx, "TestExampleInterface"
, "receiveByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1575 "TestExampleInterface", "receiveByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1577( cx, "TestExampleInterface"
, "receiveByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1576 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1577( cx, "TestExampleInterface"
, "receiveByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1577 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1577( cx, "TestExampleInterface"
, "receiveByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1578
1579 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1580 int8_t result(MOZ_KnownLive(self)(self)->ReceiveByte());
1581 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1581); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1581; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1582 args.rval().setInt32(int32_t(result));
1583 return true;
1584}
1585
1586static const JSJitInfo receiveByte_methodinfo = {
1587 { (JSJitGetterOp)receiveByte },
1588 { prototypes::id::TestExampleInterface },
1589 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1590 JSJitInfo::Method,
1591 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1592 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1593 true, /* isInfallible. False in setters. */
1594 false, /* isMovable. Not relevant for setters. */
1595 false, /* isEliminatable. Not relevant for setters. */
1596 false, /* isAlwaysInSlot. Only relevant for getters. */
1597 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1598 false, /* isTypedMethod. Only relevant for methods. */
1599 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1600};
1601
1602MOZ_CAN_RUN_SCRIPT static bool
1603passOptionalByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1604{
1605 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1608( cx, "TestExampleInterface"
, "passOptionalByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1606 "TestExampleInterface", "passOptionalByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1608( cx, "TestExampleInterface"
, "passOptionalByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1607 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1608( cx, "TestExampleInterface"
, "passOptionalByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1608 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1608( cx, "TestExampleInterface"
, "passOptionalByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1609
1610 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1611 Optional<int8_t> arg0;
1612 if (args.hasDefined(0)) {
1613 arg0.Construct();
1614 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
1615 return false;
1616 }
1617 }
1618 // NOTE: This assert does NOT call the function.
1619 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByte(Constify(arg0)))>, "Should be returning void here");
1620 MOZ_KnownLive(self)(self)->PassOptionalByte(Constify(arg0));
1621 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1621); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1621; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1622 args.rval().setUndefined();
1623 return true;
1624}
1625
1626static const JSJitInfo passOptionalByte_methodinfo = {
1627 { (JSJitGetterOp)passOptionalByte },
1628 { prototypes::id::TestExampleInterface },
1629 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1630 JSJitInfo::Method,
1631 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1632 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1633 false, /* isInfallible. False in setters. */
1634 false, /* isMovable. Not relevant for setters. */
1635 false, /* isEliminatable. Not relevant for setters. */
1636 false, /* isAlwaysInSlot. Only relevant for getters. */
1637 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1638 false, /* isTypedMethod. Only relevant for methods. */
1639 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1640};
1641
1642MOZ_CAN_RUN_SCRIPT static bool
1643passOptionalByteBeforeRequired(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1644{
1645 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1648( cx, "TestExampleInterface"
, "passOptionalByteBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1646 "TestExampleInterface", "passOptionalByteBeforeRequired", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1648( cx, "TestExampleInterface"
, "passOptionalByteBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1647 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1648( cx, "TestExampleInterface"
, "passOptionalByteBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1648 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1648( cx, "TestExampleInterface"
, "passOptionalByteBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
1649
1650 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1651 if (!args.requireAtLeast(cx, "TestExampleInterface.passOptionalByteBeforeRequired", 2)) {
1652 return false;
1653 }
1654 Optional<int8_t> arg0;
1655 if (args.hasDefined(0)) {
1656 arg0.Construct();
1657 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
1658 return false;
1659 }
1660 }
1661 int8_t arg1;
1662 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[1], "Argument 2", &arg1)) {
1663 return false;
1664 }
1665 // NOTE: This assert does NOT call the function.
1666 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteBeforeRequired(Constify(arg0), arg1))>, "Should be returning void here");
1667 MOZ_KnownLive(self)(self)->PassOptionalByteBeforeRequired(Constify(arg0), arg1);
1668 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1668); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1668; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1669 args.rval().setUndefined();
1670 return true;
1671}
1672
1673static const JSJitInfo passOptionalByteBeforeRequired_methodinfo = {
1674 { (JSJitGetterOp)passOptionalByteBeforeRequired },
1675 { prototypes::id::TestExampleInterface },
1676 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1677 JSJitInfo::Method,
1678 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1679 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1680 false, /* isInfallible. False in setters. */
1681 false, /* isMovable. Not relevant for setters. */
1682 false, /* isEliminatable. Not relevant for setters. */
1683 false, /* isAlwaysInSlot. Only relevant for getters. */
1684 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1685 false, /* isTypedMethod. Only relevant for methods. */
1686 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1687};
1688
1689MOZ_CAN_RUN_SCRIPT static bool
1690passOptionalByteWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1691{
1692 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1695( cx, "TestExampleInterface"
, "passOptionalByteWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1693 "TestExampleInterface", "passOptionalByteWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1695( cx, "TestExampleInterface"
, "passOptionalByteWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1694 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1695( cx, "TestExampleInterface"
, "passOptionalByteWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1695 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1695( cx, "TestExampleInterface"
, "passOptionalByteWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
1696
1697 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1698 int8_t arg0;
1699 if (args.hasDefined(0)) {
1700 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
1701 return false;
1702 }
1703 } else {
1704 arg0 = 0;
1705 }
1706 // NOTE: This assert does NOT call the function.
1707 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteWithDefault(arg0))>, "Should be returning void here");
1708 MOZ_KnownLive(self)(self)->PassOptionalByteWithDefault(arg0);
1709 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1709); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1709; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1710 args.rval().setUndefined();
1711 return true;
1712}
1713
1714static const JSJitInfo passOptionalByteWithDefault_methodinfo = {
1715 { (JSJitGetterOp)passOptionalByteWithDefault },
1716 { prototypes::id::TestExampleInterface },
1717 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1718 JSJitInfo::Method,
1719 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1720 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1721 false, /* isInfallible. False in setters. */
1722 false, /* isMovable. Not relevant for setters. */
1723 false, /* isEliminatable. Not relevant for setters. */
1724 false, /* isAlwaysInSlot. Only relevant for getters. */
1725 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1726 false, /* isTypedMethod. Only relevant for methods. */
1727 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1728};
1729
1730MOZ_CAN_RUN_SCRIPT static bool
1731passOptionalByteWithDefaultBeforeRequired(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1732{
1733 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1736( cx, "TestExampleInterface"
, "passOptionalByteWithDefaultBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1734 "TestExampleInterface", "passOptionalByteWithDefaultBeforeRequired", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1736( cx, "TestExampleInterface"
, "passOptionalByteWithDefaultBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1735 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1736( cx, "TestExampleInterface"
, "passOptionalByteWithDefaultBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1736 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1736( cx, "TestExampleInterface"
, "passOptionalByteWithDefaultBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
1737
1738 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1739 if (!args.requireAtLeast(cx, "TestExampleInterface.passOptionalByteWithDefaultBeforeRequired", 2)) {
1740 return false;
1741 }
1742 int8_t arg0;
1743 if (args.hasDefined(0)) {
1744 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
1745 return false;
1746 }
1747 } else {
1748 arg0 = 0;
1749 }
1750 int8_t arg1;
1751 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[1], "Argument 2", &arg1)) {
1752 return false;
1753 }
1754 // NOTE: This assert does NOT call the function.
1755 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteWithDefaultBeforeRequired(arg0, arg1))>, "Should be returning void here");
1756 MOZ_KnownLive(self)(self)->PassOptionalByteWithDefaultBeforeRequired(arg0, arg1);
1757 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1757); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1757; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1758 args.rval().setUndefined();
1759 return true;
1760}
1761
1762static const JSJitInfo passOptionalByteWithDefaultBeforeRequired_methodinfo = {
1763 { (JSJitGetterOp)passOptionalByteWithDefaultBeforeRequired },
1764 { prototypes::id::TestExampleInterface },
1765 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1766 JSJitInfo::Method,
1767 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1768 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1769 false, /* isInfallible. False in setters. */
1770 false, /* isMovable. Not relevant for setters. */
1771 false, /* isEliminatable. Not relevant for setters. */
1772 false, /* isAlwaysInSlot. Only relevant for getters. */
1773 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1774 false, /* isTypedMethod. Only relevant for methods. */
1775 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1776};
1777
1778MOZ_CAN_RUN_SCRIPT static bool
1779passNullableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1780{
1781 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1784( cx, "TestExampleInterface"
, "passNullableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1782 "TestExampleInterface", "passNullableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1784( cx, "TestExampleInterface"
, "passNullableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1783 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1784( cx, "TestExampleInterface"
, "passNullableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1784 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1784( cx, "TestExampleInterface"
, "passNullableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1785
1786 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1787 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableByte", 1)) {
1788 return false;
1789 }
1790 Nullable<int8_t> arg0;
1791 if (args[0].isNullOrUndefined()) {
1792 arg0.SetNull();
1793 } else if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
1794 return false;
1795 }
1796 // NOTE: This assert does NOT call the function.
1797 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableByte(Constify(arg0)))>, "Should be returning void here");
1798 MOZ_KnownLive(self)(self)->PassNullableByte(Constify(arg0));
1799 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1799); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1799; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1800 args.rval().setUndefined();
1801 return true;
1802}
1803
1804static const JSJitInfo passNullableByte_methodinfo = {
1805 { (JSJitGetterOp)passNullableByte },
1806 { prototypes::id::TestExampleInterface },
1807 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1808 JSJitInfo::Method,
1809 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1810 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1811 false, /* isInfallible. False in setters. */
1812 false, /* isMovable. Not relevant for setters. */
1813 false, /* isEliminatable. Not relevant for setters. */
1814 false, /* isAlwaysInSlot. Only relevant for getters. */
1815 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1816 false, /* isTypedMethod. Only relevant for methods. */
1817 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1818};
1819
1820MOZ_CAN_RUN_SCRIPT static bool
1821passOptionalNullableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1822{
1823 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1826( cx, "TestExampleInterface"
, "passOptionalNullableByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1824 "TestExampleInterface", "passOptionalNullableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1826( cx, "TestExampleInterface"
, "passOptionalNullableByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1825 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1826( cx, "TestExampleInterface"
, "passOptionalNullableByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1826 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1826( cx, "TestExampleInterface"
, "passOptionalNullableByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
1827
1828 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1829 Optional<Nullable<int8_t>> arg0;
1830 if (args.hasDefined(0)) {
1831 arg0.Construct();
1832 if (args[0].isNullOrUndefined()) {
1833 arg0.Value().SetNull();
1834 } else if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value().SetValue())) {
1835 return false;
1836 }
1837 }
1838 // NOTE: This assert does NOT call the function.
1839 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableByte(Constify(arg0)))>, "Should be returning void here");
1840 MOZ_KnownLive(self)(self)->PassOptionalNullableByte(Constify(arg0));
1841 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1841); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1841; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1842 args.rval().setUndefined();
1843 return true;
1844}
1845
1846static const JSJitInfo passOptionalNullableByte_methodinfo = {
1847 { (JSJitGetterOp)passOptionalNullableByte },
1848 { prototypes::id::TestExampleInterface },
1849 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1850 JSJitInfo::Method,
1851 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1852 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1853 false, /* isInfallible. False in setters. */
1854 false, /* isMovable. Not relevant for setters. */
1855 false, /* isEliminatable. Not relevant for setters. */
1856 false, /* isAlwaysInSlot. Only relevant for getters. */
1857 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1858 false, /* isTypedMethod. Only relevant for methods. */
1859 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1860};
1861
1862MOZ_CAN_RUN_SCRIPT static bool
1863passVariadicByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1864{
1865 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1868( cx, "TestExampleInterface"
, "passVariadicByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1866 "TestExampleInterface", "passVariadicByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1868( cx, "TestExampleInterface"
, "passVariadicByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1867 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1868( cx, "TestExampleInterface"
, "passVariadicByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1868 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1868( cx, "TestExampleInterface"
, "passVariadicByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1869
1870 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1871 AutoSequence<int8_t> arg0;
1872 if (args.length() > 0) {
1873 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
1874 JS_ReportOutOfMemory(cx);
1875 return false;
1876 }
1877 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
1878 // OK to do infallible append here, since we ensured capacity already.
1879 int8_t& slot = *arg0.AppendElement();
1880 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[variadicArg], "Argument 1", &slot)) {
1881 return false;
1882 }
1883 }
1884 }
1885 // NOTE: This assert does NOT call the function.
1886 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicByte(Constify(arg0)))>, "Should be returning void here");
1887 MOZ_KnownLive(self)(self)->PassVariadicByte(Constify(arg0));
1888 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1888); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1888; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1889 args.rval().setUndefined();
1890 return true;
1891}
1892
1893static const JSJitInfo passVariadicByte_methodinfo = {
1894 { (JSJitGetterOp)passVariadicByte },
1895 { prototypes::id::TestExampleInterface },
1896 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1897 JSJitInfo::Method,
1898 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1899 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1900 false, /* isInfallible. False in setters. */
1901 false, /* isMovable. Not relevant for setters. */
1902 false, /* isEliminatable. Not relevant for setters. */
1903 false, /* isAlwaysInSlot. Only relevant for getters. */
1904 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1905 false, /* isTypedMethod. Only relevant for methods. */
1906 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1907};
1908
1909MOZ_CAN_RUN_SCRIPT static bool
1910get_cachedByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1911{
1912 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1915( cx, "TestExampleInterface"
, "cachedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1913 "TestExampleInterface", "cachedByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1915( cx, "TestExampleInterface"
, "cachedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1914 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1915( cx, "TestExampleInterface"
, "cachedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1915 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1915( cx, "TestExampleInterface"
, "cachedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1916
1917 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1918 // Have to either root across the getter call or reget after.
1919 bool isXray;
1920 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
1921 if (!slotStorage) {
1922 return false;
1923 }
1924 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 0) : (DOM_INSTANCE_RESERVED_SLOTS1 + 0);
1925 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 1925); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 1925; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1926 {
1927 // Scope for cachedVal
1928 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
1929 if (!cachedVal.isUndefined()) {
1930 args.rval().set(cachedVal);
1931 // The cached value is in the compartment of slotStorage,
1932 // so wrap into the caller compartment as needed.
1933 return MaybeWrapValue(cx, args.rval());
1934 }
1935 }
1936
1937 int8_t result(MOZ_KnownLive(self)(self)->CachedByte());
1938 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 1938); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1938; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1939 {
1940 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
1941 JSAutoRealm ar(cx, conversionScope);
1942 do { // block we break out of when done wrapping
1943 args.rval().setInt32(int32_t(result));
1944 break;
1945 } while (false);
1946 }
1947 { // And now store things in the realm of our slotStorage.
1948 JSAutoRealm ar(cx, slotStorage);
1949 // Make a copy so that we don't do unnecessary wrapping on args.rval().
1950 JS::Rooted<JS::Value> storedVal(cx, args.rval());
1951 if (!MaybeWrapValue(cx, &storedVal)) {
1952 return false;
1953 }
1954 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
1955 if (!isXray) {
1956 // In the Xray case we don't need to do this, because getting the
1957 // expando object already preserved our wrapper.
1958 PreserveWrapper(self);
1959 }
1960 }
1961 // And now make sure args.rval() is in the caller realm.
1962 return MaybeWrapValue(cx, args.rval());
1963}
1964
1965static const JSJitInfo cachedByte_getterinfo = {
1966 { get_cachedByte },
1967 { prototypes::id::TestExampleInterface },
1968 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
1969 JSJitInfo::Getter,
1970 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
1971 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1972 true, /* isInfallible. False in setters. */
1973 true, /* isMovable. Not relevant for setters. */
1974 true, /* isEliminatable. Not relevant for setters. */
1975 false, /* isAlwaysInSlot. Only relevant for getters. */
1976 true, /* isLazilyCachedInSlot. Only relevant for getters. */
1977 false, /* isTypedMethod. Only relevant for methods. */
1978 (DOM_INSTANCE_RESERVED_SLOTS1 + 0) /* Reserved slot index, if we're stored in a slot, else 0. */
1979};
1980static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 0) <= JSJitInfo::maxSlotIndex, "We won't fit");
1981static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 0) < 22, "There is no slot for us");
1982
1983static bool
1984get_cachedConstantByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1985{
1986 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1989( cx, "TestExampleInterface"
, "cachedConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1987 "TestExampleInterface", "cachedConstantByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1989( cx, "TestExampleInterface"
, "cachedConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1988 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1989( cx, "TestExampleInterface"
, "cachedConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1989 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1989( cx, "TestExampleInterface"
, "cachedConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1990
1991 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
1992 // Have to either root across the getter call or reget after.
1993 bool isXray;
1994 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
1995 if (!slotStorage) {
1996 return false;
1997 }
1998 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 1) : (DOM_INSTANCE_RESERVED_SLOTS1 + 1);
1999 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 1999); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 1999; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
2000 {
2001 // Scope for cachedVal
2002 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
2003 if (!cachedVal.isUndefined()) {
2004 args.rval().set(cachedVal);
2005 // The cached value is in the compartment of slotStorage,
2006 // so wrap into the caller compartment as needed.
2007 return MaybeWrapValue(cx, args.rval());
2008 }
2009 }
2010
2011 int8_t result(MOZ_KnownLive(self)(self)->CachedConstantByte());
2012 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2012); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2012; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2013 {
2014 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
2015 JSAutoRealm ar(cx, conversionScope);
2016 do { // block we break out of when done wrapping
2017 args.rval().setInt32(int32_t(result));
2018 break;
2019 } while (false);
2020 }
2021 { // And now store things in the realm of our slotStorage.
2022 JSAutoRealm ar(cx, slotStorage);
2023 // Make a copy so that we don't do unnecessary wrapping on args.rval().
2024 JS::Rooted<JS::Value> storedVal(cx, args.rval());
2025 if (!MaybeWrapValue(cx, &storedVal)) {
2026 return false;
2027 }
2028 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
2029 }
2030 // And now make sure args.rval() is in the caller realm.
2031 return MaybeWrapValue(cx, args.rval());
2032}
2033
2034static const JSJitInfo cachedConstantByte_getterinfo = {
2035 { get_cachedConstantByte },
2036 { prototypes::id::TestExampleInterface },
2037 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2038 JSJitInfo::Getter,
2039 JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */
2040 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2041 true, /* isInfallible. False in setters. */
2042 true, /* isMovable. Not relevant for setters. */
2043 true, /* isEliminatable. Not relevant for setters. */
2044 true, /* isAlwaysInSlot. Only relevant for getters. */
2045 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2046 false, /* isTypedMethod. Only relevant for methods. */
2047 (DOM_INSTANCE_RESERVED_SLOTS1 + 1) /* Reserved slot index, if we're stored in a slot, else 0. */
2048};
2049static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 1) <= JSJitInfo::maxSlotIndex, "We won't fit");
2050static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 1) < 22, "There is no slot for us");
2051
2052MOZ_CAN_RUN_SCRIPT static bool
2053get_cachedWritableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2054{
2055 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2058( cx, "TestExampleInterface"
, "cachedWritableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2056 "TestExampleInterface", "cachedWritableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2058( cx, "TestExampleInterface"
, "cachedWritableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2057 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2058( cx, "TestExampleInterface"
, "cachedWritableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2058 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2058( cx, "TestExampleInterface"
, "cachedWritableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2059
2060 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2061 // Have to either root across the getter call or reget after.
2062 bool isXray;
2063 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
2064 if (!slotStorage) {
2065 return false;
2066 }
2067 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 2) : (DOM_INSTANCE_RESERVED_SLOTS1 + 2);
2068 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 2068); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 2068; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
2069 {
2070 // Scope for cachedVal
2071 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
2072 if (!cachedVal.isUndefined()) {
2073 args.rval().set(cachedVal);
2074 // The cached value is in the compartment of slotStorage,
2075 // so wrap into the caller compartment as needed.
2076 return MaybeWrapValue(cx, args.rval());
2077 }
2078 }
2079
2080 int8_t result(MOZ_KnownLive(self)(self)->CachedWritableByte());
2081 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2081); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2081; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2082 {
2083 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
2084 JSAutoRealm ar(cx, conversionScope);
2085 do { // block we break out of when done wrapping
2086 args.rval().setInt32(int32_t(result));
2087 break;
2088 } while (false);
2089 }
2090 { // And now store things in the realm of our slotStorage.
2091 JSAutoRealm ar(cx, slotStorage);
2092 // Make a copy so that we don't do unnecessary wrapping on args.rval().
2093 JS::Rooted<JS::Value> storedVal(cx, args.rval());
2094 if (!MaybeWrapValue(cx, &storedVal)) {
2095 return false;
2096 }
2097 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
2098 if (!isXray) {
2099 // In the Xray case we don't need to do this, because getting the
2100 // expando object already preserved our wrapper.
2101 PreserveWrapper(self);
2102 }
2103 }
2104 // And now make sure args.rval() is in the caller realm.
2105 return MaybeWrapValue(cx, args.rval());
2106}
2107
2108MOZ_CAN_RUN_SCRIPT static bool
2109set_cachedWritableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
2110{
2111 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2114( cx, "TestExampleInterface"
, "cachedWritableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2112 "TestExampleInterface", "cachedWritableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2114( cx, "TestExampleInterface"
, "cachedWritableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2113 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject2114( cx, "TestExampleInterface"
, "cachedWritableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2114 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2114( cx, "TestExampleInterface"
, "cachedWritableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2115
2116 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2117 int8_t arg0;
2118 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
2119 return false;
2120 }
2121 // NOTE: This assert does NOT call the function.
2122 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetCachedWritableByte(arg0))>, "Should be returning void here");
2123 MOZ_KnownLive(self)(self)->SetCachedWritableByte(arg0);
2124 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2124); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2124; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2125
2126 ClearCachedCachedWritableByteValue(self);
2127 return true;
2128}
2129
2130static const JSJitInfo cachedWritableByte_getterinfo = {
2131 { get_cachedWritableByte },
2132 { prototypes::id::TestExampleInterface },
2133 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2134 JSJitInfo::Getter,
2135 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
2136 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2137 true, /* isInfallible. False in setters. */
2138 true, /* isMovable. Not relevant for setters. */
2139 true, /* isEliminatable. Not relevant for setters. */
2140 false, /* isAlwaysInSlot. Only relevant for getters. */
2141 true, /* isLazilyCachedInSlot. Only relevant for getters. */
2142 false, /* isTypedMethod. Only relevant for methods. */
2143 (DOM_INSTANCE_RESERVED_SLOTS1 + 2) /* Reserved slot index, if we're stored in a slot, else 0. */
2144};
2145static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 2) <= JSJitInfo::maxSlotIndex, "We won't fit");
2146static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 2) < 22, "There is no slot for us");
2147static const JSJitInfo cachedWritableByte_setterinfo = {
2148 { (JSJitGetterOp)set_cachedWritableByte },
2149 { prototypes::id::TestExampleInterface },
2150 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2151 JSJitInfo::Setter,
2152 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2153 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2154 false, /* isInfallible. False in setters. */
2155 false, /* isMovable. Not relevant for setters. */
2156 false, /* isEliminatable. Not relevant for setters. */
2157 false, /* isAlwaysInSlot. Only relevant for getters. */
2158 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2159 false, /* isTypedMethod. Only relevant for methods. */
2160 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2161};
2162
2163MOZ_CAN_RUN_SCRIPT static bool
2164get_sideEffectFreeByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2165{
2166 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2169( cx, "TestExampleInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2167 "TestExampleInterface", "sideEffectFreeByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2169( cx, "TestExampleInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2168 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2169( cx, "TestExampleInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2169 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2169( cx, "TestExampleInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2170
2171 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2172 int8_t result(MOZ_KnownLive(self)(self)->SideEffectFreeByte());
2173 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2173); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2173; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2174 args.rval().setInt32(int32_t(result));
2175 return true;
2176}
2177
2178MOZ_CAN_RUN_SCRIPT static bool
2179set_sideEffectFreeByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
2180{
2181 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2184( cx, "TestExampleInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2182 "TestExampleInterface", "sideEffectFreeByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2184( cx, "TestExampleInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2183 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject2184( cx, "TestExampleInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2184 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2184( cx, "TestExampleInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2185
2186 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2187 int8_t arg0;
2188 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
2189 return false;
2190 }
2191 // NOTE: This assert does NOT call the function.
2192 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetSideEffectFreeByte(arg0))>, "Should be returning void here");
2193 MOZ_KnownLive(self)(self)->SetSideEffectFreeByte(arg0);
2194 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2194); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2194; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2195
2196 return true;
2197}
2198
2199static const JSJitInfo sideEffectFreeByte_getterinfo = {
2200 { get_sideEffectFreeByte },
2201 { prototypes::id::TestExampleInterface },
2202 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2203 JSJitInfo::Getter,
2204 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2205 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2206 true, /* isInfallible. False in setters. */
2207 false, /* isMovable. Not relevant for setters. */
2208 false, /* isEliminatable. Not relevant for setters. */
2209 false, /* isAlwaysInSlot. Only relevant for getters. */
2210 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2211 false, /* isTypedMethod. Only relevant for methods. */
2212 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2213};
2214static const JSJitInfo sideEffectFreeByte_setterinfo = {
2215 { (JSJitGetterOp)set_sideEffectFreeByte },
2216 { prototypes::id::TestExampleInterface },
2217 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2218 JSJitInfo::Setter,
2219 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2220 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2221 false, /* isInfallible. False in setters. */
2222 false, /* isMovable. Not relevant for setters. */
2223 false, /* isEliminatable. Not relevant for setters. */
2224 false, /* isAlwaysInSlot. Only relevant for getters. */
2225 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2226 false, /* isTypedMethod. Only relevant for methods. */
2227 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2228};
2229
2230MOZ_CAN_RUN_SCRIPT static bool
2231get_domDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2232{
2233 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2236( cx, "TestExampleInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2234 "TestExampleInterface", "domDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2236( cx, "TestExampleInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2235 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2236( cx, "TestExampleInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2236 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2236( cx, "TestExampleInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2237
2238 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2239 int8_t result(MOZ_KnownLive(self)(self)->DomDependentByte());
2240 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2240); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2240; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2241 args.rval().setInt32(int32_t(result));
2242 return true;
2243}
2244
2245MOZ_CAN_RUN_SCRIPT static bool
2246set_domDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
2247{
2248 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2251( cx, "TestExampleInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2249 "TestExampleInterface", "domDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2251( cx, "TestExampleInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2250 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject2251( cx, "TestExampleInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2251 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2251( cx, "TestExampleInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2252
2253 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2254 int8_t arg0;
2255 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
2256 return false;
2257 }
2258 // NOTE: This assert does NOT call the function.
2259 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetDomDependentByte(arg0))>, "Should be returning void here");
2260 MOZ_KnownLive(self)(self)->SetDomDependentByte(arg0);
2261 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2261); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2261; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2262
2263 return true;
2264}
2265
2266static const JSJitInfo domDependentByte_getterinfo = {
2267 { get_domDependentByte },
2268 { prototypes::id::TestExampleInterface },
2269 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2270 JSJitInfo::Getter,
2271 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
2272 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2273 true, /* isInfallible. False in setters. */
2274 true, /* isMovable. Not relevant for setters. */
2275 true, /* isEliminatable. Not relevant for setters. */
2276 false, /* isAlwaysInSlot. Only relevant for getters. */
2277 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2278 false, /* isTypedMethod. Only relevant for methods. */
2279 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2280};
2281static const JSJitInfo domDependentByte_setterinfo = {
2282 { (JSJitGetterOp)set_domDependentByte },
2283 { prototypes::id::TestExampleInterface },
2284 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2285 JSJitInfo::Setter,
2286 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2287 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2288 false, /* isInfallible. False in setters. */
2289 false, /* isMovable. Not relevant for setters. */
2290 false, /* isEliminatable. Not relevant for setters. */
2291 false, /* isAlwaysInSlot. Only relevant for getters. */
2292 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2293 false, /* isTypedMethod. Only relevant for methods. */
2294 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2295};
2296
2297MOZ_CAN_RUN_SCRIPT static bool
2298get_constantByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2299{
2300 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2303( cx, "TestExampleInterface"
, "constantByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2301 "TestExampleInterface", "constantByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2303( cx, "TestExampleInterface"
, "constantByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2302 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2303( cx, "TestExampleInterface"
, "constantByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2303 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2303( cx, "TestExampleInterface"
, "constantByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2304
2305 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2306 int8_t result(MOZ_KnownLive(self)(self)->ConstantByte());
2307 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2307); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2307; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2308 args.rval().setInt32(int32_t(result));
2309 return true;
2310}
2311
2312static const JSJitInfo constantByte_getterinfo = {
2313 { get_constantByte },
2314 { prototypes::id::TestExampleInterface },
2315 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2316 JSJitInfo::Getter,
2317 JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */
2318 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2319 true, /* isInfallible. False in setters. */
2320 true, /* isMovable. Not relevant for setters. */
2321 true, /* isEliminatable. Not relevant for setters. */
2322 false, /* isAlwaysInSlot. Only relevant for getters. */
2323 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2324 false, /* isTypedMethod. Only relevant for methods. */
2325 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2326};
2327
2328MOZ_CAN_RUN_SCRIPT static bool
2329get_deviceStateDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2330{
2331 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2334( cx, "TestExampleInterface"
, "deviceStateDependentByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2332 "TestExampleInterface", "deviceStateDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2334( cx, "TestExampleInterface"
, "deviceStateDependentByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2333 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2334( cx, "TestExampleInterface"
, "deviceStateDependentByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2334 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2334( cx, "TestExampleInterface"
, "deviceStateDependentByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
2335
2336 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2337 int8_t result(MOZ_KnownLive(self)(self)->DeviceStateDependentByte());
2338 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2338); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2338; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2339 args.rval().setInt32(int32_t(result));
2340 return true;
2341}
2342
2343static const JSJitInfo deviceStateDependentByte_getterinfo = {
2344 { get_deviceStateDependentByte },
2345 { prototypes::id::TestExampleInterface },
2346 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2347 JSJitInfo::Getter,
2348 JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */
2349 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2350 true, /* isInfallible. False in setters. */
2351 false, /* isMovable. Not relevant for setters. */
2352 true, /* isEliminatable. Not relevant for setters. */
2353 false, /* isAlwaysInSlot. Only relevant for getters. */
2354 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2355 false, /* isTypedMethod. Only relevant for methods. */
2356 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2357};
2358
2359MOZ_CAN_RUN_SCRIPT static bool
2360returnByteSideEffectFree(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2361{
2362 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2365( cx, "TestExampleInterface"
, "returnByteSideEffectFree", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2363 "TestExampleInterface", "returnByteSideEffectFree", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2365( cx, "TestExampleInterface"
, "returnByteSideEffectFree", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2364 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2365( cx, "TestExampleInterface"
, "returnByteSideEffectFree", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2365 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2365( cx, "TestExampleInterface"
, "returnByteSideEffectFree", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
2366
2367 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2368 int8_t result(MOZ_KnownLive(self)(self)->ReturnByteSideEffectFree());
2369 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2369); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2369; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2370 args.rval().setInt32(int32_t(result));
2371 return true;
2372}
2373
2374static const JSJitInfo::ArgType returnByteSideEffectFree_methodinfo_argTypes[] = { JSJitInfo::ArgTypeListEnd };
2375static const JSTypedMethodJitInfo returnByteSideEffectFree_methodinfo = {
2376 {
2377 { (JSJitGetterOp)returnByteSideEffectFree },
2378 { prototypes::id::TestExampleInterface },
2379 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2380 JSJitInfo::Method,
2381 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2382 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2383 true, /* isInfallible. False in setters. */
2384 false, /* isMovable. Not relevant for setters. */
2385 false, /* isEliminatable. Not relevant for setters. */
2386 false, /* isAlwaysInSlot. Only relevant for getters. */
2387 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2388 true, /* isTypedMethod. Only relevant for methods. */
2389 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2390 },
2391 returnByteSideEffectFree_methodinfo_argTypes
2392};
2393
2394MOZ_CAN_RUN_SCRIPT static bool
2395returnDOMDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2396{
2397 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2400( cx, "TestExampleInterface"
, "returnDOMDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2398 "TestExampleInterface", "returnDOMDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2400( cx, "TestExampleInterface"
, "returnDOMDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2399 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2400( cx, "TestExampleInterface"
, "returnDOMDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2400 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2400( cx, "TestExampleInterface"
, "returnDOMDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2401
2402 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2403 int8_t result(MOZ_KnownLive(self)(self)->ReturnDOMDependentByte());
2404 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2404); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2404; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2405 args.rval().setInt32(int32_t(result));
2406 return true;
2407}
2408
2409static const JSJitInfo::ArgType returnDOMDependentByte_methodinfo_argTypes[] = { JSJitInfo::ArgTypeListEnd };
2410static const JSTypedMethodJitInfo returnDOMDependentByte_methodinfo = {
2411 {
2412 { (JSJitGetterOp)returnDOMDependentByte },
2413 { prototypes::id::TestExampleInterface },
2414 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2415 JSJitInfo::Method,
2416 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
2417 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2418 true, /* isInfallible. False in setters. */
2419 true, /* isMovable. Not relevant for setters. */
2420 true, /* isEliminatable. Not relevant for setters. */
2421 false, /* isAlwaysInSlot. Only relevant for getters. */
2422 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2423 true, /* isTypedMethod. Only relevant for methods. */
2424 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2425 },
2426 returnDOMDependentByte_methodinfo_argTypes
2427};
2428
2429MOZ_CAN_RUN_SCRIPT static bool
2430returnConstantByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2431{
2432 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2435( cx, "TestExampleInterface"
, "returnConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2433 "TestExampleInterface", "returnConstantByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2435( cx, "TestExampleInterface"
, "returnConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2434 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2435( cx, "TestExampleInterface"
, "returnConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2435 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2435( cx, "TestExampleInterface"
, "returnConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2436
2437 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2438 int8_t result(MOZ_KnownLive(self)(self)->ReturnConstantByte());
2439 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2439); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2439; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2440 args.rval().setInt32(int32_t(result));
2441 return true;
2442}
2443
2444static const JSJitInfo::ArgType returnConstantByte_methodinfo_argTypes[] = { JSJitInfo::ArgTypeListEnd };
2445static const JSTypedMethodJitInfo returnConstantByte_methodinfo = {
2446 {
2447 { (JSJitGetterOp)returnConstantByte },
2448 { prototypes::id::TestExampleInterface },
2449 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2450 JSJitInfo::Method,
2451 JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */
2452 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2453 true, /* isInfallible. False in setters. */
2454 true, /* isMovable. Not relevant for setters. */
2455 true, /* isEliminatable. Not relevant for setters. */
2456 false, /* isAlwaysInSlot. Only relevant for getters. */
2457 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2458 true, /* isTypedMethod. Only relevant for methods. */
2459 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2460 },
2461 returnConstantByte_methodinfo_argTypes
2462};
2463
2464MOZ_CAN_RUN_SCRIPT static bool
2465returnDeviceStateDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2466{
2467 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2470( cx, "TestExampleInterface"
, "returnDeviceStateDependentByte", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2468 "TestExampleInterface", "returnDeviceStateDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2470( cx, "TestExampleInterface"
, "returnDeviceStateDependentByte", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2469 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2470( cx, "TestExampleInterface"
, "returnDeviceStateDependentByte", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2470 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2470( cx, "TestExampleInterface"
, "returnDeviceStateDependentByte", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
2471
2472 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2473 int8_t result(MOZ_KnownLive(self)(self)->ReturnDeviceStateDependentByte());
2474 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2474); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2474; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2475 args.rval().setInt32(int32_t(result));
2476 return true;
2477}
2478
2479static const JSJitInfo::ArgType returnDeviceStateDependentByte_methodinfo_argTypes[] = { JSJitInfo::ArgTypeListEnd };
2480static const JSTypedMethodJitInfo returnDeviceStateDependentByte_methodinfo = {
2481 {
2482 { (JSJitGetterOp)returnDeviceStateDependentByte },
2483 { prototypes::id::TestExampleInterface },
2484 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2485 JSJitInfo::Method,
2486 JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */
2487 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2488 true, /* isInfallible. False in setters. */
2489 false, /* isMovable. Not relevant for setters. */
2490 true, /* isEliminatable. Not relevant for setters. */
2491 false, /* isAlwaysInSlot. Only relevant for getters. */
2492 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2493 true, /* isTypedMethod. Only relevant for methods. */
2494 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2495 },
2496 returnDeviceStateDependentByte_methodinfo_argTypes
2497};
2498
2499MOZ_CAN_RUN_SCRIPT static bool
2500get_readonlyShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2501{
2502 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2505( cx, "TestExampleInterface"
, "readonlyShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2503 "TestExampleInterface", "readonlyShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2505( cx, "TestExampleInterface"
, "readonlyShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2504 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2505( cx, "TestExampleInterface"
, "readonlyShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2505 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2505( cx, "TestExampleInterface"
, "readonlyShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2506
2507 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2508 int16_t result(MOZ_KnownLive(self)(self)->ReadonlyShort());
2509 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2509); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2509; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2510 args.rval().setInt32(int32_t(result));
2511 return true;
2512}
2513
2514static const JSJitInfo readonlyShort_getterinfo = {
2515 { get_readonlyShort },
2516 { prototypes::id::TestExampleInterface },
2517 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2518 JSJitInfo::Getter,
2519 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2520 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2521 true, /* isInfallible. False in setters. */
2522 false, /* isMovable. Not relevant for setters. */
2523 false, /* isEliminatable. Not relevant for setters. */
2524 false, /* isAlwaysInSlot. Only relevant for getters. */
2525 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2526 false, /* isTypedMethod. Only relevant for methods. */
2527 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2528};
2529
2530MOZ_CAN_RUN_SCRIPT static bool
2531get_writableShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2532{
2533 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2536( cx, "TestExampleInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2534 "TestExampleInterface", "writableShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2536( cx, "TestExampleInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2535 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2536( cx, "TestExampleInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2536 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2536( cx, "TestExampleInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2537
2538 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2539 int16_t result(MOZ_KnownLive(self)(self)->WritableShort());
2540 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2540); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2540; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2541 args.rval().setInt32(int32_t(result));
2542 return true;
2543}
2544
2545MOZ_CAN_RUN_SCRIPT static bool
2546set_writableShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
2547{
2548 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2551( cx, "TestExampleInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2549 "TestExampleInterface", "writableShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2551( cx, "TestExampleInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2550 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject2551( cx, "TestExampleInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2551 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2551( cx, "TestExampleInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2552
2553 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2554 int16_t arg0;
2555 if (!ValueToPrimitive<int16_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
2556 return false;
2557 }
2558 // NOTE: This assert does NOT call the function.
2559 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableShort(arg0))>, "Should be returning void here");
2560 MOZ_KnownLive(self)(self)->SetWritableShort(arg0);
2561 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2561); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2561; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2562
2563 return true;
2564}
2565
2566static const JSJitInfo writableShort_getterinfo = {
2567 { get_writableShort },
2568 { prototypes::id::TestExampleInterface },
2569 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2570 JSJitInfo::Getter,
2571 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2572 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2573 true, /* isInfallible. False in setters. */
2574 false, /* isMovable. Not relevant for setters. */
2575 false, /* isEliminatable. Not relevant for setters. */
2576 false, /* isAlwaysInSlot. Only relevant for getters. */
2577 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2578 false, /* isTypedMethod. Only relevant for methods. */
2579 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2580};
2581static const JSJitInfo writableShort_setterinfo = {
2582 { (JSJitGetterOp)set_writableShort },
2583 { prototypes::id::TestExampleInterface },
2584 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2585 JSJitInfo::Setter,
2586 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2587 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2588 false, /* isInfallible. False in setters. */
2589 false, /* isMovable. Not relevant for setters. */
2590 false, /* isEliminatable. Not relevant for setters. */
2591 false, /* isAlwaysInSlot. Only relevant for getters. */
2592 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2593 false, /* isTypedMethod. Only relevant for methods. */
2594 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2595};
2596
2597MOZ_CAN_RUN_SCRIPT static bool
2598passShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2599{
2600 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2603( cx, "TestExampleInterface"
, "passShort", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
2601 "TestExampleInterface", "passShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2603( cx, "TestExampleInterface"
, "passShort", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
2602 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2603( cx, "TestExampleInterface"
, "passShort", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
2603 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2603( cx, "TestExampleInterface"
, "passShort", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
2604
2605 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2606 if (!args.requireAtLeast(cx, "TestExampleInterface.passShort", 1)) {
2607 return false;
2608 }
2609 int16_t arg0;
2610 if (!ValueToPrimitive<int16_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
2611 return false;
2612 }
2613 // NOTE: This assert does NOT call the function.
2614 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassShort(arg0))>, "Should be returning void here");
2615 MOZ_KnownLive(self)(self)->PassShort(arg0);
2616 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2616); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2616; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2617 args.rval().setUndefined();
2618 return true;
2619}
2620
2621static const JSJitInfo passShort_methodinfo = {
2622 { (JSJitGetterOp)passShort },
2623 { prototypes::id::TestExampleInterface },
2624 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2625 JSJitInfo::Method,
2626 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2627 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2628 false, /* isInfallible. False in setters. */
2629 false, /* isMovable. Not relevant for setters. */
2630 false, /* isEliminatable. Not relevant for setters. */
2631 false, /* isAlwaysInSlot. Only relevant for getters. */
2632 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2633 false, /* isTypedMethod. Only relevant for methods. */
2634 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2635};
2636
2637MOZ_CAN_RUN_SCRIPT static bool
2638receiveShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2639{
2640 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2643( cx, "TestExampleInterface"
, "receiveShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2641 "TestExampleInterface", "receiveShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2643( cx, "TestExampleInterface"
, "receiveShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2642 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2643( cx, "TestExampleInterface"
, "receiveShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2643 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2643( cx, "TestExampleInterface"
, "receiveShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2644
2645 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2646 int16_t result(MOZ_KnownLive(self)(self)->ReceiveShort());
2647 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2647); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2647; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2648 args.rval().setInt32(int32_t(result));
2649 return true;
2650}
2651
2652static const JSJitInfo receiveShort_methodinfo = {
2653 { (JSJitGetterOp)receiveShort },
2654 { prototypes::id::TestExampleInterface },
2655 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2656 JSJitInfo::Method,
2657 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2658 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2659 true, /* isInfallible. False in setters. */
2660 false, /* isMovable. Not relevant for setters. */
2661 false, /* isEliminatable. Not relevant for setters. */
2662 false, /* isAlwaysInSlot. Only relevant for getters. */
2663 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2664 false, /* isTypedMethod. Only relevant for methods. */
2665 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2666};
2667
2668MOZ_CAN_RUN_SCRIPT static bool
2669passOptionalShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2670{
2671 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2674( cx, "TestExampleInterface"
, "passOptionalShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2672 "TestExampleInterface", "passOptionalShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2674( cx, "TestExampleInterface"
, "passOptionalShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2673 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2674( cx, "TestExampleInterface"
, "passOptionalShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2674 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2674( cx, "TestExampleInterface"
, "passOptionalShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2675
2676 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2677 Optional<int16_t> arg0;
2678 if (args.hasDefined(0)) {
2679 arg0.Construct();
2680 if (!ValueToPrimitive<int16_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
2681 return false;
2682 }
2683 }
2684 // NOTE: This assert does NOT call the function.
2685 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalShort(Constify(arg0)))>, "Should be returning void here");
2686 MOZ_KnownLive(self)(self)->PassOptionalShort(Constify(arg0));
2687 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2687); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2687; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2688 args.rval().setUndefined();
2689 return true;
2690}
2691
2692static const JSJitInfo passOptionalShort_methodinfo = {
2693 { (JSJitGetterOp)passOptionalShort },
2694 { prototypes::id::TestExampleInterface },
2695 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2696 JSJitInfo::Method,
2697 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2698 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2699 false, /* isInfallible. False in setters. */
2700 false, /* isMovable. Not relevant for setters. */
2701 false, /* isEliminatable. Not relevant for setters. */
2702 false, /* isAlwaysInSlot. Only relevant for getters. */
2703 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2704 false, /* isTypedMethod. Only relevant for methods. */
2705 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2706};
2707
2708MOZ_CAN_RUN_SCRIPT static bool
2709passOptionalShortWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2710{
2711 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2714( cx, "TestExampleInterface"
, "passOptionalShortWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2712 "TestExampleInterface", "passOptionalShortWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2714( cx, "TestExampleInterface"
, "passOptionalShortWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2713 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2714( cx, "TestExampleInterface"
, "passOptionalShortWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2714 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2714( cx, "TestExampleInterface"
, "passOptionalShortWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
2715
2716 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2717 int16_t arg0;
2718 if (args.hasDefined(0)) {
2719 if (!ValueToPrimitive<int16_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
2720 return false;
2721 }
2722 } else {
2723 arg0 = 5;
2724 }
2725 // NOTE: This assert does NOT call the function.
2726 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalShortWithDefault(arg0))>, "Should be returning void here");
2727 MOZ_KnownLive(self)(self)->PassOptionalShortWithDefault(arg0);
2728 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2728); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2728; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2729 args.rval().setUndefined();
2730 return true;
2731}
2732
2733static const JSJitInfo passOptionalShortWithDefault_methodinfo = {
2734 { (JSJitGetterOp)passOptionalShortWithDefault },
2735 { prototypes::id::TestExampleInterface },
2736 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2737 JSJitInfo::Method,
2738 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2739 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2740 false, /* isInfallible. False in setters. */
2741 false, /* isMovable. Not relevant for setters. */
2742 false, /* isEliminatable. Not relevant for setters. */
2743 false, /* isAlwaysInSlot. Only relevant for getters. */
2744 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2745 false, /* isTypedMethod. Only relevant for methods. */
2746 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2747};
2748
2749MOZ_CAN_RUN_SCRIPT static bool
2750get_readonlyLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2751{
2752 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2755( cx, "TestExampleInterface"
, "readonlyLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2753 "TestExampleInterface", "readonlyLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2755( cx, "TestExampleInterface"
, "readonlyLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2754 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2755( cx, "TestExampleInterface"
, "readonlyLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2755 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2755( cx, "TestExampleInterface"
, "readonlyLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2756
2757 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2758 int32_t result(MOZ_KnownLive(self)(self)->ReadonlyLong());
2759 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2759); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2759; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2760 args.rval().setInt32(int32_t(result));
2761 return true;
2762}
2763
2764static const JSJitInfo readonlyLong_getterinfo = {
2765 { get_readonlyLong },
2766 { prototypes::id::TestExampleInterface },
2767 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2768 JSJitInfo::Getter,
2769 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2770 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2771 true, /* isInfallible. False in setters. */
2772 false, /* isMovable. Not relevant for setters. */
2773 false, /* isEliminatable. Not relevant for setters. */
2774 false, /* isAlwaysInSlot. Only relevant for getters. */
2775 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2776 false, /* isTypedMethod. Only relevant for methods. */
2777 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2778};
2779
2780MOZ_CAN_RUN_SCRIPT static bool
2781get_writableLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2782{
2783 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2786( cx, "TestExampleInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2784 "TestExampleInterface", "writableLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2786( cx, "TestExampleInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2785 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2786( cx, "TestExampleInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2786 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2786( cx, "TestExampleInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2787
2788 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2789 int32_t result(MOZ_KnownLive(self)(self)->WritableLong());
2790 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2790); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2790; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2791 args.rval().setInt32(int32_t(result));
2792 return true;
2793}
2794
2795MOZ_CAN_RUN_SCRIPT static bool
2796set_writableLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
2797{
2798 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2801( cx, "TestExampleInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2799 "TestExampleInterface", "writableLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2801( cx, "TestExampleInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2800 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject2801( cx, "TestExampleInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2801 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2801( cx, "TestExampleInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2802
2803 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2804 int32_t arg0;
2805 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
2806 return false;
2807 }
2808 // NOTE: This assert does NOT call the function.
2809 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableLong(arg0))>, "Should be returning void here");
2810 MOZ_KnownLive(self)(self)->SetWritableLong(arg0);
2811 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2811); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2811; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2812
2813 return true;
2814}
2815
2816static const JSJitInfo writableLong_getterinfo = {
2817 { get_writableLong },
2818 { prototypes::id::TestExampleInterface },
2819 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2820 JSJitInfo::Getter,
2821 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2822 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2823 true, /* isInfallible. False in setters. */
2824 false, /* isMovable. Not relevant for setters. */
2825 false, /* isEliminatable. Not relevant for setters. */
2826 false, /* isAlwaysInSlot. Only relevant for getters. */
2827 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2828 false, /* isTypedMethod. Only relevant for methods. */
2829 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2830};
2831static const JSJitInfo writableLong_setterinfo = {
2832 { (JSJitGetterOp)set_writableLong },
2833 { prototypes::id::TestExampleInterface },
2834 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2835 JSJitInfo::Setter,
2836 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2837 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2838 false, /* isInfallible. False in setters. */
2839 false, /* isMovable. Not relevant for setters. */
2840 false, /* isEliminatable. Not relevant for setters. */
2841 false, /* isAlwaysInSlot. Only relevant for getters. */
2842 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2843 false, /* isTypedMethod. Only relevant for methods. */
2844 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2845};
2846
2847MOZ_CAN_RUN_SCRIPT static bool
2848passLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2849{
2850 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2853( cx, "TestExampleInterface"
, "passLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
2851 "TestExampleInterface", "passLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2853( cx, "TestExampleInterface"
, "passLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
2852 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2853( cx, "TestExampleInterface"
, "passLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
2853 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2853( cx, "TestExampleInterface"
, "passLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
2854
2855 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2856 if (!args.requireAtLeast(cx, "TestExampleInterface.passLong", 1)) {
2857 return false;
2858 }
2859 int32_t arg0;
2860 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
2861 return false;
2862 }
2863 // NOTE: This assert does NOT call the function.
2864 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassLong(arg0))>, "Should be returning void here");
2865 MOZ_KnownLive(self)(self)->PassLong(arg0);
2866 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2866); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2866; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2867 args.rval().setUndefined();
2868 return true;
2869}
2870
2871static const JSJitInfo passLong_methodinfo = {
2872 { (JSJitGetterOp)passLong },
2873 { prototypes::id::TestExampleInterface },
2874 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2875 JSJitInfo::Method,
2876 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2877 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2878 false, /* isInfallible. False in setters. */
2879 false, /* isMovable. Not relevant for setters. */
2880 false, /* isEliminatable. Not relevant for setters. */
2881 false, /* isAlwaysInSlot. Only relevant for getters. */
2882 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2883 false, /* isTypedMethod. Only relevant for methods. */
2884 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2885};
2886
2887MOZ_CAN_RUN_SCRIPT static bool
2888receiveLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2889{
2890 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2893( cx, "TestExampleInterface"
, "receiveLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2891 "TestExampleInterface", "receiveLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2893( cx, "TestExampleInterface"
, "receiveLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2892 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2893( cx, "TestExampleInterface"
, "receiveLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2893 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2893( cx, "TestExampleInterface"
, "receiveLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2894
2895 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2896 int32_t result(MOZ_KnownLive(self)(self)->ReceiveLong());
2897 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2897); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2897; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2898 args.rval().setInt32(int32_t(result));
2899 return true;
2900}
2901
2902static const JSJitInfo receiveLong_methodinfo = {
2903 { (JSJitGetterOp)receiveLong },
2904 { prototypes::id::TestExampleInterface },
2905 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2906 JSJitInfo::Method,
2907 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2908 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2909 true, /* isInfallible. False in setters. */
2910 false, /* isMovable. Not relevant for setters. */
2911 false, /* isEliminatable. Not relevant for setters. */
2912 false, /* isAlwaysInSlot. Only relevant for getters. */
2913 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2914 false, /* isTypedMethod. Only relevant for methods. */
2915 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2916};
2917
2918MOZ_CAN_RUN_SCRIPT static bool
2919passOptionalLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2920{
2921 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2924( cx, "TestExampleInterface"
, "passOptionalLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2922 "TestExampleInterface", "passOptionalLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2924( cx, "TestExampleInterface"
, "passOptionalLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2923 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2924( cx, "TestExampleInterface"
, "passOptionalLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2924 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2924( cx, "TestExampleInterface"
, "passOptionalLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2925
2926 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2927 Optional<int32_t> arg0;
2928 if (args.hasDefined(0)) {
2929 arg0.Construct();
2930 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
2931 return false;
2932 }
2933 }
2934 // NOTE: This assert does NOT call the function.
2935 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalLong(Constify(arg0)))>, "Should be returning void here");
2936 MOZ_KnownLive(self)(self)->PassOptionalLong(Constify(arg0));
2937 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2937); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2937; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2938 args.rval().setUndefined();
2939 return true;
2940}
2941
2942static const JSJitInfo passOptionalLong_methodinfo = {
2943 { (JSJitGetterOp)passOptionalLong },
2944 { prototypes::id::TestExampleInterface },
2945 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2946 JSJitInfo::Method,
2947 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2948 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2949 false, /* isInfallible. False in setters. */
2950 false, /* isMovable. Not relevant for setters. */
2951 false, /* isEliminatable. Not relevant for setters. */
2952 false, /* isAlwaysInSlot. Only relevant for getters. */
2953 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2954 false, /* isTypedMethod. Only relevant for methods. */
2955 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2956};
2957
2958MOZ_CAN_RUN_SCRIPT static bool
2959passOptionalLongWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2960{
2961 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2964( cx, "TestExampleInterface"
, "passOptionalLongWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2962 "TestExampleInterface", "passOptionalLongWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2964( cx, "TestExampleInterface"
, "passOptionalLongWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2963 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2964( cx, "TestExampleInterface"
, "passOptionalLongWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2964 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2964( cx, "TestExampleInterface"
, "passOptionalLongWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
2965
2966 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
2967 int32_t arg0;
2968 if (args.hasDefined(0)) {
2969 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
2970 return false;
2971 }
2972 } else {
2973 arg0 = 7;
2974 }
2975 // NOTE: This assert does NOT call the function.
2976 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalLongWithDefault(arg0))>, "Should be returning void here");
2977 MOZ_KnownLive(self)(self)->PassOptionalLongWithDefault(arg0);
2978 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 2978); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2978; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2979 args.rval().setUndefined();
2980 return true;
2981}
2982
2983static const JSJitInfo passOptionalLongWithDefault_methodinfo = {
2984 { (JSJitGetterOp)passOptionalLongWithDefault },
2985 { prototypes::id::TestExampleInterface },
2986 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
2987 JSJitInfo::Method,
2988 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2989 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2990 false, /* isInfallible. False in setters. */
2991 false, /* isMovable. Not relevant for setters. */
2992 false, /* isEliminatable. Not relevant for setters. */
2993 false, /* isAlwaysInSlot. Only relevant for getters. */
2994 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2995 false, /* isTypedMethod. Only relevant for methods. */
2996 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2997};
2998
2999MOZ_CAN_RUN_SCRIPT static bool
3000get_readonlyLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3001{
3002 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3005( cx, "TestExampleInterface"
, "readonlyLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3003 "TestExampleInterface", "readonlyLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3005( cx, "TestExampleInterface"
, "readonlyLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3004 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3005( cx, "TestExampleInterface"
, "readonlyLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3005 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3005( cx, "TestExampleInterface"
, "readonlyLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3006
3007 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3008 int64_t result(MOZ_KnownLive(self)(self)->ReadonlyLongLong());
3009 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3009); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3009; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3010 args.rval().set(JS_NumberValue(double(result)));
3011 return true;
3012}
3013
3014static const JSJitInfo readonlyLongLong_getterinfo = {
3015 { get_readonlyLongLong },
3016 { prototypes::id::TestExampleInterface },
3017 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3018 JSJitInfo::Getter,
3019 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3020 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3021 true, /* isInfallible. False in setters. */
3022 false, /* isMovable. Not relevant for setters. */
3023 false, /* isEliminatable. Not relevant for setters. */
3024 false, /* isAlwaysInSlot. Only relevant for getters. */
3025 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3026 false, /* isTypedMethod. Only relevant for methods. */
3027 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3028};
3029
3030MOZ_CAN_RUN_SCRIPT static bool
3031get_writableLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3032{
3033 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3036( cx, "TestExampleInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3034 "TestExampleInterface", "writableLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3036( cx, "TestExampleInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3035 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3036( cx, "TestExampleInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3036 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3036( cx, "TestExampleInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3037
3038 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3039 int64_t result(MOZ_KnownLive(self)(self)->WritableLongLong());
3040 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3040); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3040; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3041 args.rval().set(JS_NumberValue(double(result)));
3042 return true;
3043}
3044
3045MOZ_CAN_RUN_SCRIPT static bool
3046set_writableLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
3047{
3048 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3051( cx, "TestExampleInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3049 "TestExampleInterface", "writableLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3051( cx, "TestExampleInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3050 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject3051( cx, "TestExampleInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3051 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3051( cx, "TestExampleInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3052
3053 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3054 int64_t arg0;
3055 if (!ValueToPrimitive<int64_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
3056 return false;
3057 }
3058 // NOTE: This assert does NOT call the function.
3059 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableLongLong(arg0))>, "Should be returning void here");
3060 MOZ_KnownLive(self)(self)->SetWritableLongLong(arg0);
3061 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3061); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3061; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3062
3063 return true;
3064}
3065
3066static const JSJitInfo writableLongLong_getterinfo = {
3067 { get_writableLongLong },
3068 { prototypes::id::TestExampleInterface },
3069 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3070 JSJitInfo::Getter,
3071 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3072 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3073 true, /* isInfallible. False in setters. */
3074 false, /* isMovable. Not relevant for setters. */
3075 false, /* isEliminatable. Not relevant for setters. */
3076 false, /* isAlwaysInSlot. Only relevant for getters. */
3077 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3078 false, /* isTypedMethod. Only relevant for methods. */
3079 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3080};
3081static const JSJitInfo writableLongLong_setterinfo = {
3082 { (JSJitGetterOp)set_writableLongLong },
3083 { prototypes::id::TestExampleInterface },
3084 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3085 JSJitInfo::Setter,
3086 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3087 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3088 false, /* isInfallible. False in setters. */
3089 false, /* isMovable. Not relevant for setters. */
3090 false, /* isEliminatable. Not relevant for setters. */
3091 false, /* isAlwaysInSlot. Only relevant for getters. */
3092 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3093 false, /* isTypedMethod. Only relevant for methods. */
3094 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3095};
3096
3097MOZ_CAN_RUN_SCRIPT static bool
3098passLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3099{
3100 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3103( cx, "TestExampleInterface"
, "passLongLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3101 "TestExampleInterface", "passLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3103( cx, "TestExampleInterface"
, "passLongLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3102 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3103( cx, "TestExampleInterface"
, "passLongLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3103 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3103( cx, "TestExampleInterface"
, "passLongLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3104
3105 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3106 if (!args.requireAtLeast(cx, "TestExampleInterface.passLongLong", 1)) {
3107 return false;
3108 }
3109 int64_t arg0;
3110 if (!ValueToPrimitive<int64_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3111 return false;
3112 }
3113 // NOTE: This assert does NOT call the function.
3114 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassLongLong(arg0))>, "Should be returning void here");
3115 MOZ_KnownLive(self)(self)->PassLongLong(arg0);
3116 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3116); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3116; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3117 args.rval().setUndefined();
3118 return true;
3119}
3120
3121static const JSJitInfo passLongLong_methodinfo = {
3122 { (JSJitGetterOp)passLongLong },
3123 { prototypes::id::TestExampleInterface },
3124 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3125 JSJitInfo::Method,
3126 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3127 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3128 false, /* isInfallible. False in setters. */
3129 false, /* isMovable. Not relevant for setters. */
3130 false, /* isEliminatable. Not relevant for setters. */
3131 false, /* isAlwaysInSlot. Only relevant for getters. */
3132 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3133 false, /* isTypedMethod. Only relevant for methods. */
3134 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3135};
3136
3137MOZ_CAN_RUN_SCRIPT static bool
3138receiveLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3139{
3140 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3143( cx, "TestExampleInterface"
, "receiveLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3141 "TestExampleInterface", "receiveLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3143( cx, "TestExampleInterface"
, "receiveLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3142 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3143( cx, "TestExampleInterface"
, "receiveLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3143 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3143( cx, "TestExampleInterface"
, "receiveLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3144
3145 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3146 int64_t result(MOZ_KnownLive(self)(self)->ReceiveLongLong());
3147 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3147); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3147; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3148 args.rval().set(JS_NumberValue(double(result)));
3149 return true;
3150}
3151
3152static const JSJitInfo receiveLongLong_methodinfo = {
3153 { (JSJitGetterOp)receiveLongLong },
3154 { prototypes::id::TestExampleInterface },
3155 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3156 JSJitInfo::Method,
3157 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3158 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3159 true, /* isInfallible. False in setters. */
3160 false, /* isMovable. Not relevant for setters. */
3161 false, /* isEliminatable. Not relevant for setters. */
3162 false, /* isAlwaysInSlot. Only relevant for getters. */
3163 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3164 false, /* isTypedMethod. Only relevant for methods. */
3165 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3166};
3167
3168MOZ_CAN_RUN_SCRIPT static bool
3169passOptionalLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3170{
3171 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3174( cx, "TestExampleInterface"
, "passOptionalLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3172 "TestExampleInterface", "passOptionalLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3174( cx, "TestExampleInterface"
, "passOptionalLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3173 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3174( cx, "TestExampleInterface"
, "passOptionalLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3174 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3174( cx, "TestExampleInterface"
, "passOptionalLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3175
3176 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3177 Optional<int64_t> arg0;
3178 if (args.hasDefined(0)) {
3179 arg0.Construct();
3180 if (!ValueToPrimitive<int64_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
3181 return false;
3182 }
3183 }
3184 // NOTE: This assert does NOT call the function.
3185 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalLongLong(Constify(arg0)))>, "Should be returning void here");
3186 MOZ_KnownLive(self)(self)->PassOptionalLongLong(Constify(arg0));
3187 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3187); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3187; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3188 args.rval().setUndefined();
3189 return true;
3190}
3191
3192static const JSJitInfo passOptionalLongLong_methodinfo = {
3193 { (JSJitGetterOp)passOptionalLongLong },
3194 { prototypes::id::TestExampleInterface },
3195 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3196 JSJitInfo::Method,
3197 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3198 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3199 false, /* isInfallible. False in setters. */
3200 false, /* isMovable. Not relevant for setters. */
3201 false, /* isEliminatable. Not relevant for setters. */
3202 false, /* isAlwaysInSlot. Only relevant for getters. */
3203 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3204 false, /* isTypedMethod. Only relevant for methods. */
3205 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3206};
3207
3208MOZ_CAN_RUN_SCRIPT static bool
3209passOptionalLongLongWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3210{
3211 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3214( cx, "TestExampleInterface"
, "passOptionalLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3212 "TestExampleInterface", "passOptionalLongLongWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3214( cx, "TestExampleInterface"
, "passOptionalLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3213 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3214( cx, "TestExampleInterface"
, "passOptionalLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3214 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3214( cx, "TestExampleInterface"
, "passOptionalLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3215
3216 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3217 int64_t arg0;
3218 if (args.hasDefined(0)) {
3219 if (!ValueToPrimitive<int64_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3220 return false;
3221 }
3222 } else {
3223 arg0 = -12LL;
3224 }
3225 // NOTE: This assert does NOT call the function.
3226 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalLongLongWithDefault(arg0))>, "Should be returning void here");
3227 MOZ_KnownLive(self)(self)->PassOptionalLongLongWithDefault(arg0);
3228 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3228); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3228; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3229 args.rval().setUndefined();
3230 return true;
3231}
3232
3233static const JSJitInfo passOptionalLongLongWithDefault_methodinfo = {
3234 { (JSJitGetterOp)passOptionalLongLongWithDefault },
3235 { prototypes::id::TestExampleInterface },
3236 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3237 JSJitInfo::Method,
3238 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3239 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3240 false, /* isInfallible. False in setters. */
3241 false, /* isMovable. Not relevant for setters. */
3242 false, /* isEliminatable. Not relevant for setters. */
3243 false, /* isAlwaysInSlot. Only relevant for getters. */
3244 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3245 false, /* isTypedMethod. Only relevant for methods. */
3246 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3247};
3248
3249MOZ_CAN_RUN_SCRIPT static bool
3250get_readonlyOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3251{
3252 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3255( cx, "TestExampleInterface"
, "readonlyOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3253 "TestExampleInterface", "readonlyOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3255( cx, "TestExampleInterface"
, "readonlyOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3254 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3255( cx, "TestExampleInterface"
, "readonlyOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3255 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3255( cx, "TestExampleInterface"
, "readonlyOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3256
3257 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3258 uint8_t result(MOZ_KnownLive(self)(self)->ReadonlyOctet());
3259 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3259); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3259; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3260 args.rval().setInt32(int32_t(result));
3261 return true;
3262}
3263
3264static const JSJitInfo readonlyOctet_getterinfo = {
3265 { get_readonlyOctet },
3266 { prototypes::id::TestExampleInterface },
3267 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3268 JSJitInfo::Getter,
3269 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3270 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
3271 true, /* isInfallible. False in setters. */
3272 false, /* isMovable. Not relevant for setters. */
3273 false, /* isEliminatable. Not relevant for setters. */
3274 false, /* isAlwaysInSlot. Only relevant for getters. */
3275 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3276 false, /* isTypedMethod. Only relevant for methods. */
3277 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3278};
3279
3280MOZ_CAN_RUN_SCRIPT static bool
3281get_writableOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3282{
3283 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3286( cx, "TestExampleInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3284 "TestExampleInterface", "writableOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3286( cx, "TestExampleInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3285 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3286( cx, "TestExampleInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3286 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3286( cx, "TestExampleInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3287
3288 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3289 uint8_t result(MOZ_KnownLive(self)(self)->WritableOctet());
3290 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3290); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3290; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3291 args.rval().setInt32(int32_t(result));
3292 return true;
3293}
3294
3295MOZ_CAN_RUN_SCRIPT static bool
3296set_writableOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
3297{
3298 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3301( cx, "TestExampleInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3299 "TestExampleInterface", "writableOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3301( cx, "TestExampleInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3300 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject3301( cx, "TestExampleInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3301 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3301( cx, "TestExampleInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3302
3303 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3304 uint8_t arg0;
3305 if (!ValueToPrimitive<uint8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
3306 return false;
3307 }
3308 // NOTE: This assert does NOT call the function.
3309 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableOctet(arg0))>, "Should be returning void here");
3310 MOZ_KnownLive(self)(self)->SetWritableOctet(arg0);
3311 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3311); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3311; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3312
3313 return true;
3314}
3315
3316static const JSJitInfo writableOctet_getterinfo = {
3317 { get_writableOctet },
3318 { prototypes::id::TestExampleInterface },
3319 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3320 JSJitInfo::Getter,
3321 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3322 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
3323 true, /* isInfallible. False in setters. */
3324 false, /* isMovable. Not relevant for setters. */
3325 false, /* isEliminatable. Not relevant for setters. */
3326 false, /* isAlwaysInSlot. Only relevant for getters. */
3327 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3328 false, /* isTypedMethod. Only relevant for methods. */
3329 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3330};
3331static const JSJitInfo writableOctet_setterinfo = {
3332 { (JSJitGetterOp)set_writableOctet },
3333 { prototypes::id::TestExampleInterface },
3334 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3335 JSJitInfo::Setter,
3336 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3337 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3338 false, /* isInfallible. False in setters. */
3339 false, /* isMovable. Not relevant for setters. */
3340 false, /* isEliminatable. Not relevant for setters. */
3341 false, /* isAlwaysInSlot. Only relevant for getters. */
3342 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3343 false, /* isTypedMethod. Only relevant for methods. */
3344 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3345};
3346
3347MOZ_CAN_RUN_SCRIPT static bool
3348passOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3349{
3350 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3353( cx, "TestExampleInterface"
, "passOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
3351 "TestExampleInterface", "passOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3353( cx, "TestExampleInterface"
, "passOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
3352 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3353( cx, "TestExampleInterface"
, "passOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
3353 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3353( cx, "TestExampleInterface"
, "passOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
3354
3355 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3356 if (!args.requireAtLeast(cx, "TestExampleInterface.passOctet", 1)) {
3357 return false;
3358 }
3359 uint8_t arg0;
3360 if (!ValueToPrimitive<uint8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3361 return false;
3362 }
3363 // NOTE: This assert does NOT call the function.
3364 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOctet(arg0))>, "Should be returning void here");
3365 MOZ_KnownLive(self)(self)->PassOctet(arg0);
3366 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3366); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3366; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3367 args.rval().setUndefined();
3368 return true;
3369}
3370
3371static const JSJitInfo passOctet_methodinfo = {
3372 { (JSJitGetterOp)passOctet },
3373 { prototypes::id::TestExampleInterface },
3374 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3375 JSJitInfo::Method,
3376 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3377 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3378 false, /* isInfallible. False in setters. */
3379 false, /* isMovable. Not relevant for setters. */
3380 false, /* isEliminatable. Not relevant for setters. */
3381 false, /* isAlwaysInSlot. Only relevant for getters. */
3382 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3383 false, /* isTypedMethod. Only relevant for methods. */
3384 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3385};
3386
3387MOZ_CAN_RUN_SCRIPT static bool
3388receiveOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3389{
3390 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3393( cx, "TestExampleInterface"
, "receiveOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3391 "TestExampleInterface", "receiveOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3393( cx, "TestExampleInterface"
, "receiveOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3392 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3393( cx, "TestExampleInterface"
, "receiveOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3393 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3393( cx, "TestExampleInterface"
, "receiveOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3394
3395 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3396 uint8_t result(MOZ_KnownLive(self)(self)->ReceiveOctet());
3397 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3397); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3397; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3398 args.rval().setInt32(int32_t(result));
3399 return true;
3400}
3401
3402static const JSJitInfo receiveOctet_methodinfo = {
3403 { (JSJitGetterOp)receiveOctet },
3404 { prototypes::id::TestExampleInterface },
3405 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3406 JSJitInfo::Method,
3407 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3408 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
3409 true, /* isInfallible. False in setters. */
3410 false, /* isMovable. Not relevant for setters. */
3411 false, /* isEliminatable. Not relevant for setters. */
3412 false, /* isAlwaysInSlot. Only relevant for getters. */
3413 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3414 false, /* isTypedMethod. Only relevant for methods. */
3415 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3416};
3417
3418MOZ_CAN_RUN_SCRIPT static bool
3419passOptionalOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3420{
3421 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3424( cx, "TestExampleInterface"
, "passOptionalOctet", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3422 "TestExampleInterface", "passOptionalOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3424( cx, "TestExampleInterface"
, "passOptionalOctet", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3423 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3424( cx, "TestExampleInterface"
, "passOptionalOctet", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3424 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3424( cx, "TestExampleInterface"
, "passOptionalOctet", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3425
3426 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3427 Optional<uint8_t> arg0;
3428 if (args.hasDefined(0)) {
3429 arg0.Construct();
3430 if (!ValueToPrimitive<uint8_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
3431 return false;
3432 }
3433 }
3434 // NOTE: This assert does NOT call the function.
3435 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalOctet(Constify(arg0)))>, "Should be returning void here");
3436 MOZ_KnownLive(self)(self)->PassOptionalOctet(Constify(arg0));
3437 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3437); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3437; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3438 args.rval().setUndefined();
3439 return true;
3440}
3441
3442static const JSJitInfo passOptionalOctet_methodinfo = {
3443 { (JSJitGetterOp)passOptionalOctet },
3444 { prototypes::id::TestExampleInterface },
3445 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3446 JSJitInfo::Method,
3447 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3448 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3449 false, /* isInfallible. False in setters. */
3450 false, /* isMovable. Not relevant for setters. */
3451 false, /* isEliminatable. Not relevant for setters. */
3452 false, /* isAlwaysInSlot. Only relevant for getters. */
3453 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3454 false, /* isTypedMethod. Only relevant for methods. */
3455 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3456};
3457
3458MOZ_CAN_RUN_SCRIPT static bool
3459passOptionalOctetWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3460{
3461 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3464( cx, "TestExampleInterface"
, "passOptionalOctetWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3462 "TestExampleInterface", "passOptionalOctetWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3464( cx, "TestExampleInterface"
, "passOptionalOctetWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3463 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3464( cx, "TestExampleInterface"
, "passOptionalOctetWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3464 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3464( cx, "TestExampleInterface"
, "passOptionalOctetWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3465
3466 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3467 uint8_t arg0;
3468 if (args.hasDefined(0)) {
3469 if (!ValueToPrimitive<uint8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3470 return false;
3471 }
3472 } else {
3473 arg0 = 19;
3474 }
3475 // NOTE: This assert does NOT call the function.
3476 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalOctetWithDefault(arg0))>, "Should be returning void here");
3477 MOZ_KnownLive(self)(self)->PassOptionalOctetWithDefault(arg0);
3478 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3478); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3478; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3479 args.rval().setUndefined();
3480 return true;
3481}
3482
3483static const JSJitInfo passOptionalOctetWithDefault_methodinfo = {
3484 { (JSJitGetterOp)passOptionalOctetWithDefault },
3485 { prototypes::id::TestExampleInterface },
3486 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3487 JSJitInfo::Method,
3488 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3489 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3490 false, /* isInfallible. False in setters. */
3491 false, /* isMovable. Not relevant for setters. */
3492 false, /* isEliminatable. Not relevant for setters. */
3493 false, /* isAlwaysInSlot. Only relevant for getters. */
3494 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3495 false, /* isTypedMethod. Only relevant for methods. */
3496 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3497};
3498
3499MOZ_CAN_RUN_SCRIPT static bool
3500get_readonlyUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3501{
3502 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3505( cx, "TestExampleInterface"
, "readonlyUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3503 "TestExampleInterface", "readonlyUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3505( cx, "TestExampleInterface"
, "readonlyUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3504 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3505( cx, "TestExampleInterface"
, "readonlyUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3505 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3505( cx, "TestExampleInterface"
, "readonlyUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3506
3507 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3508 uint16_t result(MOZ_KnownLive(self)(self)->ReadonlyUnsignedShort());
3509 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3509); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3509; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3510 args.rval().setInt32(int32_t(result));
3511 return true;
3512}
3513
3514static const JSJitInfo readonlyUnsignedShort_getterinfo = {
3515 { get_readonlyUnsignedShort },
3516 { prototypes::id::TestExampleInterface },
3517 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3518 JSJitInfo::Getter,
3519 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3520 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
3521 true, /* isInfallible. False in setters. */
3522 false, /* isMovable. Not relevant for setters. */
3523 false, /* isEliminatable. Not relevant for setters. */
3524 false, /* isAlwaysInSlot. Only relevant for getters. */
3525 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3526 false, /* isTypedMethod. Only relevant for methods. */
3527 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3528};
3529
3530MOZ_CAN_RUN_SCRIPT static bool
3531get_writableUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3532{
3533 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3536( cx, "TestExampleInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3534 "TestExampleInterface", "writableUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3536( cx, "TestExampleInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3535 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3536( cx, "TestExampleInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3536 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3536( cx, "TestExampleInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3537
3538 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3539 uint16_t result(MOZ_KnownLive(self)(self)->WritableUnsignedShort());
3540 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3540); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3540; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3541 args.rval().setInt32(int32_t(result));
3542 return true;
3543}
3544
3545MOZ_CAN_RUN_SCRIPT static bool
3546set_writableUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
3547{
3548 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3551( cx, "TestExampleInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3549 "TestExampleInterface", "writableUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3551( cx, "TestExampleInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3550 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject3551( cx, "TestExampleInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3551 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3551( cx, "TestExampleInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3552
3553 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3554 uint16_t arg0;
3555 if (!ValueToPrimitive<uint16_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
3556 return false;
3557 }
3558 // NOTE: This assert does NOT call the function.
3559 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnsignedShort(arg0))>, "Should be returning void here");
3560 MOZ_KnownLive(self)(self)->SetWritableUnsignedShort(arg0);
3561 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3561); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3561; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3562
3563 return true;
3564}
3565
3566static const JSJitInfo writableUnsignedShort_getterinfo = {
3567 { get_writableUnsignedShort },
3568 { prototypes::id::TestExampleInterface },
3569 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3570 JSJitInfo::Getter,
3571 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3572 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
3573 true, /* isInfallible. False in setters. */
3574 false, /* isMovable. Not relevant for setters. */
3575 false, /* isEliminatable. Not relevant for setters. */
3576 false, /* isAlwaysInSlot. Only relevant for getters. */
3577 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3578 false, /* isTypedMethod. Only relevant for methods. */
3579 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3580};
3581static const JSJitInfo writableUnsignedShort_setterinfo = {
3582 { (JSJitGetterOp)set_writableUnsignedShort },
3583 { prototypes::id::TestExampleInterface },
3584 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3585 JSJitInfo::Setter,
3586 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3587 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3588 false, /* isInfallible. False in setters. */
3589 false, /* isMovable. Not relevant for setters. */
3590 false, /* isEliminatable. Not relevant for setters. */
3591 false, /* isAlwaysInSlot. Only relevant for getters. */
3592 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3593 false, /* isTypedMethod. Only relevant for methods. */
3594 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3595};
3596
3597MOZ_CAN_RUN_SCRIPT static bool
3598passUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3599{
3600 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3603( cx, "TestExampleInterface"
, "passUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3601 "TestExampleInterface", "passUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3603( cx, "TestExampleInterface"
, "passUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3602 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3603( cx, "TestExampleInterface"
, "passUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3603 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3603( cx, "TestExampleInterface"
, "passUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3604
3605 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3606 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnsignedShort", 1)) {
3607 return false;
3608 }
3609 uint16_t arg0;
3610 if (!ValueToPrimitive<uint16_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3611 return false;
3612 }
3613 // NOTE: This assert does NOT call the function.
3614 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnsignedShort(arg0))>, "Should be returning void here");
3615 MOZ_KnownLive(self)(self)->PassUnsignedShort(arg0);
3616 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3616); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3616; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3617 args.rval().setUndefined();
3618 return true;
3619}
3620
3621static const JSJitInfo passUnsignedShort_methodinfo = {
3622 { (JSJitGetterOp)passUnsignedShort },
3623 { prototypes::id::TestExampleInterface },
3624 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3625 JSJitInfo::Method,
3626 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3627 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3628 false, /* isInfallible. False in setters. */
3629 false, /* isMovable. Not relevant for setters. */
3630 false, /* isEliminatable. Not relevant for setters. */
3631 false, /* isAlwaysInSlot. Only relevant for getters. */
3632 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3633 false, /* isTypedMethod. Only relevant for methods. */
3634 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3635};
3636
3637MOZ_CAN_RUN_SCRIPT static bool
3638receiveUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3639{
3640 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3643( cx, "TestExampleInterface"
, "receiveUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3641 "TestExampleInterface", "receiveUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3643( cx, "TestExampleInterface"
, "receiveUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3642 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3643( cx, "TestExampleInterface"
, "receiveUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3643 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3643( cx, "TestExampleInterface"
, "receiveUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3644
3645 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3646 uint16_t result(MOZ_KnownLive(self)(self)->ReceiveUnsignedShort());
3647 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3647); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3647; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3648 args.rval().setInt32(int32_t(result));
3649 return true;
3650}
3651
3652static const JSJitInfo receiveUnsignedShort_methodinfo = {
3653 { (JSJitGetterOp)receiveUnsignedShort },
3654 { prototypes::id::TestExampleInterface },
3655 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3656 JSJitInfo::Method,
3657 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3658 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
3659 true, /* isInfallible. False in setters. */
3660 false, /* isMovable. Not relevant for setters. */
3661 false, /* isEliminatable. Not relevant for setters. */
3662 false, /* isAlwaysInSlot. Only relevant for getters. */
3663 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3664 false, /* isTypedMethod. Only relevant for methods. */
3665 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3666};
3667
3668MOZ_CAN_RUN_SCRIPT static bool
3669passOptionalUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3670{
3671 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3674( cx, "TestExampleInterface"
, "passOptionalUnsignedShort", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3672 "TestExampleInterface", "passOptionalUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3674( cx, "TestExampleInterface"
, "passOptionalUnsignedShort", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3673 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3674( cx, "TestExampleInterface"
, "passOptionalUnsignedShort", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3674 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3674( cx, "TestExampleInterface"
, "passOptionalUnsignedShort", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3675
3676 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3677 Optional<uint16_t> arg0;
3678 if (args.hasDefined(0)) {
3679 arg0.Construct();
3680 if (!ValueToPrimitive<uint16_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
3681 return false;
3682 }
3683 }
3684 // NOTE: This assert does NOT call the function.
3685 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedShort(Constify(arg0)))>, "Should be returning void here");
3686 MOZ_KnownLive(self)(self)->PassOptionalUnsignedShort(Constify(arg0));
3687 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3687); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3687; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3688 args.rval().setUndefined();
3689 return true;
3690}
3691
3692static const JSJitInfo passOptionalUnsignedShort_methodinfo = {
3693 { (JSJitGetterOp)passOptionalUnsignedShort },
3694 { prototypes::id::TestExampleInterface },
3695 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3696 JSJitInfo::Method,
3697 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3698 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3699 false, /* isInfallible. False in setters. */
3700 false, /* isMovable. Not relevant for setters. */
3701 false, /* isEliminatable. Not relevant for setters. */
3702 false, /* isAlwaysInSlot. Only relevant for getters. */
3703 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3704 false, /* isTypedMethod. Only relevant for methods. */
3705 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3706};
3707
3708MOZ_CAN_RUN_SCRIPT static bool
3709passOptionalUnsignedShortWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3710{
3711 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3714( cx, "TestExampleInterface"
, "passOptionalUnsignedShortWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3712 "TestExampleInterface", "passOptionalUnsignedShortWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3714( cx, "TestExampleInterface"
, "passOptionalUnsignedShortWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3713 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3714( cx, "TestExampleInterface"
, "passOptionalUnsignedShortWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3714 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3714( cx, "TestExampleInterface"
, "passOptionalUnsignedShortWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3715
3716 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3717 uint16_t arg0;
3718 if (args.hasDefined(0)) {
3719 if (!ValueToPrimitive<uint16_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3720 return false;
3721 }
3722 } else {
3723 arg0 = 2;
3724 }
3725 // NOTE: This assert does NOT call the function.
3726 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedShortWithDefault(arg0))>, "Should be returning void here");
3727 MOZ_KnownLive(self)(self)->PassOptionalUnsignedShortWithDefault(arg0);
3728 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3728); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3728; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3729 args.rval().setUndefined();
3730 return true;
3731}
3732
3733static const JSJitInfo passOptionalUnsignedShortWithDefault_methodinfo = {
3734 { (JSJitGetterOp)passOptionalUnsignedShortWithDefault },
3735 { prototypes::id::TestExampleInterface },
3736 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3737 JSJitInfo::Method,
3738 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3739 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3740 false, /* isInfallible. False in setters. */
3741 false, /* isMovable. Not relevant for setters. */
3742 false, /* isEliminatable. Not relevant for setters. */
3743 false, /* isAlwaysInSlot. Only relevant for getters. */
3744 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3745 false, /* isTypedMethod. Only relevant for methods. */
3746 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3747};
3748
3749MOZ_CAN_RUN_SCRIPT static bool
3750get_readonlyUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3751{
3752 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3755( cx, "TestExampleInterface"
, "readonlyUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3753 "TestExampleInterface", "readonlyUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3755( cx, "TestExampleInterface"
, "readonlyUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3754 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3755( cx, "TestExampleInterface"
, "readonlyUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3755 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3755( cx, "TestExampleInterface"
, "readonlyUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3756
3757 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3758 uint32_t result(MOZ_KnownLive(self)(self)->ReadonlyUnsignedLong());
3759 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3759); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3759; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3760 args.rval().setNumber(result);
3761 return true;
3762}
3763
3764static const JSJitInfo readonlyUnsignedLong_getterinfo = {
3765 { get_readonlyUnsignedLong },
3766 { prototypes::id::TestExampleInterface },
3767 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3768 JSJitInfo::Getter,
3769 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3770 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3771 true, /* isInfallible. False in setters. */
3772 false, /* isMovable. Not relevant for setters. */
3773 false, /* isEliminatable. Not relevant for setters. */
3774 false, /* isAlwaysInSlot. Only relevant for getters. */
3775 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3776 false, /* isTypedMethod. Only relevant for methods. */
3777 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3778};
3779
3780MOZ_CAN_RUN_SCRIPT static bool
3781get_writableUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3782{
3783 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3786( cx, "TestExampleInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3784 "TestExampleInterface", "writableUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3786( cx, "TestExampleInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3785 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3786( cx, "TestExampleInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3786 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3786( cx, "TestExampleInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3787
3788 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3789 uint32_t result(MOZ_KnownLive(self)(self)->WritableUnsignedLong());
3790 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3790); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3790; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3791 args.rval().setNumber(result);
3792 return true;
3793}
3794
3795MOZ_CAN_RUN_SCRIPT static bool
3796set_writableUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
3797{
3798 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3801( cx, "TestExampleInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3799 "TestExampleInterface", "writableUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3801( cx, "TestExampleInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3800 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject3801( cx, "TestExampleInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3801 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3801( cx, "TestExampleInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3802
3803 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3804 uint32_t arg0;
3805 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
3806 return false;
3807 }
3808 // NOTE: This assert does NOT call the function.
3809 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnsignedLong(arg0))>, "Should be returning void here");
3810 MOZ_KnownLive(self)(self)->SetWritableUnsignedLong(arg0);
3811 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3811); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3811; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3812
3813 return true;
3814}
3815
3816static const JSJitInfo writableUnsignedLong_getterinfo = {
3817 { get_writableUnsignedLong },
3818 { prototypes::id::TestExampleInterface },
3819 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3820 JSJitInfo::Getter,
3821 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3822 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3823 true, /* isInfallible. False in setters. */
3824 false, /* isMovable. Not relevant for setters. */
3825 false, /* isEliminatable. Not relevant for setters. */
3826 false, /* isAlwaysInSlot. Only relevant for getters. */
3827 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3828 false, /* isTypedMethod. Only relevant for methods. */
3829 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3830};
3831static const JSJitInfo writableUnsignedLong_setterinfo = {
3832 { (JSJitGetterOp)set_writableUnsignedLong },
3833 { prototypes::id::TestExampleInterface },
3834 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3835 JSJitInfo::Setter,
3836 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3837 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3838 false, /* isInfallible. False in setters. */
3839 false, /* isMovable. Not relevant for setters. */
3840 false, /* isEliminatable. Not relevant for setters. */
3841 false, /* isAlwaysInSlot. Only relevant for getters. */
3842 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3843 false, /* isTypedMethod. Only relevant for methods. */
3844 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3845};
3846
3847MOZ_CAN_RUN_SCRIPT static bool
3848passUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3849{
3850 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3853( cx, "TestExampleInterface"
, "passUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3851 "TestExampleInterface", "passUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3853( cx, "TestExampleInterface"
, "passUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3852 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3853( cx, "TestExampleInterface"
, "passUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3853 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3853( cx, "TestExampleInterface"
, "passUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3854
3855 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3856 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnsignedLong", 1)) {
3857 return false;
3858 }
3859 uint32_t arg0;
3860 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3861 return false;
3862 }
3863 // NOTE: This assert does NOT call the function.
3864 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnsignedLong(arg0))>, "Should be returning void here");
3865 MOZ_KnownLive(self)(self)->PassUnsignedLong(arg0);
3866 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3866); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3866; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3867 args.rval().setUndefined();
3868 return true;
3869}
3870
3871static const JSJitInfo passUnsignedLong_methodinfo = {
3872 { (JSJitGetterOp)passUnsignedLong },
3873 { prototypes::id::TestExampleInterface },
3874 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3875 JSJitInfo::Method,
3876 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3877 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3878 false, /* isInfallible. False in setters. */
3879 false, /* isMovable. Not relevant for setters. */
3880 false, /* isEliminatable. Not relevant for setters. */
3881 false, /* isAlwaysInSlot. Only relevant for getters. */
3882 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3883 false, /* isTypedMethod. Only relevant for methods. */
3884 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3885};
3886
3887MOZ_CAN_RUN_SCRIPT static bool
3888receiveUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3889{
3890 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3893( cx, "TestExampleInterface"
, "receiveUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3891 "TestExampleInterface", "receiveUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3893( cx, "TestExampleInterface"
, "receiveUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3892 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3893( cx, "TestExampleInterface"
, "receiveUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3893 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3893( cx, "TestExampleInterface"
, "receiveUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3894
3895 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3896 uint32_t result(MOZ_KnownLive(self)(self)->ReceiveUnsignedLong());
3897 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3897); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3897; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3898 args.rval().setNumber(result);
3899 return true;
3900}
3901
3902static const JSJitInfo receiveUnsignedLong_methodinfo = {
3903 { (JSJitGetterOp)receiveUnsignedLong },
3904 { prototypes::id::TestExampleInterface },
3905 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3906 JSJitInfo::Method,
3907 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3908 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3909 true, /* isInfallible. False in setters. */
3910 false, /* isMovable. Not relevant for setters. */
3911 false, /* isEliminatable. Not relevant for setters. */
3912 false, /* isAlwaysInSlot. Only relevant for getters. */
3913 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3914 false, /* isTypedMethod. Only relevant for methods. */
3915 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3916};
3917
3918MOZ_CAN_RUN_SCRIPT static bool
3919passOptionalUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3920{
3921 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3924( cx, "TestExampleInterface"
, "passOptionalUnsignedLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3922 "TestExampleInterface", "passOptionalUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3924( cx, "TestExampleInterface"
, "passOptionalUnsignedLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3923 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3924( cx, "TestExampleInterface"
, "passOptionalUnsignedLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3924 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3924( cx, "TestExampleInterface"
, "passOptionalUnsignedLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3925
3926 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3927 Optional<uint32_t> arg0;
3928 if (args.hasDefined(0)) {
3929 arg0.Construct();
3930 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
3931 return false;
3932 }
3933 }
3934 // NOTE: This assert does NOT call the function.
3935 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedLong(Constify(arg0)))>, "Should be returning void here");
3936 MOZ_KnownLive(self)(self)->PassOptionalUnsignedLong(Constify(arg0));
3937 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3937); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3937; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3938 args.rval().setUndefined();
3939 return true;
3940}
3941
3942static const JSJitInfo passOptionalUnsignedLong_methodinfo = {
3943 { (JSJitGetterOp)passOptionalUnsignedLong },
3944 { prototypes::id::TestExampleInterface },
3945 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3946 JSJitInfo::Method,
3947 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3948 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3949 false, /* isInfallible. False in setters. */
3950 false, /* isMovable. Not relevant for setters. */
3951 false, /* isEliminatable. Not relevant for setters. */
3952 false, /* isAlwaysInSlot. Only relevant for getters. */
3953 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3954 false, /* isTypedMethod. Only relevant for methods. */
3955 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3956};
3957
3958MOZ_CAN_RUN_SCRIPT static bool
3959passOptionalUnsignedLongWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3960{
3961 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3964( cx, "TestExampleInterface"
, "passOptionalUnsignedLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3962 "TestExampleInterface", "passOptionalUnsignedLongWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3964( cx, "TestExampleInterface"
, "passOptionalUnsignedLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3963 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3964( cx, "TestExampleInterface"
, "passOptionalUnsignedLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3964 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3964( cx, "TestExampleInterface"
, "passOptionalUnsignedLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3965
3966 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
3967 uint32_t arg0;
3968 if (args.hasDefined(0)) {
3969 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3970 return false;
3971 }
3972 } else {
3973 arg0 = 6U;
3974 }
3975 // NOTE: This assert does NOT call the function.
3976 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongWithDefault(arg0))>, "Should be returning void here");
3977 MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongWithDefault(arg0);
3978 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 3978); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3978; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3979 args.rval().setUndefined();
3980 return true;
3981}
3982
3983static const JSJitInfo passOptionalUnsignedLongWithDefault_methodinfo = {
3984 { (JSJitGetterOp)passOptionalUnsignedLongWithDefault },
3985 { prototypes::id::TestExampleInterface },
3986 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
3987 JSJitInfo::Method,
3988 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3989 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3990 false, /* isInfallible. False in setters. */
3991 false, /* isMovable. Not relevant for setters. */
3992 false, /* isEliminatable. Not relevant for setters. */
3993 false, /* isAlwaysInSlot. Only relevant for getters. */
3994 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3995 false, /* isTypedMethod. Only relevant for methods. */
3996 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3997};
3998
3999MOZ_CAN_RUN_SCRIPT static bool
4000get_readonlyUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4001{
4002 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4005( cx, "TestExampleInterface"
, "readonlyUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4003 "TestExampleInterface", "readonlyUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4005( cx, "TestExampleInterface"
, "readonlyUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4004 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4005( cx, "TestExampleInterface"
, "readonlyUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4005 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4005( cx, "TestExampleInterface"
, "readonlyUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4006
4007 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4008 uint64_t result(MOZ_KnownLive(self)(self)->ReadonlyUnsignedLongLong());
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)"
, "../TestExampleGenBinding.cpp", 4009); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4009; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4010 args.rval().set(JS_NumberValue(double(result)));
4011 return true;
4012}
4013
4014static const JSJitInfo readonlyUnsignedLongLong_getterinfo = {
4015 { get_readonlyUnsignedLongLong },
4016 { prototypes::id::TestExampleInterface },
4017 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4018 JSJitInfo::Getter,
4019 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4020 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4021 true, /* 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_writableUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4032{
4033 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4036( cx, "TestExampleInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4034 "TestExampleInterface", "writableUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4036( cx, "TestExampleInterface"
, "writableUnsignedLongLong", 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, "TestExampleInterface"
, "writableUnsignedLongLong", 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, "TestExampleInterface"
, "writableUnsignedLongLong", 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::TestExampleInterface*>(void_self);
4039 uint64_t result(MOZ_KnownLive(self)(self)->WritableUnsignedLongLong());
4040 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4040); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4040; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4041 args.rval().set(JS_NumberValue(double(result)));
4042 return true;
4043}
4044
4045MOZ_CAN_RUN_SCRIPT static bool
4046set_writableUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4047{
4048 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4051( cx, "TestExampleInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4049 "TestExampleInterface", "writableUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4051( cx, "TestExampleInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4050 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4051( cx, "TestExampleInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4051 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4051( cx, "TestExampleInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4052
4053 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4054 uint64_t arg0;
4055 if (!ValueToPrimitive<uint64_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
4056 return false;
4057 }
4058 // NOTE: This assert does NOT call the function.
4059 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnsignedLongLong(arg0))>, "Should be returning void here");
4060 MOZ_KnownLive(self)(self)->SetWritableUnsignedLongLong(arg0);
4061 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4061); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4061; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4062
4063 return true;
4064}
4065
4066static const JSJitInfo writableUnsignedLongLong_getterinfo = {
4067 { get_writableUnsignedLongLong },
4068 { prototypes::id::TestExampleInterface },
4069 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4070 JSJitInfo::Getter,
4071 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4072 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4073 true, /* isInfallible. False in setters. */
4074 false, /* isMovable. Not relevant for setters. */
4075 false, /* isEliminatable. Not relevant for setters. */
4076 false, /* isAlwaysInSlot. Only relevant for getters. */
4077 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4078 false, /* isTypedMethod. Only relevant for methods. */
4079 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4080};
4081static const JSJitInfo writableUnsignedLongLong_setterinfo = {
4082 { (JSJitGetterOp)set_writableUnsignedLongLong },
4083 { prototypes::id::TestExampleInterface },
4084 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4085 JSJitInfo::Setter,
4086 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4087 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4088 false, /* isInfallible. False in setters. */
4089 false, /* isMovable. Not relevant for setters. */
4090 false, /* isEliminatable. Not relevant for setters. */
4091 false, /* isAlwaysInSlot. Only relevant for getters. */
4092 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4093 false, /* isTypedMethod. Only relevant for methods. */
4094 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4095};
4096
4097MOZ_CAN_RUN_SCRIPT static bool
4098passUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
4099{
4100 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4103( cx, "TestExampleInterface"
, "passUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4101 "TestExampleInterface", "passUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4103( cx, "TestExampleInterface"
, "passUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4102 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject4103( cx, "TestExampleInterface"
, "passUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4103 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4103( cx, "TestExampleInterface"
, "passUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4104
4105 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4106 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnsignedLongLong", 1)) {
4107 return false;
4108 }
4109 uint64_t arg0;
4110 if (!ValueToPrimitive<uint64_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
4111 return false;
4112 }
4113 // NOTE: This assert does NOT call the function.
4114 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnsignedLongLong(arg0))>, "Should be returning void here");
4115 MOZ_KnownLive(self)(self)->PassUnsignedLongLong(arg0);
4116 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4116); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4116; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4117 args.rval().setUndefined();
4118 return true;
4119}
4120
4121static const JSJitInfo passUnsignedLongLong_methodinfo = {
4122 { (JSJitGetterOp)passUnsignedLongLong },
4123 { prototypes::id::TestExampleInterface },
4124 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4125 JSJitInfo::Method,
4126 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4127 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4128 false, /* isInfallible. False in setters. */
4129 false, /* isMovable. Not relevant for setters. */
4130 false, /* isEliminatable. Not relevant for setters. */
4131 false, /* isAlwaysInSlot. Only relevant for getters. */
4132 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4133 false, /* isTypedMethod. Only relevant for methods. */
4134 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4135};
4136
4137MOZ_CAN_RUN_SCRIPT static bool
4138receiveUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
4139{
4140 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4143( cx, "TestExampleInterface"
, "receiveUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4141 "TestExampleInterface", "receiveUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4143( cx, "TestExampleInterface"
, "receiveUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4142 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject4143( cx, "TestExampleInterface"
, "receiveUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4143 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4143( cx, "TestExampleInterface"
, "receiveUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4144
4145 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4146 uint64_t result(MOZ_KnownLive(self)(self)->ReceiveUnsignedLongLong());
4147 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4147); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4147; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4148 args.rval().set(JS_NumberValue(double(result)));
4149 return true;
4150}
4151
4152static const JSJitInfo receiveUnsignedLongLong_methodinfo = {
4153 { (JSJitGetterOp)receiveUnsignedLongLong },
4154 { prototypes::id::TestExampleInterface },
4155 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4156 JSJitInfo::Method,
4157 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4158 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4159 true, /* isInfallible. False in setters. */
4160 false, /* isMovable. Not relevant for setters. */
4161 false, /* isEliminatable. Not relevant for setters. */
4162 false, /* isAlwaysInSlot. Only relevant for getters. */
4163 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4164 false, /* isTypedMethod. Only relevant for methods. */
4165 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4166};
4167
4168MOZ_CAN_RUN_SCRIPT static bool
4169passOptionalUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
4170{
4171 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4174( cx, "TestExampleInterface"
, "passOptionalUnsignedLongLong", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4172 "TestExampleInterface", "passOptionalUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4174( cx, "TestExampleInterface"
, "passOptionalUnsignedLongLong", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4173 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject4174( cx, "TestExampleInterface"
, "passOptionalUnsignedLongLong", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4174 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4174( cx, "TestExampleInterface"
, "passOptionalUnsignedLongLong", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4175
4176 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4177 Optional<uint64_t> arg0;
4178 if (args.hasDefined(0)) {
4179 arg0.Construct();
4180 if (!ValueToPrimitive<uint64_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
4181 return false;
4182 }
4183 }
4184 // NOTE: This assert does NOT call the function.
4185 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongLong(Constify(arg0)))>, "Should be returning void here");
4186 MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongLong(Constify(arg0));
4187 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4187); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4187; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4188 args.rval().setUndefined();
4189 return true;
4190}
4191
4192static const JSJitInfo passOptionalUnsignedLongLong_methodinfo = {
4193 { (JSJitGetterOp)passOptionalUnsignedLongLong },
4194 { prototypes::id::TestExampleInterface },
4195 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4196 JSJitInfo::Method,
4197 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4198 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4199 false, /* isInfallible. False in setters. */
4200 false, /* isMovable. Not relevant for setters. */
4201 false, /* isEliminatable. Not relevant for setters. */
4202 false, /* isAlwaysInSlot. Only relevant for getters. */
4203 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4204 false, /* isTypedMethod. Only relevant for methods. */
4205 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4206};
4207
4208MOZ_CAN_RUN_SCRIPT static bool
4209passOptionalUnsignedLongLongWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
4210{
4211 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4214( cx, "TestExampleInterface"
, "passOptionalUnsignedLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4212 "TestExampleInterface", "passOptionalUnsignedLongLongWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4214( cx, "TestExampleInterface"
, "passOptionalUnsignedLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4213 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject4214( cx, "TestExampleInterface"
, "passOptionalUnsignedLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4214 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4214( cx, "TestExampleInterface"
, "passOptionalUnsignedLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4215
4216 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4217 uint64_t arg0;
4218 if (args.hasDefined(0)) {
4219 if (!ValueToPrimitive<uint64_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
4220 return false;
4221 }
4222 } else {
4223 arg0 = 17ULL;
4224 }
4225 // NOTE: This assert does NOT call the function.
4226 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongLongWithDefault(arg0))>, "Should be returning void here");
4227 MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongLongWithDefault(arg0);
4228 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4228); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4228; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4229 args.rval().setUndefined();
4230 return true;
4231}
4232
4233static const JSJitInfo passOptionalUnsignedLongLongWithDefault_methodinfo = {
4234 { (JSJitGetterOp)passOptionalUnsignedLongLongWithDefault },
4235 { prototypes::id::TestExampleInterface },
4236 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4237 JSJitInfo::Method,
4238 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4239 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4240 false, /* isInfallible. False in setters. */
4241 false, /* isMovable. Not relevant for setters. */
4242 false, /* isEliminatable. Not relevant for setters. */
4243 false, /* isAlwaysInSlot. Only relevant for getters. */
4244 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4245 false, /* isTypedMethod. Only relevant for methods. */
4246 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4247};
4248
4249MOZ_CAN_RUN_SCRIPT static bool
4250get_writableFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4251{
4252 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4255( cx, "TestExampleInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4253 "TestExampleInterface", "writableFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4255( cx, "TestExampleInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4254 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4255( cx, "TestExampleInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4255 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4255( cx, "TestExampleInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4256
4257 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4258 float result(MOZ_KnownLive(self)(self)->WritableFloat());
4259 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4259); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4259; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4260 args.rval().set(JS_NumberValue(double(result)));
4261 return true;
4262}
4263
4264MOZ_CAN_RUN_SCRIPT static bool
4265set_writableFloat(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4266{
4267 BindingCallContext cx(cx_, "TestExampleInterface.writableFloat setter");
4268 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4271( cx, "TestExampleInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4269 "TestExampleInterface", "writableFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4271( cx, "TestExampleInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4270 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4271( cx, "TestExampleInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4271 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4271( cx, "TestExampleInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4272
4273 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4274 float arg0;
4275 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
4276 return false;
4277 } else if (!std::isfinite(arg0)) {
4278 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Value being assigned");
4279 return false;
4280 }
4281 // NOTE: This assert does NOT call the function.
4282 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableFloat(arg0))>, "Should be returning void here");
4283 MOZ_KnownLive(self)(self)->SetWritableFloat(arg0);
4284 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4284); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4284; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4285
4286 return true;
4287}
4288
4289static const JSJitInfo writableFloat_getterinfo = {
4290 { get_writableFloat },
4291 { prototypes::id::TestExampleInterface },
4292 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4293 JSJitInfo::Getter,
4294 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4295 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4296 true, /* isInfallible. False in setters. */
4297 false, /* isMovable. Not relevant for setters. */
4298 false, /* isEliminatable. Not relevant for setters. */
4299 false, /* isAlwaysInSlot. Only relevant for getters. */
4300 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4301 false, /* isTypedMethod. Only relevant for methods. */
4302 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4303};
4304static const JSJitInfo writableFloat_setterinfo = {
4305 { (JSJitGetterOp)set_writableFloat },
4306 { prototypes::id::TestExampleInterface },
4307 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4308 JSJitInfo::Setter,
4309 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4310 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4311 false, /* isInfallible. False in setters. */
4312 false, /* isMovable. Not relevant for setters. */
4313 false, /* isEliminatable. Not relevant for setters. */
4314 false, /* isAlwaysInSlot. Only relevant for getters. */
4315 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4316 false, /* isTypedMethod. Only relevant for methods. */
4317 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4318};
4319
4320MOZ_CAN_RUN_SCRIPT static bool
4321get_writableUnrestrictedFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4322{
4323 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4326( cx, "TestExampleInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4324 "TestExampleInterface", "writableUnrestrictedFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4326( cx, "TestExampleInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4325 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4326( cx, "TestExampleInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4326 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4326( cx, "TestExampleInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4327
4328 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4329 float result(MOZ_KnownLive(self)(self)->WritableUnrestrictedFloat());
4330 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4330); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4330; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4331 args.rval().set(JS_NumberValue(double(result)));
4332 return true;
4333}
4334
4335MOZ_CAN_RUN_SCRIPT static bool
4336set_writableUnrestrictedFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4337{
4338 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4341( cx, "TestExampleInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4339 "TestExampleInterface", "writableUnrestrictedFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4341( cx, "TestExampleInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4340 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4341( cx, "TestExampleInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4341 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4341( cx, "TestExampleInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4342
4343 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4344 float arg0;
4345 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
4346 return false;
4347 }
4348 // NOTE: This assert does NOT call the function.
4349 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnrestrictedFloat(arg0))>, "Should be returning void here");
4350 MOZ_KnownLive(self)(self)->SetWritableUnrestrictedFloat(arg0);
4351 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4351); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4351; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4352
4353 return true;
4354}
4355
4356static const JSJitInfo writableUnrestrictedFloat_getterinfo = {
4357 { get_writableUnrestrictedFloat },
4358 { prototypes::id::TestExampleInterface },
4359 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4360 JSJitInfo::Getter,
4361 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4362 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4363 true, /* isInfallible. False in setters. */
4364 false, /* isMovable. Not relevant for setters. */
4365 false, /* isEliminatable. Not relevant for setters. */
4366 false, /* isAlwaysInSlot. Only relevant for getters. */
4367 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4368 false, /* isTypedMethod. Only relevant for methods. */
4369 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4370};
4371static const JSJitInfo writableUnrestrictedFloat_setterinfo = {
4372 { (JSJitGetterOp)set_writableUnrestrictedFloat },
4373 { prototypes::id::TestExampleInterface },
4374 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4375 JSJitInfo::Setter,
4376 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4377 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4378 false, /* isInfallible. False in setters. */
4379 false, /* isMovable. Not relevant for setters. */
4380 false, /* isEliminatable. Not relevant for setters. */
4381 false, /* isAlwaysInSlot. Only relevant for getters. */
4382 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4383 false, /* isTypedMethod. Only relevant for methods. */
4384 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4385};
4386
4387MOZ_CAN_RUN_SCRIPT static bool
4388get_writableNullableFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4389{
4390 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4393( cx, "TestExampleInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4391 "TestExampleInterface", "writableNullableFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4393( cx, "TestExampleInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4392 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4393( cx, "TestExampleInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4393 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4393( cx, "TestExampleInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4394
4395 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4396 Nullable<float> result(MOZ_KnownLive(self)(self)->GetWritableNullableFloat());
4397 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4397); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4397; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4398 if (result.IsNull()) {
4399 args.rval().setNull();
4400 return true;
4401 }
4402 args.rval().set(JS_NumberValue(double(result.Value())));
4403 return true;
4404}
4405
4406MOZ_CAN_RUN_SCRIPT static bool
4407set_writableNullableFloat(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4408{
4409 BindingCallContext cx(cx_, "TestExampleInterface.writableNullableFloat setter");
4410 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4413( cx, "TestExampleInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4411 "TestExampleInterface", "writableNullableFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4413( cx, "TestExampleInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4412 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4413( cx, "TestExampleInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4413 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4413( cx, "TestExampleInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4414
4415 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4416 Nullable<float> arg0;
4417 if (args[0].isNullOrUndefined()) {
4418 arg0.SetNull();
4419 } else if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
4420 return false;
4421 } else if (!std::isfinite(arg0.Value())) {
4422 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Value being assigned");
4423 return false;
4424 }
4425 // NOTE: This assert does NOT call the function.
4426 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableFloat(Constify(arg0)))>, "Should be returning void here");
4427 MOZ_KnownLive(self)(self)->SetWritableNullableFloat(Constify(arg0));
4428 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4428); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4428; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4429
4430 return true;
4431}
4432
4433static const JSJitInfo writableNullableFloat_getterinfo = {
4434 { get_writableNullableFloat },
4435 { prototypes::id::TestExampleInterface },
4436 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4437 JSJitInfo::Getter,
4438 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4439 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
4440 true, /* isInfallible. False in setters. */
4441 false, /* isMovable. Not relevant for setters. */
4442 false, /* isEliminatable. Not relevant for setters. */
4443 false, /* isAlwaysInSlot. Only relevant for getters. */
4444 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4445 false, /* isTypedMethod. Only relevant for methods. */
4446 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4447};
4448static const JSJitInfo writableNullableFloat_setterinfo = {
4449 { (JSJitGetterOp)set_writableNullableFloat },
4450 { prototypes::id::TestExampleInterface },
4451 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4452 JSJitInfo::Setter,
4453 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4454 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4455 false, /* isInfallible. False in setters. */
4456 false, /* isMovable. Not relevant for setters. */
4457 false, /* isEliminatable. Not relevant for setters. */
4458 false, /* isAlwaysInSlot. Only relevant for getters. */
4459 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4460 false, /* isTypedMethod. Only relevant for methods. */
4461 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4462};
4463
4464MOZ_CAN_RUN_SCRIPT static bool
4465get_writableNullableUnrestrictedFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4466{
4467 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4470( cx, "TestExampleInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4468 "TestExampleInterface", "writableNullableUnrestrictedFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4470( cx, "TestExampleInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4469 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4470( cx, "TestExampleInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4470 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4470( cx, "TestExampleInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4471
4472 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4473 Nullable<float> result(MOZ_KnownLive(self)(self)->GetWritableNullableUnrestrictedFloat());
4474 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4474); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4474; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4475 if (result.IsNull()) {
4476 args.rval().setNull();
4477 return true;
4478 }
4479 args.rval().set(JS_NumberValue(double(result.Value())));
4480 return true;
4481}
4482
4483MOZ_CAN_RUN_SCRIPT static bool
4484set_writableNullableUnrestrictedFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4485{
4486 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4489( cx, "TestExampleInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4487 "TestExampleInterface", "writableNullableUnrestrictedFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4489( cx, "TestExampleInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4488 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4489( cx, "TestExampleInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4489 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4489( cx, "TestExampleInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4490
4491 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4492 Nullable<float> arg0;
4493 if (args[0].isNullOrUndefined()) {
4494 arg0.SetNull();
4495 } else if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
4496 return false;
4497 }
4498 // NOTE: This assert does NOT call the function.
4499 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableUnrestrictedFloat(Constify(arg0)))>, "Should be returning void here");
4500 MOZ_KnownLive(self)(self)->SetWritableNullableUnrestrictedFloat(Constify(arg0));
4501 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4501); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4501; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4502
4503 return true;
4504}
4505
4506static const JSJitInfo writableNullableUnrestrictedFloat_getterinfo = {
4507 { get_writableNullableUnrestrictedFloat },
4508 { prototypes::id::TestExampleInterface },
4509 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4510 JSJitInfo::Getter,
4511 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4512 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
4513 true, /* isInfallible. False in setters. */
4514 false, /* isMovable. Not relevant for setters. */
4515 false, /* isEliminatable. Not relevant for setters. */
4516 false, /* isAlwaysInSlot. Only relevant for getters. */
4517 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4518 false, /* isTypedMethod. Only relevant for methods. */
4519 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4520};
4521static const JSJitInfo writableNullableUnrestrictedFloat_setterinfo = {
4522 { (JSJitGetterOp)set_writableNullableUnrestrictedFloat },
4523 { prototypes::id::TestExampleInterface },
4524 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4525 JSJitInfo::Setter,
4526 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4527 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4528 false, /* isInfallible. False in setters. */
4529 false, /* isMovable. Not relevant for setters. */
4530 false, /* isEliminatable. Not relevant for setters. */
4531 false, /* isAlwaysInSlot. Only relevant for getters. */
4532 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4533 false, /* isTypedMethod. Only relevant for methods. */
4534 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4535};
4536
4537MOZ_CAN_RUN_SCRIPT static bool
4538get_writableDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4539{
4540 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4543( cx, "TestExampleInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4541 "TestExampleInterface", "writableDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4543( cx, "TestExampleInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4542 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4543( cx, "TestExampleInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4543 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4543( cx, "TestExampleInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4544
4545 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4546 double result(MOZ_KnownLive(self)(self)->WritableDouble());
4547 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4547); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4547; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4548 args.rval().set(JS_NumberValue(double(result)));
4549 return true;
4550}
4551
4552MOZ_CAN_RUN_SCRIPT static bool
4553set_writableDouble(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4554{
4555 BindingCallContext cx(cx_, "TestExampleInterface.writableDouble setter");
4556 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4559( cx, "TestExampleInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4557 "TestExampleInterface", "writableDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4559( cx, "TestExampleInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4558 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4559( cx, "TestExampleInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4559 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4559( cx, "TestExampleInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4560
4561 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4562 double arg0;
4563 if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
4564 return false;
4565 } else if (!std::isfinite(arg0)) {
4566 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Value being assigned");
4567 return false;
4568 }
4569 // NOTE: This assert does NOT call the function.
4570 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableDouble(arg0))>, "Should be returning void here");
4571 MOZ_KnownLive(self)(self)->SetWritableDouble(arg0);
4572 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4572); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4572; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4573
4574 return true;
4575}
4576
4577static const JSJitInfo writableDouble_getterinfo = {
4578 { get_writableDouble },
4579 { prototypes::id::TestExampleInterface },
4580 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4581 JSJitInfo::Getter,
4582 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4583 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4584 true, /* isInfallible. False in setters. */
4585 false, /* isMovable. Not relevant for setters. */
4586 false, /* isEliminatable. Not relevant for setters. */
4587 false, /* isAlwaysInSlot. Only relevant for getters. */
4588 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4589 false, /* isTypedMethod. Only relevant for methods. */
4590 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4591};
4592static const JSJitInfo writableDouble_setterinfo = {
4593 { (JSJitGetterOp)set_writableDouble },
4594 { prototypes::id::TestExampleInterface },
4595 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4596 JSJitInfo::Setter,
4597 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4598 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4599 false, /* isInfallible. False in setters. */
4600 false, /* isMovable. Not relevant for setters. */
4601 false, /* isEliminatable. Not relevant for setters. */
4602 false, /* isAlwaysInSlot. Only relevant for getters. */
4603 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4604 false, /* isTypedMethod. Only relevant for methods. */
4605 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4606};
4607
4608MOZ_CAN_RUN_SCRIPT static bool
4609get_writableUnrestrictedDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4610{
4611 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4614( cx, "TestExampleInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4612 "TestExampleInterface", "writableUnrestrictedDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4614( cx, "TestExampleInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4613 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4614( cx, "TestExampleInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4614 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4614( cx, "TestExampleInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4615
4616 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4617 double result(MOZ_KnownLive(self)(self)->WritableUnrestrictedDouble());
4618 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4618); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4618; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4619 args.rval().set(JS_NumberValue(double(result)));
4620 return true;
4621}
4622
4623MOZ_CAN_RUN_SCRIPT static bool
4624set_writableUnrestrictedDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4625{
4626 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4629( cx, "TestExampleInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4627 "TestExampleInterface", "writableUnrestrictedDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4629( cx, "TestExampleInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4628 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4629( cx, "TestExampleInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4629 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4629( cx, "TestExampleInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4630
4631 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4632 double arg0;
4633 if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
4634 return false;
4635 }
4636 // NOTE: This assert does NOT call the function.
4637 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnrestrictedDouble(arg0))>, "Should be returning void here");
4638 MOZ_KnownLive(self)(self)->SetWritableUnrestrictedDouble(arg0);
4639 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4639); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4639; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4640
4641 return true;
4642}
4643
4644static const JSJitInfo writableUnrestrictedDouble_getterinfo = {
4645 { get_writableUnrestrictedDouble },
4646 { prototypes::id::TestExampleInterface },
4647 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4648 JSJitInfo::Getter,
4649 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4650 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4651 true, /* 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};
4659static const JSJitInfo writableUnrestrictedDouble_setterinfo = {
4660 { (JSJitGetterOp)set_writableUnrestrictedDouble },
4661 { prototypes::id::TestExampleInterface },
4662 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4663 JSJitInfo::Setter,
4664 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4665 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4666 false, /* isInfallible. False in setters. */
4667 false, /* isMovable. Not relevant for setters. */
4668 false, /* isEliminatable. Not relevant for setters. */
4669 false, /* isAlwaysInSlot. Only relevant for getters. */
4670 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4671 false, /* isTypedMethod. Only relevant for methods. */
4672 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4673};
4674
4675MOZ_CAN_RUN_SCRIPT static bool
4676get_writableNullableDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4677{
4678 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4681( cx, "TestExampleInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4679 "TestExampleInterface", "writableNullableDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4681( cx, "TestExampleInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4680 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4681( cx, "TestExampleInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4681 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4681( cx, "TestExampleInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4682
4683 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4684 Nullable<double> result(MOZ_KnownLive(self)(self)->GetWritableNullableDouble());
4685 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4685); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4685; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4686 if (result.IsNull()) {
4687 args.rval().setNull();
4688 return true;
4689 }
4690 args.rval().set(JS_NumberValue(double(result.Value())));
4691 return true;
4692}
4693
4694MOZ_CAN_RUN_SCRIPT static bool
4695set_writableNullableDouble(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4696{
4697 BindingCallContext cx(cx_, "TestExampleInterface.writableNullableDouble setter");
4698 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4701( cx, "TestExampleInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4699 "TestExampleInterface", "writableNullableDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4701( cx, "TestExampleInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4700 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4701( cx, "TestExampleInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4701 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4701( cx, "TestExampleInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4702
4703 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4704 Nullable<double> arg0;
4705 if (args[0].isNullOrUndefined()) {
4706 arg0.SetNull();
4707 } else if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
4708 return false;
4709 } else if (!std::isfinite(arg0.Value())) {
4710 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Value being assigned");
4711 return false;
4712 }
4713 // NOTE: This assert does NOT call the function.
4714 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableDouble(Constify(arg0)))>, "Should be returning void here");
4715 MOZ_KnownLive(self)(self)->SetWritableNullableDouble(Constify(arg0));
4716 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4716); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4716; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4717
4718 return true;
4719}
4720
4721static const JSJitInfo writableNullableDouble_getterinfo = {
4722 { get_writableNullableDouble },
4723 { prototypes::id::TestExampleInterface },
4724 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4725 JSJitInfo::Getter,
4726 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4727 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
4728 true, /* isInfallible. False in setters. */
4729 false, /* isMovable. Not relevant for setters. */
4730 false, /* isEliminatable. Not relevant for setters. */
4731 false, /* isAlwaysInSlot. Only relevant for getters. */
4732 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4733 false, /* isTypedMethod. Only relevant for methods. */
4734 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4735};
4736static const JSJitInfo writableNullableDouble_setterinfo = {
4737 { (JSJitGetterOp)set_writableNullableDouble },
4738 { prototypes::id::TestExampleInterface },
4739 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4740 JSJitInfo::Setter,
4741 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4742 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4743 false, /* isInfallible. False in setters. */
4744 false, /* isMovable. Not relevant for setters. */
4745 false, /* isEliminatable. Not relevant for setters. */
4746 false, /* isAlwaysInSlot. Only relevant for getters. */
4747 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4748 false, /* isTypedMethod. Only relevant for methods. */
4749 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4750};
4751
4752MOZ_CAN_RUN_SCRIPT static bool
4753get_writableNullableUnrestrictedDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4754{
4755 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4758( cx, "TestExampleInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4756 "TestExampleInterface", "writableNullableUnrestrictedDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4758( cx, "TestExampleInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4757 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4758( cx, "TestExampleInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4758 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4758( cx, "TestExampleInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4759
4760 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4761 Nullable<double> result(MOZ_KnownLive(self)(self)->GetWritableNullableUnrestrictedDouble());
4762 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4762); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4762; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4763 if (result.IsNull()) {
4764 args.rval().setNull();
4765 return true;
4766 }
4767 args.rval().set(JS_NumberValue(double(result.Value())));
4768 return true;
4769}
4770
4771MOZ_CAN_RUN_SCRIPT static bool
4772set_writableNullableUnrestrictedDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4773{
4774 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4777( cx, "TestExampleInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4775 "TestExampleInterface", "writableNullableUnrestrictedDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4777( cx, "TestExampleInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4776 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4777( cx, "TestExampleInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4777 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4777( cx, "TestExampleInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4778
4779 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4780 Nullable<double> arg0;
4781 if (args[0].isNullOrUndefined()) {
4782 arg0.SetNull();
4783 } else if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
4784 return false;
4785 }
4786 // NOTE: This assert does NOT call the function.
4787 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableUnrestrictedDouble(Constify(arg0)))>, "Should be returning void here");
4788 MOZ_KnownLive(self)(self)->SetWritableNullableUnrestrictedDouble(Constify(arg0));
4789 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 4789); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4789; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4790
4791 return true;
4792}
4793
4794static const JSJitInfo writableNullableUnrestrictedDouble_getterinfo = {
4795 { get_writableNullableUnrestrictedDouble },
4796 { prototypes::id::TestExampleInterface },
4797 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4798 JSJitInfo::Getter,
4799 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4800 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
4801 true, /* isInfallible. False in setters. */
4802 false, /* isMovable. Not relevant for setters. */
4803 false, /* isEliminatable. Not relevant for setters. */
4804 false, /* isAlwaysInSlot. Only relevant for getters. */
4805 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4806 false, /* isTypedMethod. Only relevant for methods. */
4807 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4808};
4809static const JSJitInfo writableNullableUnrestrictedDouble_setterinfo = {
4810 { (JSJitGetterOp)set_writableNullableUnrestrictedDouble },
4811 { prototypes::id::TestExampleInterface },
4812 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
4813 JSJitInfo::Setter,
4814 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4815 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4816 false, /* isInfallible. False in setters. */
4817 false, /* isMovable. Not relevant for setters. */
4818 false, /* isEliminatable. Not relevant for setters. */
4819 false, /* isAlwaysInSlot. Only relevant for getters. */
4820 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4821 false, /* isTypedMethod. Only relevant for methods. */
4822 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4823};
4824
4825MOZ_CAN_RUN_SCRIPT static bool
4826passFloat(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
4827{
4828 BindingCallContext cx(cx_, "TestExampleInterface.passFloat");
4829 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4832( cx, "TestExampleInterface"
, "passFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
4830 "TestExampleInterface", "passFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4832( cx, "TestExampleInterface"
, "passFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
4831 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject4832( cx, "TestExampleInterface"
, "passFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
4832 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4832( cx, "TestExampleInterface"
, "passFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
4833
4834 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
4835 if (!args.requireAtLeast(cx, "TestExampleInterface.passFloat", 16)) {
4836 return false;
4837 }
4838 float arg0;
4839 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Argument 1", &arg0)) {
4840 return false;
4841 } else if (!std::isfinite(arg0)) {
4842 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 1");
4843 return false;
4844 }
4845 float arg1;
4846 if (!ValueToPrimitive<float, eDefault>(cx, args[1], "Argument 2", &arg1)) {
4847 return false;
4848 }
4849 Nullable<float> arg2;
4850 if (args[2].isNullOrUndefined()) {
4851 arg2.SetNull();
4852 } else if (!ValueToPrimitive<float, eDefault>(cx, args[2], "Argument 3", &arg2.SetValue())) {
4853 return false;
4854 } else if (!std::isfinite(arg2.Value())) {
4855 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 3");
4856 return false;
4857 }
4858 Nullable<float> arg3;
4859 if (args[3].isNullOrUndefined()) {
4860 arg3.SetNull();
4861 } else if (!ValueToPrimitive<float, eDefault>(cx, args[3], "Argument 4", &arg3.SetValue())) {
4862 return false;
4863 }
4864 double arg4;
4865 if (!ValueToPrimitive<double, eDefault>(cx, args[4], "Argument 5", &arg4)) {
4866 return false;
4867 } else if (!std::isfinite(arg4)) {
4868 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 5");
4869 return false;
4870 }
4871 double arg5;
4872 if (!ValueToPrimitive<double, eDefault>(cx, args[5], "Argument 6", &arg5)) {
4873 return false;
4874 }
4875 Nullable<double> arg6;
4876 if (args[6].isNullOrUndefined()) {
4877 arg6.SetNull();
4878 } else if (!ValueToPrimitive<double, eDefault>(cx, args[6], "Argument 7", &arg6.SetValue())) {
4879 return false;
4880 } else if (!std::isfinite(arg6.Value())) {
4881 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 7");
4882 return false;
4883 }
4884 Nullable<double> arg7;
4885 if (args[7].isNullOrUndefined()) {
4886 arg7.SetNull();
4887 } else if (!ValueToPrimitive<double, eDefault>(cx, args[7], "Argument 8", &arg7.SetValue())) {
4888 return false;
4889 }
4890 binding_detail::AutoSequence<float> arg8;
4891 if (args[8].isObject()) {
4892 JS::ForOfIterator iter(cx);
4893 if (!iter.init(args[8], JS::ForOfIterator::AllowNonIterable)) {
4894 return false;
4895 }
4896 if (!iter.valueIsIterable()) {
4897 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 9", "sequence");
4898 return false;
4899 }
4900 binding_detail::AutoSequence<float> &arr = arg8;
4901 JS::Rooted<JS::Value> temp(cx);
4902 while (true) {
4903 bool done;
4904 if (!iter.next(&temp, &done)) {
4905 return false;
4906 }
4907 if (done) {
4908 break;
4909 }
4910 float* slotPtr = arr.AppendElement(mozilla::fallible);
4911 if (!slotPtr) {
4912 JS_ReportOutOfMemory(cx);
4913 return false;
4914 }
4915 float& slot = *slotPtr;
4916 if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 9", &slot)) {
4917 return false;
4918 } else if (!std::isfinite(slot)) {
4919 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Element of argument 9");
4920 return false;
4921 }
4922 }
4923 } else {
4924 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 9", "sequence");
4925 return false;
4926 }
4927 binding_detail::AutoSequence<float> arg9;
4928 if (args[9].isObject()) {
4929 JS::ForOfIterator iter(cx);
4930 if (!iter.init(args[9], JS::ForOfIterator::AllowNonIterable)) {
4931 return false;
4932 }
4933 if (!iter.valueIsIterable()) {
4934 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
4935 return false;
4936 }
4937 binding_detail::AutoSequence<float> &arr = arg9;
4938 JS::Rooted<JS::Value> temp(cx);
4939 while (true) {
4940 bool done;
4941 if (!iter.next(&temp, &done)) {
4942 return false;
4943 }
4944 if (done) {
4945 break;
4946 }
4947 float* slotPtr = arr.AppendElement(mozilla::fallible);
4948 if (!slotPtr) {
4949 JS_ReportOutOfMemory(cx);
4950 return false;
4951 }
4952 float& slot = *slotPtr;
4953 if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 10", &slot)) {
4954 return false;
4955 }
4956 }
4957 } else {
4958 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
4959 return false;
4960 }
4961 binding_detail::AutoSequence<Nullable<float>> arg10;
4962 if (args[10].isObject()) {
4963 JS::ForOfIterator iter(cx);
4964 if (!iter.init(args[10], JS::ForOfIterator::AllowNonIterable)) {
4965 return false;
4966 }
4967 if (!iter.valueIsIterable()) {
4968 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 11", "sequence");
4969 return false;
4970 }
4971 binding_detail::AutoSequence<Nullable<float>> &arr = arg10;
4972 JS::Rooted<JS::Value> temp(cx);
4973 while (true) {
4974 bool done;
4975 if (!iter.next(&temp, &done)) {
4976 return false;
4977 }
4978 if (done) {
4979 break;
4980 }
4981 Nullable<float>* slotPtr = arr.AppendElement(mozilla::fallible);
4982 if (!slotPtr) {
4983 JS_ReportOutOfMemory(cx);
4984 return false;
4985 }
4986 Nullable<float>& slot = *slotPtr;
4987 if (temp.isNullOrUndefined()) {
4988 slot.SetNull();
4989 } else if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 11", &slot.SetValue())) {
4990 return false;
4991 } else if (!std::isfinite(slot.Value())) {
4992 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Element of argument 11");
4993 return false;
4994 }
4995 }
4996 } else {
4997 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 11", "sequence");
4998 return false;
4999 }
5000 binding_detail::AutoSequence<Nullable<float>> arg11;
5001 if (args[11].isObject()) {
5002 JS::ForOfIterator iter(cx);
5003 if (!iter.init(args[11], JS::ForOfIterator::AllowNonIterable)) {
5004 return false;
5005 }
5006 if (!iter.valueIsIterable()) {
5007 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 12", "sequence");
5008 return false;
5009 }
5010 binding_detail::AutoSequence<Nullable<float>> &arr = arg11;
5011 JS::Rooted<JS::Value> temp(cx);
5012 while (true) {
5013 bool done;
5014 if (!iter.next(&temp, &done)) {
5015 return false;
5016 }
5017 if (done) {
5018 break;
5019 }
5020 Nullable<float>* slotPtr = arr.AppendElement(mozilla::fallible);
5021 if (!slotPtr) {
5022 JS_ReportOutOfMemory(cx);
5023 return false;
5024 }
5025 Nullable<float>& slot = *slotPtr;
5026 if (temp.isNullOrUndefined()) {
5027 slot.SetNull();
5028 } else if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 12", &slot.SetValue())) {
5029 return false;
5030 }
5031 }
5032 } else {
5033 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 12", "sequence");
5034 return false;
5035 }
5036 binding_detail::AutoSequence<double> arg12;
5037 if (args[12].isObject()) {
5038 JS::ForOfIterator iter(cx);
5039 if (!iter.init(args[12], JS::ForOfIterator::AllowNonIterable)) {
5040 return false;
5041 }
5042 if (!iter.valueIsIterable()) {
5043 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 13", "sequence");
5044 return false;
5045 }
5046 binding_detail::AutoSequence<double> &arr = arg12;
5047 JS::Rooted<JS::Value> temp(cx);
5048 while (true) {
5049 bool done;
5050 if (!iter.next(&temp, &done)) {
5051 return false;
5052 }
5053 if (done) {
5054 break;
5055 }
5056 double* slotPtr = arr.AppendElement(mozilla::fallible);
5057 if (!slotPtr) {
5058 JS_ReportOutOfMemory(cx);
5059 return false;
5060 }
5061 double& slot = *slotPtr;
5062 if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 13", &slot)) {
5063 return false;
5064 } else if (!std::isfinite(slot)) {
5065 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Element of argument 13");
5066 return false;
5067 }
5068 }
5069 } else {
5070 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 13", "sequence");
5071 return false;
5072 }
5073 binding_detail::AutoSequence<double> arg13;
5074 if (args[13].isObject()) {
5075 JS::ForOfIterator iter(cx);
5076 if (!iter.init(args[13], JS::ForOfIterator::AllowNonIterable)) {
5077 return false;
5078 }
5079 if (!iter.valueIsIterable()) {
5080 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 14", "sequence");
5081 return false;
5082 }
5083 binding_detail::AutoSequence<double> &arr = arg13;
5084 JS::Rooted<JS::Value> temp(cx);
5085 while (true) {
5086 bool done;
5087 if (!iter.next(&temp, &done)) {
5088 return false;
5089 }
5090 if (done) {
5091 break;
5092 }
5093 double* slotPtr = arr.AppendElement(mozilla::fallible);
5094 if (!slotPtr) {
5095 JS_ReportOutOfMemory(cx);
5096 return false;
5097 }
5098 double& slot = *slotPtr;
5099 if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 14", &slot)) {
5100 return false;
5101 }
5102 }
5103 } else {
5104 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 14", "sequence");
5105 return false;
5106 }
5107 binding_detail::AutoSequence<Nullable<double>> arg14;
5108 if (args[14].isObject()) {
5109 JS::ForOfIterator iter(cx);
5110 if (!iter.init(args[14], JS::ForOfIterator::AllowNonIterable)) {
5111 return false;
5112 }
5113 if (!iter.valueIsIterable()) {
5114 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 15", "sequence");
5115 return false;
5116 }
5117 binding_detail::AutoSequence<Nullable<double>> &arr = arg14;
5118 JS::Rooted<JS::Value> temp(cx);
5119 while (true) {
5120 bool done;
5121 if (!iter.next(&temp, &done)) {
5122 return false;
5123 }
5124 if (done) {
5125 break;
5126 }
5127 Nullable<double>* slotPtr = arr.AppendElement(mozilla::fallible);
5128 if (!slotPtr) {
5129 JS_ReportOutOfMemory(cx);
5130 return false;
5131 }
5132 Nullable<double>& slot = *slotPtr;
5133 if (temp.isNullOrUndefined()) {
5134 slot.SetNull();
5135 } else if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 15", &slot.SetValue())) {
5136 return false;
5137 } else if (!std::isfinite(slot.Value())) {
5138 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Element of argument 15");
5139 return false;
5140 }
5141 }
5142 } else {
5143 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 15", "sequence");
5144 return false;
5145 }
5146 binding_detail::AutoSequence<Nullable<double>> arg15;
5147 if (args[15].isObject()) {
5148 JS::ForOfIterator iter(cx);
5149 if (!iter.init(args[15], JS::ForOfIterator::AllowNonIterable)) {
5150 return false;
5151 }
5152 if (!iter.valueIsIterable()) {
5153 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 16", "sequence");
5154 return false;
5155 }
5156 binding_detail::AutoSequence<Nullable<double>> &arr = arg15;
5157 JS::Rooted<JS::Value> temp(cx);
5158 while (true) {
5159 bool done;
5160 if (!iter.next(&temp, &done)) {
5161 return false;
5162 }
5163 if (done) {
5164 break;
5165 }
5166 Nullable<double>* slotPtr = arr.AppendElement(mozilla::fallible);
5167 if (!slotPtr) {
5168 JS_ReportOutOfMemory(cx);
5169 return false;
5170 }
5171 Nullable<double>& slot = *slotPtr;
5172 if (temp.isNullOrUndefined()) {
5173 slot.SetNull();
5174 } else if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 16", &slot.SetValue())) {
5175 return false;
5176 }
5177 }
5178 } else {
5179 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 16", "sequence");
5180 return false;
5181 }
5182 // NOTE: This assert does NOT call the function.
5183 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)))>, "Should be returning void here");
5184 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));
5185 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5185); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5185; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5186 args.rval().setUndefined();
5187 return true;
5188}
5189
5190static const JSJitInfo passFloat_methodinfo = {
5191 { (JSJitGetterOp)passFloat },
5192 { prototypes::id::TestExampleInterface },
5193 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5194 JSJitInfo::Method,
5195 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5196 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5197 false, /* isInfallible. False in setters. */
5198 false, /* isMovable. Not relevant for setters. */
5199 false, /* isEliminatable. Not relevant for setters. */
5200 false, /* isAlwaysInSlot. Only relevant for getters. */
5201 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5202 false, /* isTypedMethod. Only relevant for methods. */
5203 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5204};
5205
5206MOZ_CAN_RUN_SCRIPT static bool
5207passLenientFloat(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5208{
5209 BindingCallContext cx(cx_, "TestExampleInterface.passLenientFloat");
5210 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5213( cx, "TestExampleInterface"
, "passLenientFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5211 "TestExampleInterface", "passLenientFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5213( cx, "TestExampleInterface"
, "passLenientFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5212 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5213( cx, "TestExampleInterface"
, "passLenientFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5213 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5213( cx, "TestExampleInterface"
, "passLenientFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5214
5215 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5216 if (!args.requireAtLeast(cx, "TestExampleInterface.passLenientFloat", 16)) {
5217 return false;
5218 }
5219 bool foundNonFiniteFloat = false;
5220 float arg0;
5221 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Argument 1", &arg0)) {
5222 return false;
5223 } else if (!std::isfinite(arg0)) {
5224 foundNonFiniteFloat = true;
5225 }
5226 float arg1;
5227 if (!ValueToPrimitive<float, eDefault>(cx, args[1], "Argument 2", &arg1)) {
5228 return false;
5229 }
5230 Nullable<float> arg2;
5231 if (args[2].isNullOrUndefined()) {
5232 arg2.SetNull();
5233 } else if (!ValueToPrimitive<float, eDefault>(cx, args[2], "Argument 3", &arg2.SetValue())) {
5234 return false;
5235 } else if (!std::isfinite(arg2.Value())) {
5236 foundNonFiniteFloat = true;
5237 }
5238 Nullable<float> arg3;
5239 if (args[3].isNullOrUndefined()) {
5240 arg3.SetNull();
5241 } else if (!ValueToPrimitive<float, eDefault>(cx, args[3], "Argument 4", &arg3.SetValue())) {
5242 return false;
5243 }
5244 double arg4;
5245 if (!ValueToPrimitive<double, eDefault>(cx, args[4], "Argument 5", &arg4)) {
5246 return false;
5247 } else if (!std::isfinite(arg4)) {
5248 foundNonFiniteFloat = true;
5249 }
5250 double arg5;
5251 if (!ValueToPrimitive<double, eDefault>(cx, args[5], "Argument 6", &arg5)) {
5252 return false;
5253 }
5254 Nullable<double> arg6;
5255 if (args[6].isNullOrUndefined()) {
5256 arg6.SetNull();
5257 } else if (!ValueToPrimitive<double, eDefault>(cx, args[6], "Argument 7", &arg6.SetValue())) {
5258 return false;
5259 } else if (!std::isfinite(arg6.Value())) {
5260 foundNonFiniteFloat = true;
5261 }
5262 Nullable<double> arg7;
5263 if (args[7].isNullOrUndefined()) {
5264 arg7.SetNull();
5265 } else if (!ValueToPrimitive<double, eDefault>(cx, args[7], "Argument 8", &arg7.SetValue())) {
5266 return false;
5267 }
5268 binding_detail::AutoSequence<float> arg8;
5269 if (args[8].isObject()) {
5270 JS::ForOfIterator iter(cx);
5271 if (!iter.init(args[8], JS::ForOfIterator::AllowNonIterable)) {
5272 return false;
5273 }
5274 if (!iter.valueIsIterable()) {
5275 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 9", "sequence");
5276 return false;
5277 }
5278 binding_detail::AutoSequence<float> &arr = arg8;
5279 JS::Rooted<JS::Value> temp(cx);
5280 while (true) {
5281 bool done;
5282 if (!iter.next(&temp, &done)) {
5283 return false;
5284 }
5285 if (done) {
5286 break;
5287 }
5288 float* slotPtr = arr.AppendElement(mozilla::fallible);
5289 if (!slotPtr) {
5290 JS_ReportOutOfMemory(cx);
5291 return false;
5292 }
5293 float& slot = *slotPtr;
5294 if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 9", &slot)) {
5295 return false;
5296 } else if (!std::isfinite(slot)) {
5297 foundNonFiniteFloat = true;
5298 }
5299 }
5300 } else {
5301 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 9", "sequence");
5302 return false;
5303 }
5304 binding_detail::AutoSequence<float> arg9;
5305 if (args[9].isObject()) {
5306 JS::ForOfIterator iter(cx);
5307 if (!iter.init(args[9], JS::ForOfIterator::AllowNonIterable)) {
5308 return false;
5309 }
5310 if (!iter.valueIsIterable()) {
5311 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
5312 return false;
5313 }
5314 binding_detail::AutoSequence<float> &arr = arg9;
5315 JS::Rooted<JS::Value> temp(cx);
5316 while (true) {
5317 bool done;
5318 if (!iter.next(&temp, &done)) {
5319 return false;
5320 }
5321 if (done) {
5322 break;
5323 }
5324 float* slotPtr = arr.AppendElement(mozilla::fallible);
5325 if (!slotPtr) {
5326 JS_ReportOutOfMemory(cx);
5327 return false;
5328 }
5329 float& slot = *slotPtr;
5330 if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 10", &slot)) {
5331 return false;
5332 }
5333 }
5334 } else {
5335 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
5336 return false;
5337 }
5338 binding_detail::AutoSequence<Nullable<float>> arg10;
5339 if (args[10].isObject()) {
5340 JS::ForOfIterator iter(cx);
5341 if (!iter.init(args[10], JS::ForOfIterator::AllowNonIterable)) {
5342 return false;
5343 }
5344 if (!iter.valueIsIterable()) {
5345 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 11", "sequence");
5346 return false;
5347 }
5348 binding_detail::AutoSequence<Nullable<float>> &arr = arg10;
5349 JS::Rooted<JS::Value> temp(cx);
5350 while (true) {
5351 bool done;
5352 if (!iter.next(&temp, &done)) {
5353 return false;
5354 }
5355 if (done) {
5356 break;
5357 }
5358 Nullable<float>* slotPtr = arr.AppendElement(mozilla::fallible);
5359 if (!slotPtr) {
5360 JS_ReportOutOfMemory(cx);
5361 return false;
5362 }
5363 Nullable<float>& slot = *slotPtr;
5364 if (temp.isNullOrUndefined()) {
5365 slot.SetNull();
5366 } else if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 11", &slot.SetValue())) {
5367 return false;
5368 } else if (!std::isfinite(slot.Value())) {
5369 foundNonFiniteFloat = true;
5370 }
5371 }
5372 } else {
5373 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 11", "sequence");
5374 return false;
5375 }
5376 binding_detail::AutoSequence<Nullable<float>> arg11;
5377 if (args[11].isObject()) {
5378 JS::ForOfIterator iter(cx);
5379 if (!iter.init(args[11], JS::ForOfIterator::AllowNonIterable)) {
5380 return false;
5381 }
5382 if (!iter.valueIsIterable()) {
5383 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 12", "sequence");
5384 return false;
5385 }
5386 binding_detail::AutoSequence<Nullable<float>> &arr = arg11;
5387 JS::Rooted<JS::Value> temp(cx);
5388 while (true) {
5389 bool done;
5390 if (!iter.next(&temp, &done)) {
5391 return false;
5392 }
5393 if (done) {
5394 break;
5395 }
5396 Nullable<float>* slotPtr = arr.AppendElement(mozilla::fallible);
5397 if (!slotPtr) {
5398 JS_ReportOutOfMemory(cx);
5399 return false;
5400 }
5401 Nullable<float>& slot = *slotPtr;
5402 if (temp.isNullOrUndefined()) {
5403 slot.SetNull();
5404 } else if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 12", &slot.SetValue())) {
5405 return false;
5406 }
5407 }
5408 } else {
5409 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 12", "sequence");
5410 return false;
5411 }
5412 binding_detail::AutoSequence<double> arg12;
5413 if (args[12].isObject()) {
5414 JS::ForOfIterator iter(cx);
5415 if (!iter.init(args[12], JS::ForOfIterator::AllowNonIterable)) {
5416 return false;
5417 }
5418 if (!iter.valueIsIterable()) {
5419 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 13", "sequence");
5420 return false;
5421 }
5422 binding_detail::AutoSequence<double> &arr = arg12;
5423 JS::Rooted<JS::Value> temp(cx);
5424 while (true) {
5425 bool done;
5426 if (!iter.next(&temp, &done)) {
5427 return false;
5428 }
5429 if (done) {
5430 break;
5431 }
5432 double* slotPtr = arr.AppendElement(mozilla::fallible);
5433 if (!slotPtr) {
5434 JS_ReportOutOfMemory(cx);
5435 return false;
5436 }
5437 double& slot = *slotPtr;
5438 if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 13", &slot)) {
5439 return false;
5440 } else if (!std::isfinite(slot)) {
5441 foundNonFiniteFloat = true;
5442 }
5443 }
5444 } else {
5445 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 13", "sequence");
5446 return false;
5447 }
5448 binding_detail::AutoSequence<double> arg13;
5449 if (args[13].isObject()) {
5450 JS::ForOfIterator iter(cx);
5451 if (!iter.init(args[13], JS::ForOfIterator::AllowNonIterable)) {
5452 return false;
5453 }
5454 if (!iter.valueIsIterable()) {
5455 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 14", "sequence");
5456 return false;
5457 }
5458 binding_detail::AutoSequence<double> &arr = arg13;
5459 JS::Rooted<JS::Value> temp(cx);
5460 while (true) {
5461 bool done;
5462 if (!iter.next(&temp, &done)) {
5463 return false;
5464 }
5465 if (done) {
5466 break;
5467 }
5468 double* slotPtr = arr.AppendElement(mozilla::fallible);
5469 if (!slotPtr) {
5470 JS_ReportOutOfMemory(cx);
5471 return false;
5472 }
5473 double& slot = *slotPtr;
5474 if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 14", &slot)) {
5475 return false;
5476 }
5477 }
5478 } else {
5479 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 14", "sequence");
5480 return false;
5481 }
5482 binding_detail::AutoSequence<Nullable<double>> arg14;
5483 if (args[14].isObject()) {
5484 JS::ForOfIterator iter(cx);
5485 if (!iter.init(args[14], JS::ForOfIterator::AllowNonIterable)) {
5486 return false;
5487 }
5488 if (!iter.valueIsIterable()) {
5489 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 15", "sequence");
5490 return false;
5491 }
5492 binding_detail::AutoSequence<Nullable<double>> &arr = arg14;
5493 JS::Rooted<JS::Value> temp(cx);
5494 while (true) {
5495 bool done;
5496 if (!iter.next(&temp, &done)) {
5497 return false;
5498 }
5499 if (done) {
5500 break;
5501 }
5502 Nullable<double>* slotPtr = arr.AppendElement(mozilla::fallible);
5503 if (!slotPtr) {
5504 JS_ReportOutOfMemory(cx);
5505 return false;
5506 }
5507 Nullable<double>& slot = *slotPtr;
5508 if (temp.isNullOrUndefined()) {
5509 slot.SetNull();
5510 } else if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 15", &slot.SetValue())) {
5511 return false;
5512 } else if (!std::isfinite(slot.Value())) {
5513 foundNonFiniteFloat = true;
5514 }
5515 }
5516 } else {
5517 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 15", "sequence");
5518 return false;
5519 }
5520 binding_detail::AutoSequence<Nullable<double>> arg15;
5521 if (args[15].isObject()) {
5522 JS::ForOfIterator iter(cx);
5523 if (!iter.init(args[15], JS::ForOfIterator::AllowNonIterable)) {
5524 return false;
5525 }
5526 if (!iter.valueIsIterable()) {
5527 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 16", "sequence");
5528 return false;
5529 }
5530 binding_detail::AutoSequence<Nullable<double>> &arr = arg15;
5531 JS::Rooted<JS::Value> temp(cx);
5532 while (true) {
5533 bool done;
5534 if (!iter.next(&temp, &done)) {
5535 return false;
5536 }
5537 if (done) {
5538 break;
5539 }
5540 Nullable<double>* slotPtr = arr.AppendElement(mozilla::fallible);
5541 if (!slotPtr) {
5542 JS_ReportOutOfMemory(cx);
5543 return false;
5544 }
5545 Nullable<double>& slot = *slotPtr;
5546 if (temp.isNullOrUndefined()) {
5547 slot.SetNull();
5548 } else if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 16", &slot.SetValue())) {
5549 return false;
5550 }
5551 }
5552 } else {
5553 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 16", "sequence");
5554 return false;
5555 }
5556 if (foundNonFiniteFloat) {
5557 args.rval().setUndefined();
5558 return true;
5559 }
5560 // NOTE: This assert does NOT call the function.
5561 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)))>, "Should be returning void here");
5562 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));
5563 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5563); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5563; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5564 args.rval().setUndefined();
5565 return true;
5566}
5567
5568static const JSJitInfo passLenientFloat_methodinfo = {
5569 { (JSJitGetterOp)passLenientFloat },
5570 { prototypes::id::TestExampleInterface },
5571 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5572 JSJitInfo::Method,
5573 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5574 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5575 false, /* isInfallible. False in setters. */
5576 false, /* isMovable. Not relevant for setters. */
5577 false, /* isEliminatable. Not relevant for setters. */
5578 false, /* isAlwaysInSlot. Only relevant for getters. */
5579 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5580 false, /* isTypedMethod. Only relevant for methods. */
5581 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5582};
5583
5584MOZ_CAN_RUN_SCRIPT static bool
5585get_lenientFloatAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
5586{
5587 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5590( cx, "TestExampleInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5588 "TestExampleInterface", "lenientFloatAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5590( cx, "TestExampleInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5589 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject5590( cx, "TestExampleInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5590 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5590( cx, "TestExampleInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5591
5592 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5593 float result(MOZ_KnownLive(self)(self)->LenientFloatAttr());
5594 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5594); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5594; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5595 args.rval().set(JS_NumberValue(double(result)));
5596 return true;
5597}
5598
5599MOZ_CAN_RUN_SCRIPT static bool
5600set_lenientFloatAttr(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
5601{
5602 BindingCallContext cx(cx_, "TestExampleInterface.lenientFloatAttr setter");
5603 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5606( cx, "TestExampleInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5604 "TestExampleInterface", "lenientFloatAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5606( cx, "TestExampleInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5605 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject5606( cx, "TestExampleInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5606 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5606( cx, "TestExampleInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5607
5608 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5609 bool foundNonFiniteFloat = false;
5610 float arg0;
5611 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
5612 return false;
5613 } else if (!std::isfinite(arg0)) {
5614 foundNonFiniteFloat = true;
5615 }
5616 if (foundNonFiniteFloat) {
5617 return true;
5618 }
5619 // NOTE: This assert does NOT call the function.
5620 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetLenientFloatAttr(arg0))>, "Should be returning void here");
5621 MOZ_KnownLive(self)(self)->SetLenientFloatAttr(arg0);
5622 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5622); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5622; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5623
5624 return true;
5625}
5626
5627static const JSJitInfo lenientFloatAttr_getterinfo = {
5628 { get_lenientFloatAttr },
5629 { prototypes::id::TestExampleInterface },
5630 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5631 JSJitInfo::Getter,
5632 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5633 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
5634 true, /* isInfallible. False in setters. */
5635 false, /* isMovable. Not relevant for setters. */
5636 false, /* isEliminatable. Not relevant for setters. */
5637 false, /* isAlwaysInSlot. Only relevant for getters. */
5638 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5639 false, /* isTypedMethod. Only relevant for methods. */
5640 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5641};
5642static const JSJitInfo lenientFloatAttr_setterinfo = {
5643 { (JSJitGetterOp)set_lenientFloatAttr },
5644 { prototypes::id::TestExampleInterface },
5645 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5646 JSJitInfo::Setter,
5647 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5648 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5649 false, /* isInfallible. False in setters. */
5650 false, /* isMovable. Not relevant for setters. */
5651 false, /* isEliminatable. Not relevant for setters. */
5652 false, /* isAlwaysInSlot. Only relevant for getters. */
5653 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5654 false, /* isTypedMethod. Only relevant for methods. */
5655 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5656};
5657
5658MOZ_CAN_RUN_SCRIPT static bool
5659get_lenientDoubleAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
5660{
5661 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5664( cx, "TestExampleInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5662 "TestExampleInterface", "lenientDoubleAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5664( cx, "TestExampleInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5663 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject5664( cx, "TestExampleInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5664 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5664( cx, "TestExampleInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5665
5666 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5667 double result(MOZ_KnownLive(self)(self)->LenientDoubleAttr());
5668 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5668); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5668; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5669 args.rval().set(JS_NumberValue(double(result)));
5670 return true;
5671}
5672
5673MOZ_CAN_RUN_SCRIPT static bool
5674set_lenientDoubleAttr(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
5675{
5676 BindingCallContext cx(cx_, "TestExampleInterface.lenientDoubleAttr setter");
5677 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5680( cx, "TestExampleInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5678 "TestExampleInterface", "lenientDoubleAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5680( cx, "TestExampleInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5679 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject5680( cx, "TestExampleInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5680 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5680( cx, "TestExampleInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5681
5682 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5683 bool foundNonFiniteFloat = false;
5684 double arg0;
5685 if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
5686 return false;
5687 } else if (!std::isfinite(arg0)) {
5688 foundNonFiniteFloat = true;
5689 }
5690 if (foundNonFiniteFloat) {
5691 return true;
5692 }
5693 // NOTE: This assert does NOT call the function.
5694 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetLenientDoubleAttr(arg0))>, "Should be returning void here");
5695 MOZ_KnownLive(self)(self)->SetLenientDoubleAttr(arg0);
5696 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5696); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5696; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5697
5698 return true;
5699}
5700
5701static const JSJitInfo lenientDoubleAttr_getterinfo = {
5702 { get_lenientDoubleAttr },
5703 { prototypes::id::TestExampleInterface },
5704 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5705 JSJitInfo::Getter,
5706 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5707 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
5708 true, /* isInfallible. False in setters. */
5709 false, /* isMovable. Not relevant for setters. */
5710 false, /* isEliminatable. Not relevant for setters. */
5711 false, /* isAlwaysInSlot. Only relevant for getters. */
5712 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5713 false, /* isTypedMethod. Only relevant for methods. */
5714 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5715};
5716static const JSJitInfo lenientDoubleAttr_setterinfo = {
5717 { (JSJitGetterOp)set_lenientDoubleAttr },
5718 { prototypes::id::TestExampleInterface },
5719 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5720 JSJitInfo::Setter,
5721 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5722 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5723 false, /* isInfallible. False in setters. */
5724 false, /* isMovable. Not relevant for setters. */
5725 false, /* isEliminatable. Not relevant for setters. */
5726 false, /* isAlwaysInSlot. Only relevant for getters. */
5727 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5728 false, /* isTypedMethod. Only relevant for methods. */
5729 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5730};
5731
5732MOZ_CAN_RUN_SCRIPT static bool
5733receiveSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5734{
5735 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5738( cx, "TestExampleInterface"
, "receiveSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5736 "TestExampleInterface", "receiveSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5738( cx, "TestExampleInterface"
, "receiveSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5737 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5738( cx, "TestExampleInterface"
, "receiveSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5738 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5738( cx, "TestExampleInterface"
, "receiveSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5739
5740 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5741 auto result(StrongOrRawPtr<mozilla::dom::TestInterface>(MOZ_KnownLive(self)(self)->ReceiveSelf()));
5742 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5742); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5742; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5743 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
5744 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5744); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 5744; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
5745 return false;
5746 }
5747 return true;
5748}
5749
5750static const JSJitInfo receiveSelf_methodinfo = {
5751 { (JSJitGetterOp)receiveSelf },
5752 { prototypes::id::TestExampleInterface },
5753 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5754 JSJitInfo::Method,
5755 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5756 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
5757 false, /* isInfallible. False in setters. */
5758 false, /* isMovable. Not relevant for setters. */
5759 false, /* isEliminatable. Not relevant for setters. */
5760 false, /* isAlwaysInSlot. Only relevant for getters. */
5761 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5762 false, /* isTypedMethod. Only relevant for methods. */
5763 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5764};
5765
5766MOZ_CAN_RUN_SCRIPT static bool
5767receiveNullableSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5768{
5769 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5772( cx, "TestExampleInterface"
, "receiveNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5770 "TestExampleInterface", "receiveNullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5772( cx, "TestExampleInterface"
, "receiveNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5771 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5772( cx, "TestExampleInterface"
, "receiveNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5772 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5772( cx, "TestExampleInterface"
, "receiveNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5773
5774 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5775 auto result(StrongOrRawPtr<mozilla::dom::TestInterface>(MOZ_KnownLive(self)(self)->ReceiveNullableSelf()));
5776 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5776); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5776; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5777 if (!result) {
5778 args.rval().setNull();
5779 return true;
5780 }
5781 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
5782 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5782); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 5782; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
5783 return false;
5784 }
5785 return true;
5786}
5787
5788static const JSJitInfo receiveNullableSelf_methodinfo = {
5789 { (JSJitGetterOp)receiveNullableSelf },
5790 { prototypes::id::TestExampleInterface },
5791 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5792 JSJitInfo::Method,
5793 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5794 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
5795 false, /* isInfallible. False in setters. */
5796 false, /* isMovable. Not relevant for setters. */
5797 false, /* isEliminatable. Not relevant for setters. */
5798 false, /* isAlwaysInSlot. Only relevant for getters. */
5799 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5800 false, /* isTypedMethod. Only relevant for methods. */
5801 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5802};
5803
5804MOZ_CAN_RUN_SCRIPT static bool
5805receiveWeakSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5806{
5807 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5810( cx, "TestExampleInterface"
, "receiveWeakSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5808 "TestExampleInterface", "receiveWeakSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5810( cx, "TestExampleInterface"
, "receiveWeakSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5809 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5810( cx, "TestExampleInterface"
, "receiveWeakSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5810 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5810( cx, "TestExampleInterface"
, "receiveWeakSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5811
5812 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5813 auto result(StrongOrRawPtr<mozilla::dom::TestInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakSelf()));
5814 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5814); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5814; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5815 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
5816 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5816); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 5816; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
5817 return false;
5818 }
5819 return true;
5820}
5821
5822static const JSJitInfo receiveWeakSelf_methodinfo = {
5823 { (JSJitGetterOp)receiveWeakSelf },
5824 { prototypes::id::TestExampleInterface },
5825 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5826 JSJitInfo::Method,
5827 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5828 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
5829 false, /* isInfallible. False in setters. */
5830 false, /* isMovable. Not relevant for setters. */
5831 false, /* isEliminatable. Not relevant for setters. */
5832 false, /* isAlwaysInSlot. Only relevant for getters. */
5833 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5834 false, /* isTypedMethod. Only relevant for methods. */
5835 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5836};
5837
5838MOZ_CAN_RUN_SCRIPT static bool
5839receiveWeakNullableSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5840{
5841 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5844( cx, "TestExampleInterface"
, "receiveWeakNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5842 "TestExampleInterface", "receiveWeakNullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5844( cx, "TestExampleInterface"
, "receiveWeakNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5843 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5844( cx, "TestExampleInterface"
, "receiveWeakNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5844 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5844( cx, "TestExampleInterface"
, "receiveWeakNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5845
5846 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5847 auto result(StrongOrRawPtr<mozilla::dom::TestInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakNullableSelf()));
5848 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5848); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5848; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5849 if (!result) {
5850 args.rval().setNull();
5851 return true;
5852 }
5853 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
5854 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5854); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 5854; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
5855 return false;
5856 }
5857 return true;
5858}
5859
5860static const JSJitInfo receiveWeakNullableSelf_methodinfo = {
5861 { (JSJitGetterOp)receiveWeakNullableSelf },
5862 { prototypes::id::TestExampleInterface },
5863 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5864 JSJitInfo::Method,
5865 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5866 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
5867 false, /* isInfallible. False in setters. */
5868 false, /* isMovable. Not relevant for setters. */
5869 false, /* isEliminatable. Not relevant for setters. */
5870 false, /* isAlwaysInSlot. Only relevant for getters. */
5871 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5872 false, /* isTypedMethod. Only relevant for methods. */
5873 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5874};
5875
5876MOZ_CAN_RUN_SCRIPT static bool
5877passSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5878{
5879 BindingCallContext cx(cx_, "TestExampleInterface.passSelf");
5880 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5883( cx, "TestExampleInterface"
, "passSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
5881 "TestExampleInterface", "passSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5883( cx, "TestExampleInterface"
, "passSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
5882 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5883( cx, "TestExampleInterface"
, "passSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
5883 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5883( cx, "TestExampleInterface"
, "passSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
5884
5885 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5886 if (!args.requireAtLeast(cx, "TestExampleInterface.passSelf", 1)) {
5887 return false;
5888 }
5889 NonNull<mozilla::dom::TestInterface> arg0;
5890 if (args[0].isObject()) {
5891 {
5892 // Our JSContext should be in the right global to do unwrapping in.
5893 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
5894 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
5895 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
5896 return false;
5897 }
5898 }
5899 } else {
5900 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
5901 return false;
5902 }
5903 // NOTE: This assert does NOT call the function.
5904 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSelf(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
5905 MOZ_KnownLive(self)(self)->PassSelf(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
5906 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5906); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5906; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5907 args.rval().setUndefined();
5908 return true;
5909}
5910
5911static const JSJitInfo passSelf_methodinfo = {
5912 { (JSJitGetterOp)passSelf },
5913 { prototypes::id::TestExampleInterface },
5914 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5915 JSJitInfo::Method,
5916 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5917 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5918 false, /* isInfallible. False in setters. */
5919 false, /* isMovable. Not relevant for setters. */
5920 false, /* isEliminatable. Not relevant for setters. */
5921 false, /* isAlwaysInSlot. Only relevant for getters. */
5922 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5923 false, /* isTypedMethod. Only relevant for methods. */
5924 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5925};
5926
5927MOZ_CAN_RUN_SCRIPT static bool
5928passNullableSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5929{
5930 BindingCallContext cx(cx_, "TestExampleInterface.passNullableSelf");
5931 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5934( cx, "TestExampleInterface"
, "passNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5932 "TestExampleInterface", "passNullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5934( cx, "TestExampleInterface"
, "passNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5933 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5934( cx, "TestExampleInterface"
, "passNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5934 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5934( cx, "TestExampleInterface"
, "passNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5935
5936 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5937 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableSelf", 1)) {
5938 return false;
5939 }
5940 mozilla::dom::TestInterface* arg0;
5941 if (args[0].isObject()) {
5942 {
5943 // Our JSContext should be in the right global to do unwrapping in.
5944 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
5945 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
5946 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
5947 return false;
5948 }
5949 }
5950 } else if (args[0].isNullOrUndefined()) {
5951 arg0 = nullptr;
5952 } else {
5953 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
5954 return false;
5955 }
5956 // NOTE: This assert does NOT call the function.
5957 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
5958 MOZ_KnownLive(self)(self)->PassNullableSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
5959 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5959); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5959; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5960 args.rval().setUndefined();
5961 return true;
5962}
5963
5964static const JSJitInfo passNullableSelf_methodinfo = {
5965 { (JSJitGetterOp)passNullableSelf },
5966 { prototypes::id::TestExampleInterface },
5967 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
5968 JSJitInfo::Method,
5969 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5970 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5971 false, /* isInfallible. False in setters. */
5972 false, /* isMovable. Not relevant for setters. */
5973 false, /* isEliminatable. Not relevant for setters. */
5974 false, /* isAlwaysInSlot. Only relevant for getters. */
5975 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5976 false, /* isTypedMethod. Only relevant for methods. */
5977 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5978};
5979
5980MOZ_CAN_RUN_SCRIPT static bool
5981get_nonNullSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
5982{
5983 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5986( cx, "TestExampleInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5984 "TestExampleInterface", "nonNullSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5986( cx, "TestExampleInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5985 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject5986( cx, "TestExampleInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5986 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5986( cx, "TestExampleInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5987
5988 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
5989 auto result(StrongOrRawPtr<mozilla::dom::TestInterface>(MOZ_KnownLive(self)(self)->NonNullSelf()));
5990 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5990); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5990; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5991 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
5992 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 5992); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 5992; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
5993 return false;
5994 }
5995 return true;
5996}
5997
5998MOZ_CAN_RUN_SCRIPT static bool
5999set_nonNullSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
6000{
6001 BindingCallContext cx(cx_, "TestExampleInterface.nonNullSelf setter");
6002 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6005( cx, "TestExampleInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6003 "TestExampleInterface", "nonNullSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6005( cx, "TestExampleInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6004 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject6005( cx, "TestExampleInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6005 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6005( cx, "TestExampleInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6006
6007 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6008 NonNull<mozilla::dom::TestInterface> arg0;
6009 if (args[0].isObject()) {
6010 {
6011 // Our JSContext should be in the right global to do unwrapping in.
6012 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
6013 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6014 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestInterface");
6015 return false;
6016 }
6017 }
6018 } else {
6019 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
6020 return false;
6021 }
6022 // NOTE: This assert does NOT call the function.
6023 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNonNullSelf(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
6024 MOZ_KnownLive(self)(self)->SetNonNullSelf(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
6025 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6025); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6025; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6026
6027 return true;
6028}
6029
6030static const JSJitInfo nonNullSelf_getterinfo = {
6031 { get_nonNullSelf },
6032 { prototypes::id::TestExampleInterface },
6033 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6034 JSJitInfo::Getter,
6035 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6036 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6037 false, /* isInfallible. False in setters. */
6038 false, /* isMovable. Not relevant for setters. */
6039 false, /* isEliminatable. Not relevant for setters. */
6040 false, /* isAlwaysInSlot. Only relevant for getters. */
6041 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6042 false, /* isTypedMethod. Only relevant for methods. */
6043 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6044};
6045static const JSJitInfo nonNullSelf_setterinfo = {
6046 { (JSJitGetterOp)set_nonNullSelf },
6047 { prototypes::id::TestExampleInterface },
6048 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6049 JSJitInfo::Setter,
6050 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6051 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6052 false, /* isInfallible. False in setters. */
6053 false, /* isMovable. Not relevant for setters. */
6054 false, /* isEliminatable. Not relevant for setters. */
6055 false, /* isAlwaysInSlot. Only relevant for getters. */
6056 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6057 false, /* isTypedMethod. Only relevant for methods. */
6058 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6059};
6060
6061MOZ_CAN_RUN_SCRIPT static bool
6062get_nullableSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
6063{
6064 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6067( cx, "TestExampleInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6065 "TestExampleInterface", "nullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6067( cx, "TestExampleInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6066 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject6067( cx, "TestExampleInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6067 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6067( cx, "TestExampleInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6068
6069 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6070 auto result(StrongOrRawPtr<mozilla::dom::TestInterface>(MOZ_KnownLive(self)(self)->GetNullableSelf()));
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)"
, "../TestExampleGenBinding.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)"
, "../TestExampleGenBinding.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
6083MOZ_CAN_RUN_SCRIPT static bool
6084set_nullableSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
6085{
6086 BindingCallContext cx(cx_, "TestExampleInterface.nullableSelf setter");
6087 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6090( cx, "TestExampleInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6088 "TestExampleInterface", "nullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6090( cx, "TestExampleInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6089 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject6090( cx, "TestExampleInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6090 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6090( cx, "TestExampleInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6091
6092 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6093 mozilla::dom::TestInterface* arg0;
6094 if (args[0].isObject()) {
6095 {
6096 // Our JSContext should be in the right global to do unwrapping in.
6097 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
6098 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6099 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestInterface");
6100 return false;
6101 }
6102 }
6103 } else if (args[0].isNullOrUndefined()) {
6104 arg0 = nullptr;
6105 } else {
6106 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
6107 return false;
6108 }
6109 // NOTE: This assert does NOT call the function.
6110 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNullableSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
6111 MOZ_KnownLive(self)(self)->SetNullableSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
6112 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6112); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6112; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6113
6114 return true;
6115}
6116
6117static const JSJitInfo nullableSelf_getterinfo = {
6118 { get_nullableSelf },
6119 { prototypes::id::TestExampleInterface },
6120 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6121 JSJitInfo::Getter,
6122 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6123 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
6124 false, /* isInfallible. False in setters. */
6125 false, /* isMovable. Not relevant for setters. */
6126 false, /* isEliminatable. Not relevant for setters. */
6127 false, /* isAlwaysInSlot. Only relevant for getters. */
6128 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6129 false, /* isTypedMethod. Only relevant for methods. */
6130 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6131};
6132static const JSJitInfo nullableSelf_setterinfo = {
6133 { (JSJitGetterOp)set_nullableSelf },
6134 { prototypes::id::TestExampleInterface },
6135 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6136 JSJitInfo::Setter,
6137 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6138 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6139 false, /* isInfallible. False in setters. */
6140 false, /* isMovable. Not relevant for setters. */
6141 false, /* isEliminatable. Not relevant for setters. */
6142 false, /* isAlwaysInSlot. Only relevant for getters. */
6143 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6144 false, /* isTypedMethod. Only relevant for methods. */
6145 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6146};
6147
6148MOZ_CAN_RUN_SCRIPT static bool
6149get_cachedSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
6150{
6151 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6154( cx, "TestExampleInterface"
, "cachedSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6152 "TestExampleInterface", "cachedSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6154( cx, "TestExampleInterface"
, "cachedSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6153 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject6154( cx, "TestExampleInterface"
, "cachedSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6154 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6154( cx, "TestExampleInterface"
, "cachedSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6155
6156 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6157 // Have to either root across the getter call or reget after.
6158 JS::Rooted<JSObject*> slotStorage(cx, js::UncheckedUnwrap(obj, /* stopAtWindowProxy = */ false));
6159 MOZ_ASSERT(IsDOMObject(slotStorage))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsDOMObject(slotStorage))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsDOMObject(slotStorage)))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("IsDOMObject(slotStorage)"
, "../TestExampleGenBinding.cpp", 6159); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "IsDOMObject(slotStorage)" ")"); do { *((volatile
int*)__null) = 6159; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6160 const size_t slotIndex = (DOM_INSTANCE_RESERVED_SLOTS1 + 3);
6161 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 6161); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 6161; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
6162 {
6163 // Scope for cachedVal
6164 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
6165 if (!cachedVal.isUndefined()) {
6166 args.rval().set(cachedVal);
6167 // The cached value is in the compartment of slotStorage,
6168 // so wrap into the caller compartment as needed.
6169 return MaybeWrapValue(cx, args.rval());
6170 }
6171 }
6172
6173 auto result(StrongOrRawPtr<mozilla::dom::TestInterface>(MOZ_KnownLive(self)(self)->CachedSelf()));
6174 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6174); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6174; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6175 {
6176 JS::Rooted<JSObject*> conversionScope(cx, slotStorage);
6177 JSAutoRealm ar(cx, conversionScope);
6178 do { // block we break out of when done wrapping
6179 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
6180 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6180); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6180; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6181 return false;
6182 }
6183 break;
6184 } while (false);
6185 }
6186 { // And now store things in the realm of our slotStorage.
6187 JSAutoRealm ar(cx, slotStorage);
6188 // Make a copy so that we don't do unnecessary wrapping on args.rval().
6189 JS::Rooted<JS::Value> storedVal(cx, args.rval());
6190 if (!MaybeWrapValue(cx, &storedVal)) {
6191 return false;
6192 }
6193 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
6194 PreserveWrapper(self);
6195 }
6196 // And now make sure args.rval() is in the caller realm.
6197 return MaybeWrapValue(cx, args.rval());
6198}
6199
6200static const JSJitInfo cachedSelf_getterinfo = {
6201 { get_cachedSelf },
6202 { prototypes::id::TestExampleInterface },
6203 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6204 JSJitInfo::Getter,
6205 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
6206 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6207 false, /* isInfallible. False in setters. */
6208 true, /* isMovable. Not relevant for setters. */
6209 true, /* isEliminatable. Not relevant for setters. */
6210 false, /* isAlwaysInSlot. Only relevant for getters. */
6211 true, /* isLazilyCachedInSlot. Only relevant for getters. */
6212 false, /* isTypedMethod. Only relevant for methods. */
6213 (DOM_INSTANCE_RESERVED_SLOTS1 + 3) /* Reserved slot index, if we're stored in a slot, else 0. */
6214};
6215static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 3) <= JSJitInfo::maxSlotIndex, "We won't fit");
6216static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 3) < 22, "There is no slot for us");
6217
6218MOZ_CAN_RUN_SCRIPT static bool
6219passOptionalSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6220{
6221 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalSelf");
6222 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6225( cx, "TestExampleInterface"
, "passOptionalSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6223 "TestExampleInterface", "passOptionalSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6225( cx, "TestExampleInterface"
, "passOptionalSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6224 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6225( cx, "TestExampleInterface"
, "passOptionalSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6225 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6225( cx, "TestExampleInterface"
, "passOptionalSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6226
6227 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6228 Optional<mozilla::dom::TestInterface*> arg0;
6229 if (args.hasDefined(0)) {
6230 arg0.Construct();
6231 if (args[0].isObject()) {
6232 {
6233 // Our JSContext should be in the right global to do unwrapping in.
6234 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
6235 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6236 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
6237 return false;
6238 }
6239 }
6240 } else if (args[0].isNullOrUndefined()) {
6241 arg0.Value() = nullptr;
6242 } else {
6243 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6244 return false;
6245 }
6246 }
6247 // NOTE: This assert does NOT call the function.
6248 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
6249 MOZ_KnownLive(self)(self)->PassOptionalSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
6250 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6250); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6250; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6251 args.rval().setUndefined();
6252 return true;
6253}
6254
6255static const JSJitInfo passOptionalSelf_methodinfo = {
6256 { (JSJitGetterOp)passOptionalSelf },
6257 { prototypes::id::TestExampleInterface },
6258 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6259 JSJitInfo::Method,
6260 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6261 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6262 false, /* isInfallible. False in setters. */
6263 false, /* isMovable. Not relevant for setters. */
6264 false, /* isEliminatable. Not relevant for setters. */
6265 false, /* isAlwaysInSlot. Only relevant for getters. */
6266 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6267 false, /* isTypedMethod. Only relevant for methods. */
6268 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6269};
6270
6271MOZ_CAN_RUN_SCRIPT static bool
6272passOptionalNonNullSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6273{
6274 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNonNullSelf");
6275 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6278( cx, "TestExampleInterface"
, "passOptionalNonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6276 "TestExampleInterface", "passOptionalNonNullSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6278( cx, "TestExampleInterface"
, "passOptionalNonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6277 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6278( cx, "TestExampleInterface"
, "passOptionalNonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6278 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6278( cx, "TestExampleInterface"
, "passOptionalNonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6279
6280 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6281 Optional<NonNull<mozilla::dom::TestInterface>> arg0;
6282 if (args.hasDefined(0)) {
6283 arg0.Construct();
6284 if (args[0].isObject()) {
6285 {
6286 // Our JSContext should be in the right global to do unwrapping in.
6287 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
6288 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6289 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
6290 return false;
6291 }
6292 }
6293 } else {
6294 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6295 return false;
6296 }
6297 }
6298 // NOTE: This assert does NOT call the function.
6299 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNonNullSelf(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0)))))>, "Should be returning void here");
6300 MOZ_KnownLive(self)(self)->PassOptionalNonNullSelf(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))));
6301 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6301); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6301; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6302 args.rval().setUndefined();
6303 return true;
6304}
6305
6306static const JSJitInfo passOptionalNonNullSelf_methodinfo = {
6307 { (JSJitGetterOp)passOptionalNonNullSelf },
6308 { prototypes::id::TestExampleInterface },
6309 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6310 JSJitInfo::Method,
6311 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6312 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6313 false, /* isInfallible. False in setters. */
6314 false, /* isMovable. Not relevant for setters. */
6315 false, /* isEliminatable. Not relevant for setters. */
6316 false, /* isAlwaysInSlot. Only relevant for getters. */
6317 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6318 false, /* isTypedMethod. Only relevant for methods. */
6319 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6320};
6321
6322MOZ_CAN_RUN_SCRIPT static bool
6323passOptionalSelfWithDefault(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6324{
6325 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalSelfWithDefault");
6326 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6329( cx, "TestExampleInterface"
, "passOptionalSelfWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6327 "TestExampleInterface", "passOptionalSelfWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6329( cx, "TestExampleInterface"
, "passOptionalSelfWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6328 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6329( cx, "TestExampleInterface"
, "passOptionalSelfWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6329 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6329( cx, "TestExampleInterface"
, "passOptionalSelfWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6330
6331 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6332 mozilla::dom::TestInterface* arg0;
6333 if (args.hasDefined(0)) {
6334 if (args[0].isObject()) {
6335 {
6336 // Our JSContext should be in the right global to do unwrapping in.
6337 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
6338 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6339 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
6340 return false;
6341 }
6342 }
6343 } else if (args[0].isNullOrUndefined()) {
6344 arg0 = nullptr;
6345 } else {
6346 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6347 return false;
6348 }
6349 } else {
6350 arg0 = nullptr;
6351 }
6352 // NOTE: This assert does NOT call the function.
6353 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSelfWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
6354 MOZ_KnownLive(self)(self)->PassOptionalSelfWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
6355 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6355); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6355; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6356 args.rval().setUndefined();
6357 return true;
6358}
6359
6360static const JSJitInfo passOptionalSelfWithDefault_methodinfo = {
6361 { (JSJitGetterOp)passOptionalSelfWithDefault },
6362 { prototypes::id::TestExampleInterface },
6363 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6364 JSJitInfo::Method,
6365 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6366 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6367 false, /* isInfallible. False in setters. */
6368 false, /* isMovable. Not relevant for setters. */
6369 false, /* isEliminatable. Not relevant for setters. */
6370 false, /* isAlwaysInSlot. Only relevant for getters. */
6371 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6372 false, /* isTypedMethod. Only relevant for methods. */
6373 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6374};
6375
6376MOZ_CAN_RUN_SCRIPT static bool
6377receiveNonWrapperCacheInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6378{
6379 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6382( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6380 "TestExampleInterface", "receiveNonWrapperCacheInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6382( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6381 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6382( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6382 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6382( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6383
6384 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6385 auto result(StrongOrRawPtr<mozilla::dom::TestNonWrapperCacheInterface>(MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterface()));
6386 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6386); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6386; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6387 static_assert(!std::is_pointer_v<decltype(result)>,
6388 "NewObject implies that we need to keep the object alive with a strong reference.");
6389 if (!WrapNewBindingNonWrapperCachedObject(cx, obj, result, args.rval())) {
6390 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6390); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6390; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6391 return false;
6392 }
6393 return true;
6394}
6395
6396static const JSJitInfo receiveNonWrapperCacheInterface_methodinfo = {
6397 { (JSJitGetterOp)receiveNonWrapperCacheInterface },
6398 { prototypes::id::TestExampleInterface },
6399 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6400 JSJitInfo::Method,
6401 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6402 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6403 false, /* isInfallible. False in setters. */
6404 false, /* isMovable. Not relevant for setters. */
6405 false, /* isEliminatable. Not relevant for setters. */
6406 false, /* isAlwaysInSlot. Only relevant for getters. */
6407 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6408 false, /* isTypedMethod. Only relevant for methods. */
6409 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6410};
6411
6412MOZ_CAN_RUN_SCRIPT static bool
6413receiveNullableNonWrapperCacheInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6414{
6415 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6418( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6416 "TestExampleInterface", "receiveNullableNonWrapperCacheInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6418( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6417 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6418( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6418 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6418( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6419
6420 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6421 auto result(StrongOrRawPtr<mozilla::dom::TestNonWrapperCacheInterface>(MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterface()));
6422 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6422); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6422; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6423 static_assert(!std::is_pointer_v<decltype(result)>,
6424 "NewObject implies that we need to keep the object alive with a strong reference.");
6425 if (!result) {
6426 args.rval().setNull();
6427 return true;
6428 }
6429 if (!WrapNewBindingNonWrapperCachedObject(cx, obj, result, args.rval())) {
6430 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6430); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6430; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6431 return false;
6432 }
6433 return true;
6434}
6435
6436static const JSJitInfo receiveNullableNonWrapperCacheInterface_methodinfo = {
6437 { (JSJitGetterOp)receiveNullableNonWrapperCacheInterface },
6438 { prototypes::id::TestExampleInterface },
6439 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6440 JSJitInfo::Method,
6441 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6442 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
6443 false, /* isInfallible. False in setters. */
6444 false, /* isMovable. Not relevant for setters. */
6445 false, /* isEliminatable. Not relevant for setters. */
6446 false, /* isAlwaysInSlot. Only relevant for getters. */
6447 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6448 false, /* isTypedMethod. Only relevant for methods. */
6449 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6450};
6451
6452MOZ_CAN_RUN_SCRIPT static bool
6453receiveNonWrapperCacheInterfaceSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6454{
6455 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6458( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6456 "TestExampleInterface", "receiveNonWrapperCacheInterfaceSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6458( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6457 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6458( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6458 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6458( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6459
6460 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6461 nsTArray<StrongPtrForMember<mozilla::dom::TestNonWrapperCacheInterface>> result;
6462 // NOTE: This assert does NOT call the function.
6463 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterfaceSequence(result))>, "Should be returning void here");
6464 MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterfaceSequence(result);
6465 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6465); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6465; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6466
6467 uint32_t length = result.Length();
6468 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
6469 if (!returnArray) {
6470 return false;
6471 }
6472 // Scope for 'tmp'
6473 {
6474 JS::Rooted<JS::Value> tmp(cx);
6475 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
6476 // Control block to let us common up the JS_DefineElement calls when there
6477 // are different ways to succeed at wrapping the object.
6478 do {
6479 if (!WrapNewBindingNonWrapperCachedObject(cx, returnArray, result[sequenceIdx0], &tmp)) {
6480 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6480); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6480; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6481 return false;
6482 }
6483 break;
6484 } while (false);
6485 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
6486 JSPROP_ENUMERATE)) {
6487 return false;
6488 }
6489 }
6490 }
6491 args.rval().setObject(*returnArray);
6492 return true;
6493}
6494
6495static const JSJitInfo receiveNonWrapperCacheInterfaceSequence_methodinfo = {
6496 { (JSJitGetterOp)receiveNonWrapperCacheInterfaceSequence },
6497 { prototypes::id::TestExampleInterface },
6498 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6499 JSJitInfo::Method,
6500 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6501 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6502 false, /* isInfallible. False in setters. */
6503 false, /* isMovable. Not relevant for setters. */
6504 false, /* isEliminatable. Not relevant for setters. */
6505 false, /* isAlwaysInSlot. Only relevant for getters. */
6506 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6507 false, /* isTypedMethod. Only relevant for methods. */
6508 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6509};
6510
6511MOZ_CAN_RUN_SCRIPT static bool
6512receiveNullableNonWrapperCacheInterfaceSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6513{
6514 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6517( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6515 "TestExampleInterface", "receiveNullableNonWrapperCacheInterfaceSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6517( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6516 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6517( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6517 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6517( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6518
6519 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6520 nsTArray<StrongPtrForMember<mozilla::dom::TestNonWrapperCacheInterface>> result;
6521 // NOTE: This assert does NOT call the function.
6522 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterfaceSequence(result))>, "Should be returning void here");
6523 MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterfaceSequence(result);
6524 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6524); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6524; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6525
6526 uint32_t length = result.Length();
6527 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
6528 if (!returnArray) {
6529 return false;
6530 }
6531 // Scope for 'tmp'
6532 {
6533 JS::Rooted<JS::Value> tmp(cx);
6534 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
6535 // Control block to let us common up the JS_DefineElement calls when there
6536 // are different ways to succeed at wrapping the object.
6537 do {
6538 if (!result[sequenceIdx0]) {
6539 tmp.setNull();
6540 break;
6541 }
6542 if (!WrapNewBindingNonWrapperCachedObject(cx, returnArray, result[sequenceIdx0], &tmp)) {
6543 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6543); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6543; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6544 return false;
6545 }
6546 break;
6547 } while (false);
6548 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
6549 JSPROP_ENUMERATE)) {
6550 return false;
6551 }
6552 }
6553 }
6554 args.rval().setObject(*returnArray);
6555 return true;
6556}
6557
6558static const JSJitInfo receiveNullableNonWrapperCacheInterfaceSequence_methodinfo = {
6559 { (JSJitGetterOp)receiveNullableNonWrapperCacheInterfaceSequence },
6560 { prototypes::id::TestExampleInterface },
6561 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6562 JSJitInfo::Method,
6563 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6564 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6565 false, /* isInfallible. False in setters. */
6566 false, /* isMovable. Not relevant for setters. */
6567 false, /* isEliminatable. Not relevant for setters. */
6568 false, /* isAlwaysInSlot. Only relevant for getters. */
6569 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6570 false, /* isTypedMethod. Only relevant for methods. */
6571 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6572};
6573
6574MOZ_CAN_RUN_SCRIPT static bool
6575receiveNonWrapperCacheInterfaceNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6576{
6577 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6580( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterfaceNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6578 "TestExampleInterface", "receiveNonWrapperCacheInterfaceNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6580( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterfaceNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6579 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6580( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterfaceNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6580 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6580( cx, "TestExampleInterface"
, "receiveNonWrapperCacheInterfaceNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6581
6582 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6583 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestNonWrapperCacheInterface>>> result;
6584 // NOTE: This assert does NOT call the function.
6585 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterfaceNullableSequence(result))>, "Should be returning void here");
6586 MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterfaceNullableSequence(result);
6587 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6587); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6587; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6588
6589 if (result.IsNull()) {
6590 args.rval().setNull();
6591 return true;
6592 }
6593
6594 uint32_t length = result.Value().Length();
6595 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
6596 if (!returnArray) {
6597 return false;
6598 }
6599 // Scope for 'tmp'
6600 {
6601 JS::Rooted<JS::Value> tmp(cx);
6602 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
6603 // Control block to let us common up the JS_DefineElement calls when there
6604 // are different ways to succeed at wrapping the object.
6605 do {
6606 if (!WrapNewBindingNonWrapperCachedObject(cx, returnArray, result.Value()[sequenceIdx0], &tmp)) {
6607 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6607); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6607; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6608 return false;
6609 }
6610 break;
6611 } while (false);
6612 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
6613 JSPROP_ENUMERATE)) {
6614 return false;
6615 }
6616 }
6617 }
6618 args.rval().setObject(*returnArray);
6619 return true;
6620}
6621
6622static const JSJitInfo receiveNonWrapperCacheInterfaceNullableSequence_methodinfo = {
6623 { (JSJitGetterOp)receiveNonWrapperCacheInterfaceNullableSequence },
6624 { prototypes::id::TestExampleInterface },
6625 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6626 JSJitInfo::Method,
6627 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6628 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
6629 false, /* isInfallible. False in setters. */
6630 false, /* isMovable. Not relevant for setters. */
6631 false, /* isEliminatable. Not relevant for setters. */
6632 false, /* isAlwaysInSlot. Only relevant for getters. */
6633 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6634 false, /* isTypedMethod. Only relevant for methods. */
6635 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6636};
6637
6638MOZ_CAN_RUN_SCRIPT static bool
6639receiveNullableNonWrapperCacheInterfaceNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6640{
6641 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6644( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterfaceNullableSequence", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
6642 "TestExampleInterface", "receiveNullableNonWrapperCacheInterfaceNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6644( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterfaceNullableSequence", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
6643 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6644( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterfaceNullableSequence", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
6644 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6644( cx, "TestExampleInterface"
, "receiveNullableNonWrapperCacheInterfaceNullableSequence", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
6645
6646 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6647 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestNonWrapperCacheInterface>>> result;
6648 // NOTE: This assert does NOT call the function.
6649 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterfaceNullableSequence(result))>, "Should be returning void here");
6650 MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterfaceNullableSequence(result);
6651 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6651); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6651; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6652
6653 if (result.IsNull()) {
6654 args.rval().setNull();
6655 return true;
6656 }
6657
6658 uint32_t length = result.Value().Length();
6659 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
6660 if (!returnArray) {
6661 return false;
6662 }
6663 // Scope for 'tmp'
6664 {
6665 JS::Rooted<JS::Value> tmp(cx);
6666 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
6667 // Control block to let us common up the JS_DefineElement calls when there
6668 // are different ways to succeed at wrapping the object.
6669 do {
6670 if (!result.Value()[sequenceIdx0]) {
6671 tmp.setNull();
6672 break;
6673 }
6674 if (!WrapNewBindingNonWrapperCachedObject(cx, returnArray, result.Value()[sequenceIdx0], &tmp)) {
6675 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6675); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6675; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6676 return false;
6677 }
6678 break;
6679 } while (false);
6680 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
6681 JSPROP_ENUMERATE)) {
6682 return false;
6683 }
6684 }
6685 }
6686 args.rval().setObject(*returnArray);
6687 return true;
6688}
6689
6690static const JSJitInfo receiveNullableNonWrapperCacheInterfaceNullableSequence_methodinfo = {
6691 { (JSJitGetterOp)receiveNullableNonWrapperCacheInterfaceNullableSequence },
6692 { prototypes::id::TestExampleInterface },
6693 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6694 JSJitInfo::Method,
6695 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6696 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
6697 false, /* isInfallible. False in setters. */
6698 false, /* isMovable. Not relevant for setters. */
6699 false, /* isEliminatable. Not relevant for setters. */
6700 false, /* isAlwaysInSlot. Only relevant for getters. */
6701 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6702 false, /* isTypedMethod. Only relevant for methods. */
6703 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6704};
6705
6706MOZ_CAN_RUN_SCRIPT static bool
6707receiveExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6708{
6709 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6712( cx, "TestExampleInterface"
, "receiveExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6710 "TestExampleInterface", "receiveExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6712( cx, "TestExampleInterface"
, "receiveExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6711 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6712( cx, "TestExampleInterface"
, "receiveExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6712 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6712( cx, "TestExampleInterface"
, "receiveExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6713
6714 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6715 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->ReceiveExternal()));
6716 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6716); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6716; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6717 if (!WrapObject(cx, result, args.rval())) {
6718 return false;
6719 }
6720 return true;
6721}
6722
6723static const JSJitInfo receiveExternal_methodinfo = {
6724 { (JSJitGetterOp)receiveExternal },
6725 { prototypes::id::TestExampleInterface },
6726 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6727 JSJitInfo::Method,
6728 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6729 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6730 false, /* isInfallible. False in setters. */
6731 false, /* isMovable. Not relevant for setters. */
6732 false, /* isEliminatable. Not relevant for setters. */
6733 false, /* isAlwaysInSlot. Only relevant for getters. */
6734 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6735 false, /* isTypedMethod. Only relevant for methods. */
6736 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6737};
6738
6739MOZ_CAN_RUN_SCRIPT static bool
6740receiveNullableExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6741{
6742 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6745( cx, "TestExampleInterface"
, "receiveNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6743 "TestExampleInterface", "receiveNullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6745( cx, "TestExampleInterface"
, "receiveNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6744 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6745( cx, "TestExampleInterface"
, "receiveNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6745 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6745( cx, "TestExampleInterface"
, "receiveNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6746
6747 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6748 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->ReceiveNullableExternal()));
6749 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6749); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6749; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6750 if (!result) {
6751 args.rval().setNull();
6752 return true;
6753 }
6754 if (!WrapObject(cx, result, args.rval())) {
6755 return false;
6756 }
6757 return true;
6758}
6759
6760static const JSJitInfo receiveNullableExternal_methodinfo = {
6761 { (JSJitGetterOp)receiveNullableExternal },
6762 { prototypes::id::TestExampleInterface },
6763 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6764 JSJitInfo::Method,
6765 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6766 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
6767 false, /* isInfallible. False in setters. */
6768 false, /* isMovable. Not relevant for setters. */
6769 false, /* isEliminatable. Not relevant for setters. */
6770 false, /* isAlwaysInSlot. Only relevant for getters. */
6771 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6772 false, /* isTypedMethod. Only relevant for methods. */
6773 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6774};
6775
6776MOZ_CAN_RUN_SCRIPT static bool
6777receiveWeakExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6778{
6779 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6782( cx, "TestExampleInterface"
, "receiveWeakExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6780 "TestExampleInterface", "receiveWeakExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6782( cx, "TestExampleInterface"
, "receiveWeakExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6781 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6782( cx, "TestExampleInterface"
, "receiveWeakExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6782 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6782( cx, "TestExampleInterface"
, "receiveWeakExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6783
6784 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6785 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakExternal()));
6786 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6786); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6786; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6787 if (!WrapObject(cx, result, args.rval())) {
6788 return false;
6789 }
6790 return true;
6791}
6792
6793static const JSJitInfo receiveWeakExternal_methodinfo = {
6794 { (JSJitGetterOp)receiveWeakExternal },
6795 { prototypes::id::TestExampleInterface },
6796 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6797 JSJitInfo::Method,
6798 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6799 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6800 false, /* isInfallible. False in setters. */
6801 false, /* isMovable. Not relevant for setters. */
6802 false, /* isEliminatable. Not relevant for setters. */
6803 false, /* isAlwaysInSlot. Only relevant for getters. */
6804 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6805 false, /* isTypedMethod. Only relevant for methods. */
6806 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6807};
6808
6809MOZ_CAN_RUN_SCRIPT static bool
6810receiveWeakNullableExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6811{
6812 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6815( cx, "TestExampleInterface"
, "receiveWeakNullableExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6813 "TestExampleInterface", "receiveWeakNullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6815( cx, "TestExampleInterface"
, "receiveWeakNullableExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6814 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6815( cx, "TestExampleInterface"
, "receiveWeakNullableExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6815 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6815( cx, "TestExampleInterface"
, "receiveWeakNullableExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6816
6817 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6818 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakNullableExternal()));
6819 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6819); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6819; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6820 if (!result) {
6821 args.rval().setNull();
6822 return true;
6823 }
6824 if (!WrapObject(cx, result, args.rval())) {
6825 return false;
6826 }
6827 return true;
6828}
6829
6830static const JSJitInfo receiveWeakNullableExternal_methodinfo = {
6831 { (JSJitGetterOp)receiveWeakNullableExternal },
6832 { prototypes::id::TestExampleInterface },
6833 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6834 JSJitInfo::Method,
6835 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6836 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
6837 false, /* isInfallible. False in setters. */
6838 false, /* isMovable. Not relevant for setters. */
6839 false, /* isEliminatable. Not relevant for setters. */
6840 false, /* isAlwaysInSlot. Only relevant for getters. */
6841 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6842 false, /* isTypedMethod. Only relevant for methods. */
6843 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6844};
6845
6846MOZ_CAN_RUN_SCRIPT static bool
6847passExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6848{
6849 BindingCallContext cx(cx_, "TestExampleInterface.passExternal");
6850 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6853( cx, "TestExampleInterface"
, "passExternal", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6851 "TestExampleInterface", "passExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6853( cx, "TestExampleInterface"
, "passExternal", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6852 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6853( cx, "TestExampleInterface"
, "passExternal", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6853 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6853( cx, "TestExampleInterface"
, "passExternal", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6854
6855 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6856 if (!args.requireAtLeast(cx, "TestExampleInterface.passExternal", 1)) {
6857 return false;
6858 }
6859 mozilla::dom::TestExternalInterface* arg0;
6860 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
6861 if (args[0].isObject()) {
6862 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
6863 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)))
) {
6864 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
6865 return false;
6866 }
6867 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", "../TestExampleGenBinding.cpp"
, 6867); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 6867; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
6868 arg0 = arg0_holder;
6869 } else {
6870 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6871 return false;
6872 }
6873 // NOTE: This assert does NOT call the function.
6874 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassExternal(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
6875 MOZ_KnownLive(self)(self)->PassExternal(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
6876 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6876); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6876; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6877 args.rval().setUndefined();
6878 return true;
6879}
6880
6881static const JSJitInfo passExternal_methodinfo = {
6882 { (JSJitGetterOp)passExternal },
6883 { prototypes::id::TestExampleInterface },
6884 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6885 JSJitInfo::Method,
6886 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6887 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6888 false, /* isInfallible. False in setters. */
6889 false, /* isMovable. Not relevant for setters. */
6890 false, /* isEliminatable. Not relevant for setters. */
6891 false, /* isAlwaysInSlot. Only relevant for getters. */
6892 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6893 false, /* isTypedMethod. Only relevant for methods. */
6894 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6895};
6896
6897MOZ_CAN_RUN_SCRIPT static bool
6898passNullableExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6899{
6900 BindingCallContext cx(cx_, "TestExampleInterface.passNullableExternal");
6901 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6904( cx, "TestExampleInterface"
, "passNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6902 "TestExampleInterface", "passNullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6904( cx, "TestExampleInterface"
, "passNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6903 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6904( cx, "TestExampleInterface"
, "passNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6904 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6904( cx, "TestExampleInterface"
, "passNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6905
6906 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6907 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableExternal", 1)) {
6908 return false;
6909 }
6910 mozilla::dom::TestExternalInterface* arg0;
6911 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
6912 if (args[0].isObject()) {
6913 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
6914 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)))
) {
6915 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
6916 return false;
6917 }
6918 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", "../TestExampleGenBinding.cpp"
, 6918); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 6918; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
6919 arg0 = arg0_holder;
6920 } else if (args[0].isNullOrUndefined()) {
6921 arg0 = nullptr;
6922 } else {
6923 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6924 return false;
6925 }
6926 // NOTE: This assert does NOT call the function.
6927 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
6928 MOZ_KnownLive(self)(self)->PassNullableExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
6929 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6929); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6929; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6930 args.rval().setUndefined();
6931 return true;
6932}
6933
6934static const JSJitInfo passNullableExternal_methodinfo = {
6935 { (JSJitGetterOp)passNullableExternal },
6936 { prototypes::id::TestExampleInterface },
6937 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
6938 JSJitInfo::Method,
6939 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6940 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6941 false, /* isInfallible. False in setters. */
6942 false, /* isMovable. Not relevant for setters. */
6943 false, /* isEliminatable. Not relevant for setters. */
6944 false, /* isAlwaysInSlot. Only relevant for getters. */
6945 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6946 false, /* isTypedMethod. Only relevant for methods. */
6947 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6948};
6949
6950MOZ_CAN_RUN_SCRIPT static bool
6951get_nonNullExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
6952{
6953 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6956( cx, "TestExampleInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6954 "TestExampleInterface", "nonNullExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6956( cx, "TestExampleInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6955 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject6956( cx, "TestExampleInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6956 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6956( cx, "TestExampleInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6957
6958 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6959 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->NonNullExternal()));
6960 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6960); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6960; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6961 if (!WrapObject(cx, result, args.rval())) {
6962 return false;
6963 }
6964 return true;
6965}
6966
6967MOZ_CAN_RUN_SCRIPT static bool
6968set_nonNullExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
6969{
6970 BindingCallContext cx(cx_, "TestExampleInterface.nonNullExternal setter");
6971 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6974( cx, "TestExampleInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6972 "TestExampleInterface", "nonNullExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6974( cx, "TestExampleInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6973 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject6974( cx, "TestExampleInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6974 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6974( cx, "TestExampleInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6975
6976 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
6977 mozilla::dom::TestExternalInterface* arg0;
6978 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
6979 if (args[0].isObject()) {
6980 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
6981 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)))
) {
6982 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestExternalInterface");
6983 return false;
6984 }
6985 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", "../TestExampleGenBinding.cpp"
, 6985); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 6985; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
6986 arg0 = arg0_holder;
6987 } else {
6988 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
6989 return false;
6990 }
6991 // NOTE: This assert does NOT call the function.
6992 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNonNullExternal(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
6993 MOZ_KnownLive(self)(self)->SetNonNullExternal(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
6994 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 6994); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6994; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6995
6996 return true;
6997}
6998
6999static const JSJitInfo nonNullExternal_getterinfo = {
7000 { get_nonNullExternal },
7001 { prototypes::id::TestExampleInterface },
7002 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7003 JSJitInfo::Getter,
7004 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7005 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
7006 false, /* isInfallible. False in setters. */
7007 false, /* isMovable. Not relevant for setters. */
7008 false, /* isEliminatable. Not relevant for setters. */
7009 false, /* isAlwaysInSlot. Only relevant for getters. */
7010 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7011 false, /* isTypedMethod. Only relevant for methods. */
7012 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7013};
7014static const JSJitInfo nonNullExternal_setterinfo = {
7015 { (JSJitGetterOp)set_nonNullExternal },
7016 { prototypes::id::TestExampleInterface },
7017 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7018 JSJitInfo::Setter,
7019 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7020 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7021 false, /* isInfallible. False in setters. */
7022 false, /* isMovable. Not relevant for setters. */
7023 false, /* isEliminatable. Not relevant for setters. */
7024 false, /* isAlwaysInSlot. Only relevant for getters. */
7025 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7026 false, /* isTypedMethod. Only relevant for methods. */
7027 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7028};
7029
7030MOZ_CAN_RUN_SCRIPT static bool
7031get_nullableExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
7032{
7033 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7036( cx, "TestExampleInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7034 "TestExampleInterface", "nullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7036( cx, "TestExampleInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7035 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject7036( cx, "TestExampleInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7036 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7036( cx, "TestExampleInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7037
7038 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7039 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->GetNullableExternal()));
7040 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7040); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7040; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7041 if (!result) {
7042 args.rval().setNull();
7043 return true;
7044 }
7045 if (!WrapObject(cx, result, args.rval())) {
7046 return false;
7047 }
7048 return true;
7049}
7050
7051MOZ_CAN_RUN_SCRIPT static bool
7052set_nullableExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
7053{
7054 BindingCallContext cx(cx_, "TestExampleInterface.nullableExternal setter");
7055 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7058( cx, "TestExampleInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7056 "TestExampleInterface", "nullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7058( cx, "TestExampleInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7057 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject7058( cx, "TestExampleInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7058 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7058( cx, "TestExampleInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7059
7060 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7061 mozilla::dom::TestExternalInterface* arg0;
7062 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
7063 if (args[0].isObject()) {
7064 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7065 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)))
) {
7066 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestExternalInterface");
7067 return false;
7068 }
7069 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", "../TestExampleGenBinding.cpp"
, 7069); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 7069; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
7070 arg0 = arg0_holder;
7071 } else if (args[0].isNullOrUndefined()) {
7072 arg0 = nullptr;
7073 } else {
7074 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
7075 return false;
7076 }
7077 // NOTE: This assert does NOT call the function.
7078 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNullableExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
7079 MOZ_KnownLive(self)(self)->SetNullableExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
7080 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7080); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7080; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7081
7082 return true;
7083}
7084
7085static const JSJitInfo nullableExternal_getterinfo = {
7086 { get_nullableExternal },
7087 { prototypes::id::TestExampleInterface },
7088 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7089 JSJitInfo::Getter,
7090 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7091 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
7092 false, /* isInfallible. False in setters. */
7093 false, /* isMovable. Not relevant for setters. */
7094 false, /* isEliminatable. Not relevant for setters. */
7095 false, /* isAlwaysInSlot. Only relevant for getters. */
7096 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7097 false, /* isTypedMethod. Only relevant for methods. */
7098 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7099};
7100static const JSJitInfo nullableExternal_setterinfo = {
7101 { (JSJitGetterOp)set_nullableExternal },
7102 { prototypes::id::TestExampleInterface },
7103 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7104 JSJitInfo::Setter,
7105 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7106 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7107 false, /* isInfallible. False in setters. */
7108 false, /* isMovable. Not relevant for setters. */
7109 false, /* isEliminatable. Not relevant for setters. */
7110 false, /* isAlwaysInSlot. Only relevant for getters. */
7111 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7112 false, /* isTypedMethod. Only relevant for methods. */
7113 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7114};
7115
7116MOZ_CAN_RUN_SCRIPT static bool
7117passOptionalExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7118{
7119 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalExternal");
7120 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7123( cx, "TestExampleInterface"
, "passOptionalExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7121 "TestExampleInterface", "passOptionalExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7123( cx, "TestExampleInterface"
, "passOptionalExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7122 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7123( cx, "TestExampleInterface"
, "passOptionalExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7123 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7123( cx, "TestExampleInterface"
, "passOptionalExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7124
7125 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7126 Optional<mozilla::dom::TestExternalInterface*> arg0;
7127 Maybe<RefPtr<mozilla::dom::TestExternalInterface>> arg0_holder;
7128 if (args.hasDefined(0)) {
7129 arg0.Construct();
7130 arg0_holder.emplace();
7131 if (args[0].isObject()) {
7132 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7133 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)))
) {
7134 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
7135 return false;
7136 }
7137 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()"
, "../TestExampleGenBinding.cpp", 7137); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "arg0_holder.ref()" ")"); do { *((volatile int
*)__null) = 7137; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
7138 arg0.Value() = arg0_holder.ref();
7139 } else if (args[0].isNullOrUndefined()) {
7140 arg0.Value() = nullptr;
7141 } else {
7142 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7143 return false;
7144 }
7145 }
7146 // NOTE: This assert does NOT call the function.
7147 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
7148 MOZ_KnownLive(self)(self)->PassOptionalExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
7149 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7149); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7149; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7150 args.rval().setUndefined();
7151 return true;
7152}
7153
7154static const JSJitInfo passOptionalExternal_methodinfo = {
7155 { (JSJitGetterOp)passOptionalExternal },
7156 { prototypes::id::TestExampleInterface },
7157 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7158 JSJitInfo::Method,
7159 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7160 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7161 false, /* isInfallible. False in setters. */
7162 false, /* isMovable. Not relevant for setters. */
7163 false, /* isEliminatable. Not relevant for setters. */
7164 false, /* isAlwaysInSlot. Only relevant for getters. */
7165 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7166 false, /* isTypedMethod. Only relevant for methods. */
7167 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7168};
7169
7170MOZ_CAN_RUN_SCRIPT static bool
7171passOptionalNonNullExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7172{
7173 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNonNullExternal");
7174 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7177( cx, "TestExampleInterface"
, "passOptionalNonNullExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7175 "TestExampleInterface", "passOptionalNonNullExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7177( cx, "TestExampleInterface"
, "passOptionalNonNullExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7176 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7177( cx, "TestExampleInterface"
, "passOptionalNonNullExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7177 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7177( cx, "TestExampleInterface"
, "passOptionalNonNullExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7178
7179 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7180 Optional<mozilla::dom::TestExternalInterface*> arg0;
7181 Maybe<RefPtr<mozilla::dom::TestExternalInterface>> arg0_holder;
7182 if (args.hasDefined(0)) {
7183 arg0.Construct();
7184 arg0_holder.emplace();
7185 if (args[0].isObject()) {
7186 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7187 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)))
) {
7188 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
7189 return false;
7190 }
7191 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()"
, "../TestExampleGenBinding.cpp", 7191); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "arg0_holder.ref()" ")"); do { *((volatile int
*)__null) = 7191; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
7192 arg0.Value() = arg0_holder.ref();
7193 } else {
7194 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7195 return false;
7196 }
7197 }
7198 // NOTE: This assert does NOT call the function.
7199 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNonNullExternal(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0)))))>, "Should be returning void here");
7200 MOZ_KnownLive(self)(self)->PassOptionalNonNullExternal(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))));
7201 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7201); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7201; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7202 args.rval().setUndefined();
7203 return true;
7204}
7205
7206static const JSJitInfo passOptionalNonNullExternal_methodinfo = {
7207 { (JSJitGetterOp)passOptionalNonNullExternal },
7208 { prototypes::id::TestExampleInterface },
7209 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7210 JSJitInfo::Method,
7211 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7212 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7213 false, /* isInfallible. False in setters. */
7214 false, /* isMovable. Not relevant for setters. */
7215 false, /* isEliminatable. Not relevant for setters. */
7216 false, /* isAlwaysInSlot. Only relevant for getters. */
7217 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7218 false, /* isTypedMethod. Only relevant for methods. */
7219 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7220};
7221
7222MOZ_CAN_RUN_SCRIPT static bool
7223passOptionalExternalWithDefault(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7224{
7225 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalExternalWithDefault");
7226 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7229( cx, "TestExampleInterface"
, "passOptionalExternalWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7227 "TestExampleInterface", "passOptionalExternalWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7229( cx, "TestExampleInterface"
, "passOptionalExternalWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7228 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7229( cx, "TestExampleInterface"
, "passOptionalExternalWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7229 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7229( cx, "TestExampleInterface"
, "passOptionalExternalWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7230
7231 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7232 mozilla::dom::TestExternalInterface* arg0;
7233 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
7234 if (args.hasDefined(0)) {
7235 if (args[0].isObject()) {
7236 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7237 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)))
) {
7238 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
7239 return false;
7240 }
7241 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", "../TestExampleGenBinding.cpp"
, 7241); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 7241; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
7242 arg0 = arg0_holder;
7243 } else if (args[0].isNullOrUndefined()) {
7244 arg0 = nullptr;
7245 } else {
7246 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7247 return false;
7248 }
7249 } else {
7250 arg0 = nullptr;
7251 }
7252 // NOTE: This assert does NOT call the function.
7253 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalExternalWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
7254 MOZ_KnownLive(self)(self)->PassOptionalExternalWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
7255 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7255); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7255; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7256 args.rval().setUndefined();
7257 return true;
7258}
7259
7260static const JSJitInfo passOptionalExternalWithDefault_methodinfo = {
7261 { (JSJitGetterOp)passOptionalExternalWithDefault },
7262 { prototypes::id::TestExampleInterface },
7263 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7264 JSJitInfo::Method,
7265 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7266 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7267 false, /* isInfallible. False in setters. */
7268 false, /* isMovable. Not relevant for setters. */
7269 false, /* isEliminatable. Not relevant for setters. */
7270 false, /* isAlwaysInSlot. Only relevant for getters. */
7271 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7272 false, /* isTypedMethod. Only relevant for methods. */
7273 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7274};
7275
7276MOZ_CAN_RUN_SCRIPT static bool
7277receiveCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7278{
7279 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7282( cx, "TestExampleInterface"
, "receiveCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7280 "TestExampleInterface", "receiveCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7282( cx, "TestExampleInterface"
, "receiveCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7281 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7282( cx, "TestExampleInterface"
, "receiveCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7282 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7282( cx, "TestExampleInterface"
, "receiveCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7283
7284 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7285 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->ReceiveCallbackInterface()));
7286 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7286); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7286; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7287 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
7288 if (!MaybeWrapObjectValue(cx, args.rval())) {
7289 return false;
7290 }
7291 return true;
7292}
7293
7294static const JSJitInfo receiveCallbackInterface_methodinfo = {
7295 { (JSJitGetterOp)receiveCallbackInterface },
7296 { prototypes::id::TestExampleInterface },
7297 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7298 JSJitInfo::Method,
7299 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7300 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
7301 false, /* isInfallible. False in setters. */
7302 false, /* isMovable. Not relevant for setters. */
7303 false, /* isEliminatable. Not relevant for setters. */
7304 false, /* isAlwaysInSlot. Only relevant for getters. */
7305 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7306 false, /* isTypedMethod. Only relevant for methods. */
7307 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7308};
7309
7310MOZ_CAN_RUN_SCRIPT static bool
7311receiveNullableCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7312{
7313 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7316( cx, "TestExampleInterface"
, "receiveNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7314 "TestExampleInterface", "receiveNullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7316( cx, "TestExampleInterface"
, "receiveNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7315 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7316( cx, "TestExampleInterface"
, "receiveNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7316 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7316( cx, "TestExampleInterface"
, "receiveNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7317
7318 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7319 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->ReceiveNullableCallbackInterface()));
7320 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7320); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7320; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7321 if (result) {
7322 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
7323 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
7324 return false;
7325 }
7326 return true;
7327 } else {
7328 args.rval().setNull();
7329 return true;
7330 }
7331}
7332
7333static const JSJitInfo receiveNullableCallbackInterface_methodinfo = {
7334 { (JSJitGetterOp)receiveNullableCallbackInterface },
7335 { prototypes::id::TestExampleInterface },
7336 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7337 JSJitInfo::Method,
7338 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7339 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
7340 false, /* isInfallible. False in setters. */
7341 false, /* isMovable. Not relevant for setters. */
7342 false, /* isEliminatable. Not relevant for setters. */
7343 false, /* isAlwaysInSlot. Only relevant for getters. */
7344 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7345 false, /* isTypedMethod. Only relevant for methods. */
7346 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7347};
7348
7349MOZ_CAN_RUN_SCRIPT static bool
7350receiveWeakCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7351{
7352 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7355( cx, "TestExampleInterface"
, "receiveWeakCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7353 "TestExampleInterface", "receiveWeakCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7355( cx, "TestExampleInterface"
, "receiveWeakCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7354 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7355( cx, "TestExampleInterface"
, "receiveWeakCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7355 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7355( cx, "TestExampleInterface"
, "receiveWeakCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7356
7357 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7358 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakCallbackInterface()));
7359 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7359); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7359; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7360 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
7361 if (!MaybeWrapObjectValue(cx, args.rval())) {
7362 return false;
7363 }
7364 return true;
7365}
7366
7367static const JSJitInfo receiveWeakCallbackInterface_methodinfo = {
7368 { (JSJitGetterOp)receiveWeakCallbackInterface },
7369 { prototypes::id::TestExampleInterface },
7370 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7371 JSJitInfo::Method,
7372 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7373 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
7374 false, /* isInfallible. False in setters. */
7375 false, /* isMovable. Not relevant for setters. */
7376 false, /* isEliminatable. Not relevant for setters. */
7377 false, /* isAlwaysInSlot. Only relevant for getters. */
7378 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7379 false, /* isTypedMethod. Only relevant for methods. */
7380 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7381};
7382
7383MOZ_CAN_RUN_SCRIPT static bool
7384receiveWeakNullableCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7385{
7386 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7389( cx, "TestExampleInterface"
, "receiveWeakNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7387 "TestExampleInterface", "receiveWeakNullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7389( cx, "TestExampleInterface"
, "receiveWeakNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7388 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7389( cx, "TestExampleInterface"
, "receiveWeakNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7389 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7389( cx, "TestExampleInterface"
, "receiveWeakNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7390
7391 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7392 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakNullableCallbackInterface()));
7393 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7393); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7393; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7394 if (result) {
7395 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
7396 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
7397 return false;
7398 }
7399 return true;
7400 } else {
7401 args.rval().setNull();
7402 return true;
7403 }
7404}
7405
7406static const JSJitInfo receiveWeakNullableCallbackInterface_methodinfo = {
7407 { (JSJitGetterOp)receiveWeakNullableCallbackInterface },
7408 { prototypes::id::TestExampleInterface },
7409 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7410 JSJitInfo::Method,
7411 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7412 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
7413 false, /* isInfallible. False in setters. */
7414 false, /* isMovable. Not relevant for setters. */
7415 false, /* isEliminatable. Not relevant for setters. */
7416 false, /* isAlwaysInSlot. Only relevant for getters. */
7417 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7418 false, /* isTypedMethod. Only relevant for methods. */
7419 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7420};
7421
7422MOZ_CAN_RUN_SCRIPT static bool
7423passCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7424{
7425 BindingCallContext cx(cx_, "TestExampleInterface.passCallbackInterface");
7426 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7429( cx, "TestExampleInterface"
, "passCallbackInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7427 "TestExampleInterface", "passCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7429( cx, "TestExampleInterface"
, "passCallbackInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7428 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7429( cx, "TestExampleInterface"
, "passCallbackInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7429 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7429( cx, "TestExampleInterface"
, "passCallbackInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7430
7431 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7432 if (!args.requireAtLeast(cx, "TestExampleInterface.passCallbackInterface", 1)) {
7433 return false;
7434 }
7435 RootedCallback<OwningNonNull<binding_detail::FastTestCallbackInterface>> arg0(cx);
7436 if (args[0].isObject()) {
7437 { // scope for tempRoot and tempGlobalRoot if needed
7438 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
7439 }
7440 } else {
7441 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7442 return false;
7443 }
7444 // NOTE: This assert does NOT call the function.
7445 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCallbackInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
7446 MOZ_KnownLive(self)(self)->PassCallbackInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
7447 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7447); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7447; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7448 args.rval().setUndefined();
7449 return true;
7450}
7451
7452static const JSJitInfo passCallbackInterface_methodinfo = {
7453 { (JSJitGetterOp)passCallbackInterface },
7454 { prototypes::id::TestExampleInterface },
7455 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7456 JSJitInfo::Method,
7457 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7458 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7459 false, /* isInfallible. False in setters. */
7460 false, /* isMovable. Not relevant for setters. */
7461 false, /* isEliminatable. Not relevant for setters. */
7462 false, /* isAlwaysInSlot. Only relevant for getters. */
7463 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7464 false, /* isTypedMethod. Only relevant for methods. */
7465 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7466};
7467
7468MOZ_CAN_RUN_SCRIPT static bool
7469passNullableCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7470{
7471 BindingCallContext cx(cx_, "TestExampleInterface.passNullableCallbackInterface");
7472 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7475( cx, "TestExampleInterface"
, "passNullableCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7473 "TestExampleInterface", "passNullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7475( cx, "TestExampleInterface"
, "passNullableCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7474 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7475( cx, "TestExampleInterface"
, "passNullableCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7475 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7475( cx, "TestExampleInterface"
, "passNullableCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7476
7477 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7478 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableCallbackInterface", 1)) {
7479 return false;
7480 }
7481 RootedCallback<RefPtr<binding_detail::FastTestCallbackInterface>> arg0(cx);
7482 if (args[0].isObject()) {
7483 { // scope for tempRoot and tempGlobalRoot if needed
7484 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
7485 }
7486 } else if (args[0].isNullOrUndefined()) {
7487 arg0 = nullptr;
7488 } else {
7489 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7490 return false;
7491 }
7492 // NOTE: This assert does NOT call the function.
7493 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
7494 MOZ_KnownLive(self)(self)->PassNullableCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
7495 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7495); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7495; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7496 args.rval().setUndefined();
7497 return true;
7498}
7499
7500static const JSJitInfo passNullableCallbackInterface_methodinfo = {
7501 { (JSJitGetterOp)passNullableCallbackInterface },
7502 { prototypes::id::TestExampleInterface },
7503 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7504 JSJitInfo::Method,
7505 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7506 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7507 false, /* isInfallible. False in setters. */
7508 false, /* isMovable. Not relevant for setters. */
7509 false, /* isEliminatable. Not relevant for setters. */
7510 false, /* isAlwaysInSlot. Only relevant for getters. */
7511 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7512 false, /* isTypedMethod. Only relevant for methods. */
7513 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7514};
7515
7516MOZ_CAN_RUN_SCRIPT static bool
7517get_nonNullCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
7518{
7519 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7522( cx, "TestExampleInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7520 "TestExampleInterface", "nonNullCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7522( cx, "TestExampleInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7521 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject7522( cx, "TestExampleInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7522 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7522( cx, "TestExampleInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7523
7524 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7525 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->NonNullCallbackInterface()));
7526 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7526); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7526; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7527 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
7528 if (!MaybeWrapObjectValue(cx, args.rval())) {
7529 return false;
7530 }
7531 return true;
7532}
7533
7534MOZ_CAN_RUN_SCRIPT static bool
7535set_nonNullCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
7536{
7537 BindingCallContext cx(cx_, "TestExampleInterface.nonNullCallbackInterface setter");
7538 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7541( cx, "TestExampleInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7539 "TestExampleInterface", "nonNullCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7541( cx, "TestExampleInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7540 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject7541( cx, "TestExampleInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7541 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7541( cx, "TestExampleInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7542
7543 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7544 RootedCallback<OwningNonNull<binding_detail::FastTestCallbackInterface>> arg0(cx);
7545 if (args[0].isObject()) {
7546 { // scope for tempRoot and tempGlobalRoot if needed
7547 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
7548 }
7549 } else {
7550 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
7551 return false;
7552 }
7553 // NOTE: This assert does NOT call the function.
7554 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNonNullCallbackInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
7555 MOZ_KnownLive(self)(self)->SetNonNullCallbackInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
7556 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7556); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7556; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7557
7558 return true;
7559}
7560
7561static const JSJitInfo nonNullCallbackInterface_getterinfo = {
7562 { get_nonNullCallbackInterface },
7563 { prototypes::id::TestExampleInterface },
7564 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7565 JSJitInfo::Getter,
7566 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7567 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
7568 false, /* isInfallible. False in setters. */
7569 false, /* isMovable. Not relevant for setters. */
7570 false, /* isEliminatable. Not relevant for setters. */
7571 false, /* isAlwaysInSlot. Only relevant for getters. */
7572 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7573 false, /* isTypedMethod. Only relevant for methods. */
7574 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7575};
7576static const JSJitInfo nonNullCallbackInterface_setterinfo = {
7577 { (JSJitGetterOp)set_nonNullCallbackInterface },
7578 { prototypes::id::TestExampleInterface },
7579 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7580 JSJitInfo::Setter,
7581 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7582 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7583 false, /* isInfallible. False in setters. */
7584 false, /* isMovable. Not relevant for setters. */
7585 false, /* isEliminatable. Not relevant for setters. */
7586 false, /* isAlwaysInSlot. Only relevant for getters. */
7587 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7588 false, /* isTypedMethod. Only relevant for methods. */
7589 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7590};
7591
7592MOZ_CAN_RUN_SCRIPT static bool
7593get_nullableCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
7594{
7595 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7598( cx, "TestExampleInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7596 "TestExampleInterface", "nullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7598( cx, "TestExampleInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7597 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject7598( cx, "TestExampleInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7598 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7598( cx, "TestExampleInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7599
7600 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7601 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->GetNullableCallbackInterface()));
7602 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7602); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7602; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7603 if (result) {
7604 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
7605 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
7606 return false;
7607 }
7608 return true;
7609 } else {
7610 args.rval().setNull();
7611 return true;
7612 }
7613}
7614
7615MOZ_CAN_RUN_SCRIPT static bool
7616set_nullableCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
7617{
7618 BindingCallContext cx(cx_, "TestExampleInterface.nullableCallbackInterface setter");
7619 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7622( cx, "TestExampleInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7620 "TestExampleInterface", "nullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7622( cx, "TestExampleInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7621 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject7622( cx, "TestExampleInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7622 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7622( cx, "TestExampleInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7623
7624 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7625 RootedCallback<RefPtr<binding_detail::FastTestCallbackInterface>> arg0(cx);
7626 if (args[0].isObject()) {
7627 { // scope for tempRoot and tempGlobalRoot if needed
7628 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
7629 }
7630 } else if (args[0].isNullOrUndefined()) {
7631 arg0 = nullptr;
7632 } else {
7633 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
7634 return false;
7635 }
7636 // NOTE: This assert does NOT call the function.
7637 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNullableCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
7638 MOZ_KnownLive(self)(self)->SetNullableCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
7639 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7639); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7639; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7640
7641 return true;
7642}
7643
7644static const JSJitInfo nullableCallbackInterface_getterinfo = {
7645 { get_nullableCallbackInterface },
7646 { prototypes::id::TestExampleInterface },
7647 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7648 JSJitInfo::Getter,
7649 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7650 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
7651 false, /* isInfallible. False in setters. */
7652 false, /* isMovable. Not relevant for setters. */
7653 false, /* isEliminatable. Not relevant for setters. */
7654 false, /* isAlwaysInSlot. Only relevant for getters. */
7655 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7656 false, /* isTypedMethod. Only relevant for methods. */
7657 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7658};
7659static const JSJitInfo nullableCallbackInterface_setterinfo = {
7660 { (JSJitGetterOp)set_nullableCallbackInterface },
7661 { prototypes::id::TestExampleInterface },
7662 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7663 JSJitInfo::Setter,
7664 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7665 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7666 false, /* isInfallible. False in setters. */
7667 false, /* isMovable. Not relevant for setters. */
7668 false, /* isEliminatable. Not relevant for setters. */
7669 false, /* isAlwaysInSlot. Only relevant for getters. */
7670 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7671 false, /* isTypedMethod. Only relevant for methods. */
7672 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7673};
7674
7675MOZ_CAN_RUN_SCRIPT static bool
7676passOptionalCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7677{
7678 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalCallbackInterface");
7679 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7682( cx, "TestExampleInterface"
, "passOptionalCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7680 "TestExampleInterface", "passOptionalCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7682( cx, "TestExampleInterface"
, "passOptionalCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7681 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7682( cx, "TestExampleInterface"
, "passOptionalCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7682 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7682( cx, "TestExampleInterface"
, "passOptionalCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7683
7684 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7685 Optional<RefPtr<TestCallbackInterface>> arg0;
7686 if (args.hasDefined(0)) {
7687 arg0.Construct();
7688 if (args[0].isObject()) {
7689 { // scope for tempRoot and tempGlobalRoot if needed
7690 JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
7691 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
7692 arg0.Value() = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
7693 }
7694 } else if (args[0].isNullOrUndefined()) {
7695 arg0.Value() = nullptr;
7696 } else {
7697 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7698 return false;
7699 }
7700 }
7701 // NOTE: This assert does NOT call the function.
7702 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
7703 MOZ_KnownLive(self)(self)->PassOptionalCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
7704 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7704); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7704; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7705 args.rval().setUndefined();
7706 return true;
7707}
7708
7709static const JSJitInfo passOptionalCallbackInterface_methodinfo = {
7710 { (JSJitGetterOp)passOptionalCallbackInterface },
7711 { prototypes::id::TestExampleInterface },
7712 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7713 JSJitInfo::Method,
7714 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7715 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7716 false, /* isInfallible. False in setters. */
7717 false, /* isMovable. Not relevant for setters. */
7718 false, /* isEliminatable. Not relevant for setters. */
7719 false, /* isAlwaysInSlot. Only relevant for getters. */
7720 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7721 false, /* isTypedMethod. Only relevant for methods. */
7722 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7723};
7724
7725MOZ_CAN_RUN_SCRIPT static bool
7726passOptionalNonNullCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7727{
7728 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNonNullCallbackInterface");
7729 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7732( cx, "TestExampleInterface"
, "passOptionalNonNullCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7730 "TestExampleInterface", "passOptionalNonNullCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7732( cx, "TestExampleInterface"
, "passOptionalNonNullCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7731 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7732( cx, "TestExampleInterface"
, "passOptionalNonNullCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7732 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7732( cx, "TestExampleInterface"
, "passOptionalNonNullCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7733
7734 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7735 Optional<OwningNonNull<TestCallbackInterface>> arg0;
7736 if (args.hasDefined(0)) {
7737 arg0.Construct();
7738 if (args[0].isObject()) {
7739 { // scope for tempRoot and tempGlobalRoot if needed
7740 JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
7741 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
7742 arg0.Value() = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
7743 }
7744 } else {
7745 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7746 return false;
7747 }
7748 }
7749 // NOTE: This assert does NOT call the function.
7750 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNonNullCallbackInterface(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0)))))>, "Should be returning void here");
7751 MOZ_KnownLive(self)(self)->PassOptionalNonNullCallbackInterface(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))));
7752 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7752); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7752; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7753 args.rval().setUndefined();
7754 return true;
7755}
7756
7757static const JSJitInfo passOptionalNonNullCallbackInterface_methodinfo = {
7758 { (JSJitGetterOp)passOptionalNonNullCallbackInterface },
7759 { prototypes::id::TestExampleInterface },
7760 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7761 JSJitInfo::Method,
7762 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7763 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7764 false, /* isInfallible. False in setters. */
7765 false, /* isMovable. Not relevant for setters. */
7766 false, /* isEliminatable. Not relevant for setters. */
7767 false, /* isAlwaysInSlot. Only relevant for getters. */
7768 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7769 false, /* isTypedMethod. Only relevant for methods. */
7770 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7771};
7772
7773MOZ_CAN_RUN_SCRIPT static bool
7774passOptionalCallbackInterfaceWithDefault(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7775{
7776 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalCallbackInterfaceWithDefault");
7777 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7780( cx, "TestExampleInterface"
, "passOptionalCallbackInterfaceWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7778 "TestExampleInterface", "passOptionalCallbackInterfaceWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7780( cx, "TestExampleInterface"
, "passOptionalCallbackInterfaceWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7779 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7780( cx, "TestExampleInterface"
, "passOptionalCallbackInterfaceWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7780 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7780( cx, "TestExampleInterface"
, "passOptionalCallbackInterfaceWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7781
7782 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7783 RootedCallback<RefPtr<binding_detail::FastTestCallbackInterface>> arg0(cx);
7784 if (args.hasDefined(0)) {
7785 if (args[0].isObject()) {
7786 { // scope for tempRoot and tempGlobalRoot if needed
7787 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
7788 }
7789 } else if (args[0].isNullOrUndefined()) {
7790 arg0 = nullptr;
7791 } else {
7792 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7793 return false;
7794 }
7795 } else {
7796 arg0 = nullptr;
7797 }
7798 // NOTE: This assert does NOT call the function.
7799 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalCallbackInterfaceWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
7800 MOZ_KnownLive(self)(self)->PassOptionalCallbackInterfaceWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
7801 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7801); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7801; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7802 args.rval().setUndefined();
7803 return true;
7804}
7805
7806static const JSJitInfo passOptionalCallbackInterfaceWithDefault_methodinfo = {
7807 { (JSJitGetterOp)passOptionalCallbackInterfaceWithDefault },
7808 { prototypes::id::TestExampleInterface },
7809 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7810 JSJitInfo::Method,
7811 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7812 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7813 false, /* isInfallible. False in setters. */
7814 false, /* isMovable. Not relevant for setters. */
7815 false, /* isEliminatable. Not relevant for setters. */
7816 false, /* isAlwaysInSlot. Only relevant for getters. */
7817 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7818 false, /* isTypedMethod. Only relevant for methods. */
7819 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7820};
7821
7822MOZ_CAN_RUN_SCRIPT static bool
7823get_readonlySequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
7824{
7825 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7828( cx, "TestExampleInterface"
, "readonlySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7826 "TestExampleInterface", "readonlySequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7828( cx, "TestExampleInterface"
, "readonlySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7827 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject7828( cx, "TestExampleInterface"
, "readonlySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7828 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7828( cx, "TestExampleInterface"
, "readonlySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7829
7830 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7831 // Have to either root across the getter call or reget after.
7832 bool isXray;
7833 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
7834 if (!slotStorage) {
7835 return false;
7836 }
7837 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 4) : (DOM_INSTANCE_RESERVED_SLOTS1 + 4);
7838 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 7838); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 7838; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
7839 {
7840 // Scope for cachedVal
7841 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
7842 if (!cachedVal.isUndefined()) {
7843 args.rval().set(cachedVal);
7844 // The cached value is in the compartment of slotStorage,
7845 // so wrap into the caller compartment as needed.
7846 return MaybeWrapNonDOMObjectValue(cx, args.rval());
7847 }
7848 }
7849
7850 nsTArray<int32_t> result;
7851 // NOTE: This assert does NOT call the function.
7852 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlySequence(result))>, "Should be returning void here");
7853 MOZ_KnownLive(self)(self)->GetReadonlySequence(result);
7854 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7854); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7854; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7855 {
7856 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
7857 JSAutoRealm ar(cx, conversionScope);
7858 do { // block we break out of when done wrapping
7859
7860 uint32_t length = result.Length();
7861 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
7862 if (!returnArray) {
7863 return false;
7864 }
7865 // Scope for 'tmp'
7866 {
7867 JS::Rooted<JS::Value> tmp(cx);
7868 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
7869 // Control block to let us common up the JS_DefineElement calls when there
7870 // are different ways to succeed at wrapping the object.
7871 do {
7872 tmp.setInt32(int32_t(result[sequenceIdx0]));
7873 break;
7874 } while (false);
7875 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
7876 JSPROP_ENUMERATE)) {
7877 return false;
7878 }
7879 }
7880 }
7881 args.rval().setObject(*returnArray);
7882 break;
7883 } while (false);
7884 }
7885 { // And now store things in the realm of our slotStorage.
7886 JSAutoRealm ar(cx, slotStorage);
7887 // Make a copy so that we don't do unnecessary wrapping on args.rval().
7888 JS::Rooted<JS::Value> storedVal(cx, args.rval());
7889 if (!MaybeWrapNonDOMObjectValue(cx, &storedVal)) {
7890 return false;
7891 }
7892 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
7893 if (!isXray) {
7894 // In the Xray case we don't need to do this, because getting the
7895 // expando object already preserved our wrapper.
7896 PreserveWrapper(self);
7897 }
7898 }
7899 // And now make sure args.rval() is in the caller realm.
7900 return MaybeWrapNonDOMObjectValue(cx, args.rval());
7901}
7902
7903static const JSJitInfo readonlySequence_getterinfo = {
7904 { get_readonlySequence },
7905 { prototypes::id::TestExampleInterface },
7906 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
7907 JSJitInfo::Getter,
7908 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
7909 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
7910 false, /* isInfallible. False in setters. */
7911 true, /* isMovable. Not relevant for setters. */
7912 true, /* isEliminatable. Not relevant for setters. */
7913 false, /* isAlwaysInSlot. Only relevant for getters. */
7914 true, /* isLazilyCachedInSlot. Only relevant for getters. */
7915 false, /* isTypedMethod. Only relevant for methods. */
7916 (DOM_INSTANCE_RESERVED_SLOTS1 + 4) /* Reserved slot index, if we're stored in a slot, else 0. */
7917};
7918static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 4) <= JSJitInfo::maxSlotIndex, "We won't fit");
7919static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 4) < 22, "There is no slot for us");
7920
7921MOZ_CAN_RUN_SCRIPT static bool
7922get_readonlySequenceOfDictionaries(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
7923{
7924 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7927( cx, "TestExampleInterface"
, "readonlySequenceOfDictionaries", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7925 "TestExampleInterface", "readonlySequenceOfDictionaries", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7927( cx, "TestExampleInterface"
, "readonlySequenceOfDictionaries", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7926 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject7927( cx, "TestExampleInterface"
, "readonlySequenceOfDictionaries", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7927 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7927( cx, "TestExampleInterface"
, "readonlySequenceOfDictionaries", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7928
7929 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
7930 // Have to either root across the getter call or reget after.
7931 bool isXray;
7932 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
7933 if (!slotStorage) {
7934 return false;
7935 }
7936 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 5) : (DOM_INSTANCE_RESERVED_SLOTS1 + 5);
7937 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 7937); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 7937; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
7938 {
7939 // Scope for cachedVal
7940 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
7941 if (!cachedVal.isUndefined()) {
7942 args.rval().set(cachedVal);
7943 // The cached value is in the compartment of slotStorage,
7944 // so wrap into the caller compartment as needed.
7945 return MaybeWrapNonDOMObjectValue(cx, args.rval());
7946 }
7947 }
7948
7949 nsTArray<Dict> result;
7950 SequenceRooter<Dict > resultRooter(cx, &result);
7951 // NOTE: This assert does NOT call the function.
7952 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlySequenceOfDictionaries(cx, result))>, "Should be returning void here");
7953 MOZ_KnownLive(self)(self)->GetReadonlySequenceOfDictionaries(cx, result);
7954 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 7954); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7954; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7955 {
7956 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
7957 JSAutoRealm ar(cx, conversionScope);
7958 do { // block we break out of when done wrapping
7959
7960 uint32_t length = result.Length();
7961 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
7962 if (!returnArray) {
7963 return false;
7964 }
7965 // Scope for 'tmp'
7966 {
7967 JS::Rooted<JS::Value> tmp(cx);
7968 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
7969 // Control block to let us common up the JS_DefineElement calls when there
7970 // are different ways to succeed at wrapping the object.
7971 do {
7972 if (!result[sequenceIdx0].ToObjectInternal(cx, &tmp)) {
7973 return false;
7974 }
7975 break;
7976 } while (false);
7977 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
7978 JSPROP_ENUMERATE)) {
7979 return false;
7980 }
7981 }
7982 }
7983 args.rval().setObject(*returnArray);
7984 break;
7985 } while (false);
7986 }
7987 { // And now store things in the realm of our slotStorage.
7988 JSAutoRealm ar(cx, slotStorage);
7989 // Make a copy so that we don't do unnecessary wrapping on args.rval().
7990 JS::Rooted<JS::Value> storedVal(cx, args.rval());
7991 if (!MaybeWrapNonDOMObjectValue(cx, &storedVal)) {
7992 return false;
7993 }
7994 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
7995 if (!isXray) {
7996 // In the Xray case we don't need to do this, because getting the
7997 // expando object already preserved our wrapper.
7998 PreserveWrapper(self);
7999 }
8000 }
8001 // And now make sure args.rval() is in the caller realm.
8002 return MaybeWrapNonDOMObjectValue(cx, args.rval());
8003}
8004
8005static const JSJitInfo readonlySequenceOfDictionaries_getterinfo = {
8006 { get_readonlySequenceOfDictionaries },
8007 { prototypes::id::TestExampleInterface },
8008 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8009 JSJitInfo::Getter,
8010 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
8011 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
8012 false, /* isInfallible. False in setters. */
8013 true, /* isMovable. Not relevant for setters. */
8014 true, /* isEliminatable. Not relevant for setters. */
8015 false, /* isAlwaysInSlot. Only relevant for getters. */
8016 true, /* isLazilyCachedInSlot. Only relevant for getters. */
8017 false, /* isTypedMethod. Only relevant for methods. */
8018 (DOM_INSTANCE_RESERVED_SLOTS1 + 5) /* Reserved slot index, if we're stored in a slot, else 0. */
8019};
8020static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 5) <= JSJitInfo::maxSlotIndex, "We won't fit");
8021static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 5) < 22, "There is no slot for us");
8022
8023MOZ_CAN_RUN_SCRIPT static bool
8024get_readonlyNullableSequenceOfDictionaries(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
8025{
8026 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8029( cx, "TestExampleInterface"
, "readonlyNullableSequenceOfDictionaries", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8027 "TestExampleInterface", "readonlyNullableSequenceOfDictionaries", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8029( cx, "TestExampleInterface"
, "readonlyNullableSequenceOfDictionaries", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8028 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject8029( cx, "TestExampleInterface"
, "readonlyNullableSequenceOfDictionaries", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8029 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8029( cx, "TestExampleInterface"
, "readonlyNullableSequenceOfDictionaries", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8030
8031 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8032 // Have to either root across the getter call or reget after.
8033 bool isXray;
8034 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
8035 if (!slotStorage) {
8036 return false;
8037 }
8038 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 6) : (DOM_INSTANCE_RESERVED_SLOTS1 + 6);
8039 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 8039); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 8039; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
8040 {
8041 // Scope for cachedVal
8042 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
8043 if (!cachedVal.isUndefined()) {
8044 args.rval().set(cachedVal);
8045 // The cached value is in the compartment of slotStorage,
8046 // so wrap into the caller compartment as needed.
8047 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
8048 }
8049 }
8050
8051 Nullable<nsTArray<Dict>> result;
8052 SequenceRooter<Dict > resultRooter(cx, &result);
8053 // NOTE: This assert does NOT call the function.
8054 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlyNullableSequenceOfDictionaries(cx, result))>, "Should be returning void here");
8055 MOZ_KnownLive(self)(self)->GetReadonlyNullableSequenceOfDictionaries(cx, result);
8056 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8056); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8056; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8057 {
8058 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
8059 JSAutoRealm ar(cx, conversionScope);
8060 do { // block we break out of when done wrapping
8061
8062 if (result.IsNull()) {
8063 args.rval().setNull();
8064 break;
8065 }
8066
8067 uint32_t length = result.Value().Length();
8068 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8069 if (!returnArray) {
8070 return false;
8071 }
8072 // Scope for 'tmp'
8073 {
8074 JS::Rooted<JS::Value> tmp(cx);
8075 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8076 // Control block to let us common up the JS_DefineElement calls when there
8077 // are different ways to succeed at wrapping the object.
8078 do {
8079 if (!result.Value()[sequenceIdx0].ToObjectInternal(cx, &tmp)) {
8080 return false;
8081 }
8082 break;
8083 } while (false);
8084 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8085 JSPROP_ENUMERATE)) {
8086 return false;
8087 }
8088 }
8089 }
8090 args.rval().setObject(*returnArray);
8091 break;
8092 } while (false);
8093 }
8094 { // And now store things in the realm of our slotStorage.
8095 JSAutoRealm ar(cx, slotStorage);
8096 // Make a copy so that we don't do unnecessary wrapping on args.rval().
8097 JS::Rooted<JS::Value> storedVal(cx, args.rval());
8098 if (!MaybeWrapNonDOMObjectOrNullValue(cx, &storedVal)) {
8099 return false;
8100 }
8101 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
8102 if (!isXray) {
8103 // In the Xray case we don't need to do this, because getting the
8104 // expando object already preserved our wrapper.
8105 PreserveWrapper(self);
8106 }
8107 }
8108 // And now make sure args.rval() is in the caller realm.
8109 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
8110}
8111
8112static const JSJitInfo readonlyNullableSequenceOfDictionaries_getterinfo = {
8113 { get_readonlyNullableSequenceOfDictionaries },
8114 { prototypes::id::TestExampleInterface },
8115 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8116 JSJitInfo::Getter,
8117 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
8118 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
8119 false, /* isInfallible. False in setters. */
8120 true, /* isMovable. Not relevant for setters. */
8121 true, /* isEliminatable. Not relevant for setters. */
8122 false, /* isAlwaysInSlot. Only relevant for getters. */
8123 true, /* isLazilyCachedInSlot. Only relevant for getters. */
8124 false, /* isTypedMethod. Only relevant for methods. */
8125 (DOM_INSTANCE_RESERVED_SLOTS1 + 6) /* Reserved slot index, if we're stored in a slot, else 0. */
8126};
8127static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 6) <= JSJitInfo::maxSlotIndex, "We won't fit");
8128static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 6) < 22, "There is no slot for us");
8129
8130MOZ_CAN_RUN_SCRIPT static bool
8131get_readonlyFrozenSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
8132{
8133 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8136( cx, "TestExampleInterface"
, "readonlyFrozenSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8134 "TestExampleInterface", "readonlyFrozenSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8136( cx, "TestExampleInterface"
, "readonlyFrozenSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8135 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject8136( cx, "TestExampleInterface"
, "readonlyFrozenSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8136 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8136( cx, "TestExampleInterface"
, "readonlyFrozenSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
8137
8138 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8139 // Have to either root across the getter call or reget after.
8140 bool isXray;
8141 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
8142 if (!slotStorage) {
8143 return false;
8144 }
8145 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 7) : (DOM_INSTANCE_RESERVED_SLOTS1 + 7);
8146 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 8146); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 8146; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
8147 {
8148 // Scope for cachedVal
8149 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
8150 if (!cachedVal.isUndefined()) {
8151 args.rval().set(cachedVal);
8152 // The cached value is in the compartment of slotStorage,
8153 // so wrap into the caller compartment as needed.
8154 return MaybeWrapNonDOMObjectValue(cx, args.rval());
8155 }
8156 }
8157
8158 nsTArray<int32_t> result;
8159 // NOTE: This assert does NOT call the function.
8160 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlyFrozenSequence(result))>, "Should be returning void here");
8161 MOZ_KnownLive(self)(self)->GetReadonlyFrozenSequence(result);
8162 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8162); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8162; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8163 {
8164 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
8165 JSAutoRealm ar(cx, conversionScope);
8166 do { // block we break out of when done wrapping
8167
8168 uint32_t length = result.Length();
8169 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8170 if (!returnArray) {
8171 return false;
8172 }
8173 // Scope for 'tmp'
8174 {
8175 JS::Rooted<JS::Value> tmp(cx);
8176 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8177 // Control block to let us common up the JS_DefineElement calls when there
8178 // are different ways to succeed at wrapping the object.
8179 do {
8180 tmp.setInt32(int32_t(result[sequenceIdx0]));
8181 break;
8182 } while (false);
8183 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8184 JSPROP_ENUMERATE)) {
8185 return false;
8186 }
8187 }
8188 }
8189 args.rval().setObject(*returnArray);
8190 break;
8191 } while (false);
8192 JS::Rooted<JSObject*> rvalObj(cx, &args.rval().toObject());
8193 if (!JS_FreezeObject(cx, rvalObj)) {
8194 return false;
8195 }
8196 }
8197 { // And now store things in the realm of our slotStorage.
8198 JSAutoRealm ar(cx, slotStorage);
8199 // Make a copy so that we don't do unnecessary wrapping on args.rval().
8200 JS::Rooted<JS::Value> storedVal(cx, args.rval());
8201 if (!MaybeWrapNonDOMObjectValue(cx, &storedVal)) {
8202 return false;
8203 }
8204 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
8205 if (!isXray) {
8206 // In the Xray case we don't need to do this, because getting the
8207 // expando object already preserved our wrapper.
8208 PreserveWrapper(self);
8209 }
8210 }
8211 // And now make sure args.rval() is in the caller realm.
8212 return MaybeWrapNonDOMObjectValue(cx, args.rval());
8213}
8214
8215static const JSJitInfo readonlyFrozenSequence_getterinfo = {
8216 { get_readonlyFrozenSequence },
8217 { prototypes::id::TestExampleInterface },
8218 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8219 JSJitInfo::Getter,
8220 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
8221 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
8222 false, /* isInfallible. False in setters. */
8223 true, /* isMovable. Not relevant for setters. */
8224 true, /* isEliminatable. Not relevant for setters. */
8225 false, /* isAlwaysInSlot. Only relevant for getters. */
8226 true, /* isLazilyCachedInSlot. Only relevant for getters. */
8227 false, /* isTypedMethod. Only relevant for methods. */
8228 (DOM_INSTANCE_RESERVED_SLOTS1 + 7) /* Reserved slot index, if we're stored in a slot, else 0. */
8229};
8230static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 7) <= JSJitInfo::maxSlotIndex, "We won't fit");
8231static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 7) < 22, "There is no slot for us");
8232
8233MOZ_CAN_RUN_SCRIPT static bool
8234get_readonlyFrozenNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
8235{
8236 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8239( cx, "TestExampleInterface"
, "readonlyFrozenNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8237 "TestExampleInterface", "readonlyFrozenNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8239( cx, "TestExampleInterface"
, "readonlyFrozenNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8238 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject8239( cx, "TestExampleInterface"
, "readonlyFrozenNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8239 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8239( cx, "TestExampleInterface"
, "readonlyFrozenNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8240
8241 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8242 // Have to either root across the getter call or reget after.
8243 bool isXray;
8244 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
8245 if (!slotStorage) {
8246 return false;
8247 }
8248 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 8) : (DOM_INSTANCE_RESERVED_SLOTS1 + 8);
8249 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 8249); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 8249; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
8250 {
8251 // Scope for cachedVal
8252 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
8253 if (!cachedVal.isUndefined()) {
8254 args.rval().set(cachedVal);
8255 // The cached value is in the compartment of slotStorage,
8256 // so wrap into the caller compartment as needed.
8257 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
8258 }
8259 }
8260
8261 Nullable<nsTArray<int32_t>> result;
8262 // NOTE: This assert does NOT call the function.
8263 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlyFrozenNullableSequence(result))>, "Should be returning void here");
8264 MOZ_KnownLive(self)(self)->GetReadonlyFrozenNullableSequence(result);
8265 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8265); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8265; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8266 {
8267 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
8268 JSAutoRealm ar(cx, conversionScope);
8269 do { // block we break out of when done wrapping
8270
8271 if (result.IsNull()) {
8272 args.rval().setNull();
8273 break;
8274 }
8275
8276 uint32_t length = result.Value().Length();
8277 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8278 if (!returnArray) {
8279 return false;
8280 }
8281 // Scope for 'tmp'
8282 {
8283 JS::Rooted<JS::Value> tmp(cx);
8284 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8285 // Control block to let us common up the JS_DefineElement calls when there
8286 // are different ways to succeed at wrapping the object.
8287 do {
8288 tmp.setInt32(int32_t(result.Value()[sequenceIdx0]));
8289 break;
8290 } while (false);
8291 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8292 JSPROP_ENUMERATE)) {
8293 return false;
8294 }
8295 }
8296 }
8297 args.rval().setObject(*returnArray);
8298 break;
8299 } while (false);
8300 if (args.rval().isObject()) {
8301 JS::Rooted<JSObject*> rvalObj(cx, &args.rval().toObject());
8302 if (!JS_FreezeObject(cx, rvalObj)) {
8303 return false;
8304 }
8305 }
8306 }
8307 { // And now store things in the realm of our slotStorage.
8308 JSAutoRealm ar(cx, slotStorage);
8309 // Make a copy so that we don't do unnecessary wrapping on args.rval().
8310 JS::Rooted<JS::Value> storedVal(cx, args.rval());
8311 if (!MaybeWrapNonDOMObjectOrNullValue(cx, &storedVal)) {
8312 return false;
8313 }
8314 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
8315 if (!isXray) {
8316 // In the Xray case we don't need to do this, because getting the
8317 // expando object already preserved our wrapper.
8318 PreserveWrapper(self);
8319 }
8320 }
8321 // And now make sure args.rval() is in the caller realm.
8322 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
8323}
8324
8325static const JSJitInfo readonlyFrozenNullableSequence_getterinfo = {
8326 { get_readonlyFrozenNullableSequence },
8327 { prototypes::id::TestExampleInterface },
8328 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8329 JSJitInfo::Getter,
8330 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
8331 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
8332 false, /* isInfallible. False in setters. */
8333 true, /* isMovable. Not relevant for setters. */
8334 true, /* isEliminatable. Not relevant for setters. */
8335 false, /* isAlwaysInSlot. Only relevant for getters. */
8336 true, /* isLazilyCachedInSlot. Only relevant for getters. */
8337 false, /* isTypedMethod. Only relevant for methods. */
8338 (DOM_INSTANCE_RESERVED_SLOTS1 + 8) /* Reserved slot index, if we're stored in a slot, else 0. */
8339};
8340static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 8) <= JSJitInfo::maxSlotIndex, "We won't fit");
8341static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 8) < 22, "There is no slot for us");
8342
8343MOZ_CAN_RUN_SCRIPT static bool
8344receiveSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8345{
8346 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8349( cx, "TestExampleInterface"
, "receiveSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8347 "TestExampleInterface", "receiveSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8349( cx, "TestExampleInterface"
, "receiveSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8348 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8349( cx, "TestExampleInterface"
, "receiveSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8349 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8349( cx, "TestExampleInterface"
, "receiveSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
8350
8351 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8352 nsTArray<int32_t> result;
8353 // NOTE: This assert does NOT call the function.
8354 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveSequence(result))>, "Should be returning void here");
8355 MOZ_KnownLive(self)(self)->ReceiveSequence(result);
8356 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8356); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8356; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8357
8358 uint32_t length = result.Length();
8359 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8360 if (!returnArray) {
8361 return false;
8362 }
8363 // Scope for 'tmp'
8364 {
8365 JS::Rooted<JS::Value> tmp(cx);
8366 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8367 // Control block to let us common up the JS_DefineElement calls when there
8368 // are different ways to succeed at wrapping the object.
8369 do {
8370 tmp.setInt32(int32_t(result[sequenceIdx0]));
8371 break;
8372 } while (false);
8373 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8374 JSPROP_ENUMERATE)) {
8375 return false;
8376 }
8377 }
8378 }
8379 args.rval().setObject(*returnArray);
8380 return true;
8381}
8382
8383static const JSJitInfo receiveSequence_methodinfo = {
8384 { (JSJitGetterOp)receiveSequence },
8385 { prototypes::id::TestExampleInterface },
8386 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8387 JSJitInfo::Method,
8388 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8389 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
8390 false, /* isInfallible. False in setters. */
8391 false, /* isMovable. Not relevant for setters. */
8392 false, /* isEliminatable. Not relevant for setters. */
8393 false, /* isAlwaysInSlot. Only relevant for getters. */
8394 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8395 false, /* isTypedMethod. Only relevant for methods. */
8396 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8397};
8398
8399MOZ_CAN_RUN_SCRIPT static bool
8400receiveNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8401{
8402 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8405( cx, "TestExampleInterface"
, "receiveNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8403 "TestExampleInterface", "receiveNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8405( cx, "TestExampleInterface"
, "receiveNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8404 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8405( cx, "TestExampleInterface"
, "receiveNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8405 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8405( cx, "TestExampleInterface"
, "receiveNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
8406
8407 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8408 Nullable<nsTArray<int32_t>> result;
8409 // NOTE: This assert does NOT call the function.
8410 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableSequence(result))>, "Should be returning void here");
8411 MOZ_KnownLive(self)(self)->ReceiveNullableSequence(result);
8412 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8412); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8412; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8413
8414 if (result.IsNull()) {
8415 args.rval().setNull();
8416 return true;
8417 }
8418
8419 uint32_t length = result.Value().Length();
8420 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8421 if (!returnArray) {
8422 return false;
8423 }
8424 // Scope for 'tmp'
8425 {
8426 JS::Rooted<JS::Value> tmp(cx);
8427 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8428 // Control block to let us common up the JS_DefineElement calls when there
8429 // are different ways to succeed at wrapping the object.
8430 do {
8431 tmp.setInt32(int32_t(result.Value()[sequenceIdx0]));
8432 break;
8433 } while (false);
8434 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8435 JSPROP_ENUMERATE)) {
8436 return false;
8437 }
8438 }
8439 }
8440 args.rval().setObject(*returnArray);
8441 return true;
8442}
8443
8444static const JSJitInfo receiveNullableSequence_methodinfo = {
8445 { (JSJitGetterOp)receiveNullableSequence },
8446 { prototypes::id::TestExampleInterface },
8447 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8448 JSJitInfo::Method,
8449 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8450 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
8451 false, /* isInfallible. False in setters. */
8452 false, /* isMovable. Not relevant for setters. */
8453 false, /* isEliminatable. Not relevant for setters. */
8454 false, /* isAlwaysInSlot. Only relevant for getters. */
8455 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8456 false, /* isTypedMethod. Only relevant for methods. */
8457 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8458};
8459
8460MOZ_CAN_RUN_SCRIPT static bool
8461receiveSequenceOfNullableInts(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8462{
8463 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8466( cx, "TestExampleInterface"
, "receiveSequenceOfNullableInts", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8464 "TestExampleInterface", "receiveSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8466( cx, "TestExampleInterface"
, "receiveSequenceOfNullableInts", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8465 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8466( cx, "TestExampleInterface"
, "receiveSequenceOfNullableInts", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8466 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8466( cx, "TestExampleInterface"
, "receiveSequenceOfNullableInts", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8467
8468 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8469 nsTArray<Nullable<int32_t>> result;
8470 // NOTE: This assert does NOT call the function.
8471 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveSequenceOfNullableInts(result))>, "Should be returning void here");
8472 MOZ_KnownLive(self)(self)->ReceiveSequenceOfNullableInts(result);
8473 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8473); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8473; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8474
8475 uint32_t length = result.Length();
8476 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8477 if (!returnArray) {
8478 return false;
8479 }
8480 // Scope for 'tmp'
8481 {
8482 JS::Rooted<JS::Value> tmp(cx);
8483 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8484 // Control block to let us common up the JS_DefineElement calls when there
8485 // are different ways to succeed at wrapping the object.
8486 do {
8487 if (result[sequenceIdx0].IsNull()) {
8488 tmp.setNull();
8489 break;
8490 }
8491 tmp.setInt32(int32_t(result[sequenceIdx0].Value()));
8492 break;
8493 } while (false);
8494 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8495 JSPROP_ENUMERATE)) {
8496 return false;
8497 }
8498 }
8499 }
8500 args.rval().setObject(*returnArray);
8501 return true;
8502}
8503
8504static const JSJitInfo receiveSequenceOfNullableInts_methodinfo = {
8505 { (JSJitGetterOp)receiveSequenceOfNullableInts },
8506 { prototypes::id::TestExampleInterface },
8507 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8508 JSJitInfo::Method,
8509 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8510 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
8511 false, /* isInfallible. False in setters. */
8512 false, /* isMovable. Not relevant for setters. */
8513 false, /* isEliminatable. Not relevant for setters. */
8514 false, /* isAlwaysInSlot. Only relevant for getters. */
8515 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8516 false, /* isTypedMethod. Only relevant for methods. */
8517 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8518};
8519
8520MOZ_CAN_RUN_SCRIPT static bool
8521receiveNullableSequenceOfNullableInts(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8522{
8523 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8526( cx, "TestExampleInterface"
, "receiveNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8524 "TestExampleInterface", "receiveNullableSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8526( cx, "TestExampleInterface"
, "receiveNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8525 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8526( cx, "TestExampleInterface"
, "receiveNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8526 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8526( cx, "TestExampleInterface"
, "receiveNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8527
8528 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8529 Nullable<nsTArray<Nullable<int32_t>>> result;
8530 // NOTE: This assert does NOT call the function.
8531 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableSequenceOfNullableInts(result))>, "Should be returning void here");
8532 MOZ_KnownLive(self)(self)->ReceiveNullableSequenceOfNullableInts(result);
8533 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8533); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8533; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8534
8535 if (result.IsNull()) {
8536 args.rval().setNull();
8537 return true;
8538 }
8539
8540 uint32_t length = result.Value().Length();
8541 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8542 if (!returnArray) {
8543 return false;
8544 }
8545 // Scope for 'tmp'
8546 {
8547 JS::Rooted<JS::Value> tmp(cx);
8548 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8549 // Control block to let us common up the JS_DefineElement calls when there
8550 // are different ways to succeed at wrapping the object.
8551 do {
8552 if (result.Value()[sequenceIdx0].IsNull()) {
8553 tmp.setNull();
8554 break;
8555 }
8556 tmp.setInt32(int32_t(result.Value()[sequenceIdx0].Value()));
8557 break;
8558 } while (false);
8559 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8560 JSPROP_ENUMERATE)) {
8561 return false;
8562 }
8563 }
8564 }
8565 args.rval().setObject(*returnArray);
8566 return true;
8567}
8568
8569static const JSJitInfo receiveNullableSequenceOfNullableInts_methodinfo = {
8570 { (JSJitGetterOp)receiveNullableSequenceOfNullableInts },
8571 { prototypes::id::TestExampleInterface },
8572 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8573 JSJitInfo::Method,
8574 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8575 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
8576 false, /* isInfallible. False in setters. */
8577 false, /* isMovable. Not relevant for setters. */
8578 false, /* isEliminatable. Not relevant for setters. */
8579 false, /* isAlwaysInSlot. Only relevant for getters. */
8580 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8581 false, /* isTypedMethod. Only relevant for methods. */
8582 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8583};
8584
8585MOZ_CAN_RUN_SCRIPT static bool
8586passSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8587{
8588 BindingCallContext cx(cx_, "TestExampleInterface.passSequence");
8589 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8592( cx, "TestExampleInterface"
, "passSequence", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8590 "TestExampleInterface", "passSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8592( cx, "TestExampleInterface"
, "passSequence", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8591 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8592( cx, "TestExampleInterface"
, "passSequence", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8592 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8592( cx, "TestExampleInterface"
, "passSequence", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
8593
8594 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8595 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequence", 1)) {
8596 return false;
8597 }
8598 binding_detail::AutoSequence<int32_t> arg0;
8599 if (args[0].isObject()) {
8600 JS::ForOfIterator iter(cx);
8601 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
8602 return false;
8603 }
8604 if (!iter.valueIsIterable()) {
8605 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8606 return false;
8607 }
8608 binding_detail::AutoSequence<int32_t> &arr = arg0;
8609 JS::Rooted<JS::Value> temp(cx);
8610 while (true) {
8611 bool done;
8612 if (!iter.next(&temp, &done)) {
8613 return false;
8614 }
8615 if (done) {
8616 break;
8617 }
8618 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
8619 if (!slotPtr) {
8620 JS_ReportOutOfMemory(cx);
8621 return false;
8622 }
8623 int32_t& slot = *slotPtr;
8624 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
8625 return false;
8626 }
8627 }
8628 } else {
8629 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8630 return false;
8631 }
8632 // NOTE: This assert does NOT call the function.
8633 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequence(Constify(arg0)))>, "Should be returning void here");
8634 MOZ_KnownLive(self)(self)->PassSequence(Constify(arg0));
8635 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8635); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8635; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8636 args.rval().setUndefined();
8637 return true;
8638}
8639
8640static const JSJitInfo passSequence_methodinfo = {
8641 { (JSJitGetterOp)passSequence },
8642 { prototypes::id::TestExampleInterface },
8643 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8644 JSJitInfo::Method,
8645 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8646 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8647 false, /* isInfallible. False in setters. */
8648 false, /* isMovable. Not relevant for setters. */
8649 false, /* isEliminatable. Not relevant for setters. */
8650 false, /* isAlwaysInSlot. Only relevant for getters. */
8651 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8652 false, /* isTypedMethod. Only relevant for methods. */
8653 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8654};
8655
8656MOZ_CAN_RUN_SCRIPT static bool
8657passNullableSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8658{
8659 BindingCallContext cx(cx_, "TestExampleInterface.passNullableSequence");
8660 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8663( cx, "TestExampleInterface"
, "passNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8661 "TestExampleInterface", "passNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8663( cx, "TestExampleInterface"
, "passNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8662 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8663( cx, "TestExampleInterface"
, "passNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8663 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8663( cx, "TestExampleInterface"
, "passNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
8664
8665 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8666 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableSequence", 1)) {
8667 return false;
8668 }
8669 Nullable<Sequence<int32_t>> arg0;
8670 if (args[0].isObject()) {
8671 JS::ForOfIterator iter(cx);
8672 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
8673 return false;
8674 }
8675 if (!iter.valueIsIterable()) {
8676 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8677 return false;
8678 }
8679 Sequence<int32_t> &arr = arg0.SetValue();
8680 JS::Rooted<JS::Value> temp(cx);
8681 while (true) {
8682 bool done;
8683 if (!iter.next(&temp, &done)) {
8684 return false;
8685 }
8686 if (done) {
8687 break;
8688 }
8689 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
8690 if (!slotPtr) {
8691 JS_ReportOutOfMemory(cx);
8692 return false;
8693 }
8694 int32_t& slot = *slotPtr;
8695 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
8696 return false;
8697 }
8698 }
8699 } else if (args[0].isNullOrUndefined()) {
8700 arg0.SetNull();
8701 } else {
8702 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8703 return false;
8704 }
8705 // NOTE: This assert does NOT call the function.
8706 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSequence(Constify(arg0)))>, "Should be returning void here");
8707 MOZ_KnownLive(self)(self)->PassNullableSequence(Constify(arg0));
8708 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8708); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8708; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8709 args.rval().setUndefined();
8710 return true;
8711}
8712
8713static const JSJitInfo passNullableSequence_methodinfo = {
8714 { (JSJitGetterOp)passNullableSequence },
8715 { prototypes::id::TestExampleInterface },
8716 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8717 JSJitInfo::Method,
8718 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8719 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8720 false, /* isInfallible. False in setters. */
8721 false, /* isMovable. Not relevant for setters. */
8722 false, /* isEliminatable. Not relevant for setters. */
8723 false, /* isAlwaysInSlot. Only relevant for getters. */
8724 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8725 false, /* isTypedMethod. Only relevant for methods. */
8726 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8727};
8728
8729MOZ_CAN_RUN_SCRIPT static bool
8730passSequenceOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8731{
8732 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfNullableInts");
8733 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8736( cx, "TestExampleInterface"
, "passSequenceOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8734 "TestExampleInterface", "passSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8736( cx, "TestExampleInterface"
, "passSequenceOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8735 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8736( cx, "TestExampleInterface"
, "passSequenceOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8736 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8736( cx, "TestExampleInterface"
, "passSequenceOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8737
8738 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8739 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfNullableInts", 1)) {
8740 return false;
8741 }
8742 binding_detail::AutoSequence<Nullable<int32_t>> arg0;
8743 if (args[0].isObject()) {
8744 JS::ForOfIterator iter(cx);
8745 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
8746 return false;
8747 }
8748 if (!iter.valueIsIterable()) {
8749 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8750 return false;
8751 }
8752 binding_detail::AutoSequence<Nullable<int32_t>> &arr = arg0;
8753 JS::Rooted<JS::Value> temp(cx);
8754 while (true) {
8755 bool done;
8756 if (!iter.next(&temp, &done)) {
8757 return false;
8758 }
8759 if (done) {
8760 break;
8761 }
8762 Nullable<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
8763 if (!slotPtr) {
8764 JS_ReportOutOfMemory(cx);
8765 return false;
8766 }
8767 Nullable<int32_t>& slot = *slotPtr;
8768 if (temp.isNullOrUndefined()) {
8769 slot.SetNull();
8770 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot.SetValue())) {
8771 return false;
8772 }
8773 }
8774 } else {
8775 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8776 return false;
8777 }
8778 // NOTE: This assert does NOT call the function.
8779 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableInts(Constify(arg0)))>, "Should be returning void here");
8780 MOZ_KnownLive(self)(self)->PassSequenceOfNullableInts(Constify(arg0));
8781 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8781); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8781; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8782 args.rval().setUndefined();
8783 return true;
8784}
8785
8786static const JSJitInfo passSequenceOfNullableInts_methodinfo = {
8787 { (JSJitGetterOp)passSequenceOfNullableInts },
8788 { prototypes::id::TestExampleInterface },
8789 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8790 JSJitInfo::Method,
8791 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8792 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8793 false, /* isInfallible. False in setters. */
8794 false, /* isMovable. Not relevant for setters. */
8795 false, /* isEliminatable. Not relevant for setters. */
8796 false, /* isAlwaysInSlot. Only relevant for getters. */
8797 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8798 false, /* isTypedMethod. Only relevant for methods. */
8799 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8800};
8801
8802MOZ_CAN_RUN_SCRIPT static bool
8803passOptionalSequenceOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8804{
8805 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalSequenceOfNullableInts");
8806 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8809( cx, "TestExampleInterface"
, "passOptionalSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8807 "TestExampleInterface", "passOptionalSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8809( cx, "TestExampleInterface"
, "passOptionalSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8808 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8809( cx, "TestExampleInterface"
, "passOptionalSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8809 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8809( cx, "TestExampleInterface"
, "passOptionalSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8810
8811 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8812 Optional<Sequence<Nullable<int32_t>>> arg0;
8813 if (args.hasDefined(0)) {
8814 arg0.Construct();
8815 if (args[0].isObject()) {
8816 JS::ForOfIterator iter(cx);
8817 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
8818 return false;
8819 }
8820 if (!iter.valueIsIterable()) {
8821 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8822 return false;
8823 }
8824 Sequence<Nullable<int32_t>> &arr = arg0.Value();
8825 JS::Rooted<JS::Value> temp(cx);
8826 while (true) {
8827 bool done;
8828 if (!iter.next(&temp, &done)) {
8829 return false;
8830 }
8831 if (done) {
8832 break;
8833 }
8834 Nullable<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
8835 if (!slotPtr) {
8836 JS_ReportOutOfMemory(cx);
8837 return false;
8838 }
8839 Nullable<int32_t>& slot = *slotPtr;
8840 if (temp.isNullOrUndefined()) {
8841 slot.SetNull();
8842 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot.SetValue())) {
8843 return false;
8844 }
8845 }
8846 } else {
8847 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8848 return false;
8849 }
8850 }
8851 // NOTE: This assert does NOT call the function.
8852 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequenceOfNullableInts(Constify(arg0)))>, "Should be returning void here");
8853 MOZ_KnownLive(self)(self)->PassOptionalSequenceOfNullableInts(Constify(arg0));
8854 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8854); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8854; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8855 args.rval().setUndefined();
8856 return true;
8857}
8858
8859static const JSJitInfo passOptionalSequenceOfNullableInts_methodinfo = {
8860 { (JSJitGetterOp)passOptionalSequenceOfNullableInts },
8861 { prototypes::id::TestExampleInterface },
8862 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8863 JSJitInfo::Method,
8864 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8865 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8866 false, /* isInfallible. False in setters. */
8867 false, /* isMovable. Not relevant for setters. */
8868 false, /* isEliminatable. Not relevant for setters. */
8869 false, /* isAlwaysInSlot. Only relevant for getters. */
8870 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8871 false, /* isTypedMethod. Only relevant for methods. */
8872 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8873};
8874
8875MOZ_CAN_RUN_SCRIPT static bool
8876passOptionalNullableSequenceOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8877{
8878 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableSequenceOfNullableInts");
8879 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8882( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8880 "TestExampleInterface", "passOptionalNullableSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8882( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8881 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8882( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8882 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8882( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8883
8884 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8885 Optional<Nullable<Sequence<Nullable<int32_t>>>> arg0;
8886 if (args.hasDefined(0)) {
8887 arg0.Construct();
8888 if (args[0].isObject()) {
8889 JS::ForOfIterator iter(cx);
8890 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
8891 return false;
8892 }
8893 if (!iter.valueIsIterable()) {
8894 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8895 return false;
8896 }
8897 Sequence<Nullable<int32_t>> &arr = arg0.Value().SetValue();
8898 JS::Rooted<JS::Value> temp(cx);
8899 while (true) {
8900 bool done;
8901 if (!iter.next(&temp, &done)) {
8902 return false;
8903 }
8904 if (done) {
8905 break;
8906 }
8907 Nullable<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
8908 if (!slotPtr) {
8909 JS_ReportOutOfMemory(cx);
8910 return false;
8911 }
8912 Nullable<int32_t>& slot = *slotPtr;
8913 if (temp.isNullOrUndefined()) {
8914 slot.SetNull();
8915 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot.SetValue())) {
8916 return false;
8917 }
8918 }
8919 } else if (args[0].isNullOrUndefined()) {
8920 arg0.Value().SetNull();
8921 } else {
8922 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
8923 return false;
8924 }
8925 }
8926 // NOTE: This assert does NOT call the function.
8927 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableInts(Constify(arg0)))>, "Should be returning void here");
8928 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableInts(Constify(arg0));
8929 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8929); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8929; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8930 args.rval().setUndefined();
8931 return true;
8932}
8933
8934static const JSJitInfo passOptionalNullableSequenceOfNullableInts_methodinfo = {
8935 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableInts },
8936 { prototypes::id::TestExampleInterface },
8937 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8938 JSJitInfo::Method,
8939 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8940 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8941 false, /* isInfallible. False in setters. */
8942 false, /* isMovable. Not relevant for setters. */
8943 false, /* isEliminatable. Not relevant for setters. */
8944 false, /* isAlwaysInSlot. Only relevant for getters. */
8945 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8946 false, /* isTypedMethod. Only relevant for methods. */
8947 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8948};
8949
8950MOZ_CAN_RUN_SCRIPT static bool
8951receiveCastableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8952{
8953 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8956( cx, "TestExampleInterface"
, "receiveCastableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8954 "TestExampleInterface", "receiveCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8956( cx, "TestExampleInterface"
, "receiveCastableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8955 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8956( cx, "TestExampleInterface"
, "receiveCastableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8956 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8956( cx, "TestExampleInterface"
, "receiveCastableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8957
8958 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
8959 nsTArray<StrongPtrForMember<mozilla::dom::TestInterface>> result;
8960 // NOTE: This assert does NOT call the function.
8961 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveCastableObjectSequence(result))>, "Should be returning void here");
8962 MOZ_KnownLive(self)(self)->ReceiveCastableObjectSequence(result);
8963 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8963); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8963; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8964
8965 uint32_t length = result.Length();
8966 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8967 if (!returnArray) {
8968 return false;
8969 }
8970 // Scope for 'tmp'
8971 {
8972 JS::Rooted<JS::Value> tmp(cx);
8973 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8974 // Control block to let us common up the JS_DefineElement calls when there
8975 // are different ways to succeed at wrapping the object.
8976 do {
8977 if (!GetOrCreateDOMReflector(cx, result[sequenceIdx0], &tmp)) {
8978 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 8978); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 8978; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
8979 return false;
8980 }
8981 break;
8982 } while (false);
8983 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8984 JSPROP_ENUMERATE)) {
8985 return false;
8986 }
8987 }
8988 }
8989 args.rval().setObject(*returnArray);
8990 return true;
8991}
8992
8993static const JSJitInfo receiveCastableObjectSequence_methodinfo = {
8994 { (JSJitGetterOp)receiveCastableObjectSequence },
8995 { prototypes::id::TestExampleInterface },
8996 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
8997 JSJitInfo::Method,
8998 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8999 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9000 false, /* isInfallible. False in setters. */
9001 false, /* isMovable. Not relevant for setters. */
9002 false, /* isEliminatable. Not relevant for setters. */
9003 false, /* isAlwaysInSlot. Only relevant for getters. */
9004 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9005 false, /* isTypedMethod. Only relevant for methods. */
9006 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9007};
9008
9009MOZ_CAN_RUN_SCRIPT static bool
9010receiveCallbackObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9011{
9012 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9015( cx, "TestExampleInterface"
, "receiveCallbackObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9013 "TestExampleInterface", "receiveCallbackObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9015( cx, "TestExampleInterface"
, "receiveCallbackObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9014 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9015( cx, "TestExampleInterface"
, "receiveCallbackObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9015 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9015( cx, "TestExampleInterface"
, "receiveCallbackObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9016
9017 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9018 nsTArray<StrongPtrForMember<mozilla::dom::TestCallbackInterface>> result;
9019 // NOTE: This assert does NOT call the function.
9020 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveCallbackObjectSequence(result))>, "Should be returning void here");
9021 MOZ_KnownLive(self)(self)->ReceiveCallbackObjectSequence(result);
9022 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9022); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9022; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9023
9024 uint32_t length = result.Length();
9025 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9026 if (!returnArray) {
9027 return false;
9028 }
9029 // Scope for 'tmp'
9030 {
9031 JS::Rooted<JS::Value> tmp(cx);
9032 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9033 // Control block to let us common up the JS_DefineElement calls when there
9034 // are different ways to succeed at wrapping the object.
9035 do {
9036 tmp.setObjectOrNull(GetCallbackFromCallbackObject(cx, result[sequenceIdx0]));
9037 if (!MaybeWrapObjectValue(cx, &tmp)) {
9038 return false;
9039 }
9040 break;
9041 } while (false);
9042 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9043 JSPROP_ENUMERATE)) {
9044 return false;
9045 }
9046 }
9047 }
9048 args.rval().setObject(*returnArray);
9049 return true;
9050}
9051
9052static const JSJitInfo receiveCallbackObjectSequence_methodinfo = {
9053 { (JSJitGetterOp)receiveCallbackObjectSequence },
9054 { prototypes::id::TestExampleInterface },
9055 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9056 JSJitInfo::Method,
9057 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9058 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9059 false, /* isInfallible. False in setters. */
9060 false, /* isMovable. Not relevant for setters. */
9061 false, /* isEliminatable. Not relevant for setters. */
9062 false, /* isAlwaysInSlot. Only relevant for getters. */
9063 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9064 false, /* isTypedMethod. Only relevant for methods. */
9065 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9066};
9067
9068MOZ_CAN_RUN_SCRIPT static bool
9069receiveNullableCastableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9070{
9071 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9074( cx, "TestExampleInterface"
, "receiveNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9072 "TestExampleInterface", "receiveNullableCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9074( cx, "TestExampleInterface"
, "receiveNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9073 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9074( cx, "TestExampleInterface"
, "receiveNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9074 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9074( cx, "TestExampleInterface"
, "receiveNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9075
9076 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9077 nsTArray<StrongPtrForMember<mozilla::dom::TestInterface>> result;
9078 // NOTE: This assert does NOT call the function.
9079 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableCastableObjectSequence(result))>, "Should be returning void here");
9080 MOZ_KnownLive(self)(self)->ReceiveNullableCastableObjectSequence(result);
9081 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9081); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9081; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9082
9083 uint32_t length = result.Length();
9084 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9085 if (!returnArray) {
9086 return false;
9087 }
9088 // Scope for 'tmp'
9089 {
9090 JS::Rooted<JS::Value> tmp(cx);
9091 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9092 // Control block to let us common up the JS_DefineElement calls when there
9093 // are different ways to succeed at wrapping the object.
9094 do {
9095 if (!result[sequenceIdx0]) {
9096 tmp.setNull();
9097 break;
9098 }
9099 if (!GetOrCreateDOMReflector(cx, result[sequenceIdx0], &tmp)) {
9100 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9100); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9100; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9101 return false;
9102 }
9103 break;
9104 } while (false);
9105 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9106 JSPROP_ENUMERATE)) {
9107 return false;
9108 }
9109 }
9110 }
9111 args.rval().setObject(*returnArray);
9112 return true;
9113}
9114
9115static const JSJitInfo receiveNullableCastableObjectSequence_methodinfo = {
9116 { (JSJitGetterOp)receiveNullableCastableObjectSequence },
9117 { prototypes::id::TestExampleInterface },
9118 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9119 JSJitInfo::Method,
9120 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9121 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9122 false, /* isInfallible. False in setters. */
9123 false, /* isMovable. Not relevant for setters. */
9124 false, /* isEliminatable. Not relevant for setters. */
9125 false, /* isAlwaysInSlot. Only relevant for getters. */
9126 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9127 false, /* isTypedMethod. Only relevant for methods. */
9128 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9129};
9130
9131MOZ_CAN_RUN_SCRIPT static bool
9132receiveNullableCallbackObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9133{
9134 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9137( cx, "TestExampleInterface"
, "receiveNullableCallbackObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9135 "TestExampleInterface", "receiveNullableCallbackObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9137( cx, "TestExampleInterface"
, "receiveNullableCallbackObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9136 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9137( cx, "TestExampleInterface"
, "receiveNullableCallbackObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9137 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9137( cx, "TestExampleInterface"
, "receiveNullableCallbackObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9138
9139 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9140 nsTArray<StrongPtrForMember<mozilla::dom::TestCallbackInterface>> result;
9141 // NOTE: This assert does NOT call the function.
9142 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableCallbackObjectSequence(result))>, "Should be returning void here");
9143 MOZ_KnownLive(self)(self)->ReceiveNullableCallbackObjectSequence(result);
9144 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9144); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9144; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9145
9146 uint32_t length = result.Length();
9147 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9148 if (!returnArray) {
9149 return false;
9150 }
9151 // Scope for 'tmp'
9152 {
9153 JS::Rooted<JS::Value> tmp(cx);
9154 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9155 // Control block to let us common up the JS_DefineElement calls when there
9156 // are different ways to succeed at wrapping the object.
9157 do {
9158 if (result[sequenceIdx0]) {
9159 tmp.setObjectOrNull(GetCallbackFromCallbackObject(cx, result[sequenceIdx0]));
9160 if (!MaybeWrapObjectOrNullValue(cx, &tmp)) {
9161 return false;
9162 }
9163 break;
9164 } else {
9165 tmp.setNull();
9166 break;
9167 }
9168 } while (false);
9169 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9170 JSPROP_ENUMERATE)) {
9171 return false;
9172 }
9173 }
9174 }
9175 args.rval().setObject(*returnArray);
9176 return true;
9177}
9178
9179static const JSJitInfo receiveNullableCallbackObjectSequence_methodinfo = {
9180 { (JSJitGetterOp)receiveNullableCallbackObjectSequence },
9181 { prototypes::id::TestExampleInterface },
9182 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9183 JSJitInfo::Method,
9184 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9185 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9186 false, /* isInfallible. False in setters. */
9187 false, /* isMovable. Not relevant for setters. */
9188 false, /* isEliminatable. Not relevant for setters. */
9189 false, /* isAlwaysInSlot. Only relevant for getters. */
9190 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9191 false, /* isTypedMethod. Only relevant for methods. */
9192 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9193};
9194
9195MOZ_CAN_RUN_SCRIPT static bool
9196receiveCastableObjectNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9197{
9198 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9201( cx, "TestExampleInterface"
, "receiveCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9199 "TestExampleInterface", "receiveCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9201( cx, "TestExampleInterface"
, "receiveCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9200 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9201( cx, "TestExampleInterface"
, "receiveCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9201 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9201( cx, "TestExampleInterface"
, "receiveCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9202
9203 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9204 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestInterface>>> result;
9205 // NOTE: This assert does NOT call the function.
9206 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveCastableObjectNullableSequence(result))>, "Should be returning void here");
9207 MOZ_KnownLive(self)(self)->ReceiveCastableObjectNullableSequence(result);
9208 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9208); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9208; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9209
9210 if (result.IsNull()) {
9211 args.rval().setNull();
9212 return true;
9213 }
9214
9215 uint32_t length = result.Value().Length();
9216 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9217 if (!returnArray) {
9218 return false;
9219 }
9220 // Scope for 'tmp'
9221 {
9222 JS::Rooted<JS::Value> tmp(cx);
9223 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9224 // Control block to let us common up the JS_DefineElement calls when there
9225 // are different ways to succeed at wrapping the object.
9226 do {
9227 if (!GetOrCreateDOMReflector(cx, result.Value()[sequenceIdx0], &tmp)) {
9228 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9228); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9228; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9229 return false;
9230 }
9231 break;
9232 } while (false);
9233 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9234 JSPROP_ENUMERATE)) {
9235 return false;
9236 }
9237 }
9238 }
9239 args.rval().setObject(*returnArray);
9240 return true;
9241}
9242
9243static const JSJitInfo receiveCastableObjectNullableSequence_methodinfo = {
9244 { (JSJitGetterOp)receiveCastableObjectNullableSequence },
9245 { prototypes::id::TestExampleInterface },
9246 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9247 JSJitInfo::Method,
9248 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9249 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
9250 false, /* isInfallible. False in setters. */
9251 false, /* isMovable. Not relevant for setters. */
9252 false, /* isEliminatable. Not relevant for setters. */
9253 false, /* isAlwaysInSlot. Only relevant for getters. */
9254 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9255 false, /* isTypedMethod. Only relevant for methods. */
9256 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9257};
9258
9259MOZ_CAN_RUN_SCRIPT static bool
9260receiveNullableCastableObjectNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9261{
9262 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9265( cx, "TestExampleInterface"
, "receiveNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9263 "TestExampleInterface", "receiveNullableCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9265( cx, "TestExampleInterface"
, "receiveNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9264 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9265( cx, "TestExampleInterface"
, "receiveNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9265 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9265( cx, "TestExampleInterface"
, "receiveNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9266
9267 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9268 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestInterface>>> result;
9269 // NOTE: This assert does NOT call the function.
9270 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableCastableObjectNullableSequence(result))>, "Should be returning void here");
9271 MOZ_KnownLive(self)(self)->ReceiveNullableCastableObjectNullableSequence(result);
9272 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9272); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9272; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9273
9274 if (result.IsNull()) {
9275 args.rval().setNull();
9276 return true;
9277 }
9278
9279 uint32_t length = result.Value().Length();
9280 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9281 if (!returnArray) {
9282 return false;
9283 }
9284 // Scope for 'tmp'
9285 {
9286 JS::Rooted<JS::Value> tmp(cx);
9287 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9288 // Control block to let us common up the JS_DefineElement calls when there
9289 // are different ways to succeed at wrapping the object.
9290 do {
9291 if (!result.Value()[sequenceIdx0]) {
9292 tmp.setNull();
9293 break;
9294 }
9295 if (!GetOrCreateDOMReflector(cx, result.Value()[sequenceIdx0], &tmp)) {
9296 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9296); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9296; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9297 return false;
9298 }
9299 break;
9300 } while (false);
9301 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9302 JSPROP_ENUMERATE)) {
9303 return false;
9304 }
9305 }
9306 }
9307 args.rval().setObject(*returnArray);
9308 return true;
9309}
9310
9311static const JSJitInfo receiveNullableCastableObjectNullableSequence_methodinfo = {
9312 { (JSJitGetterOp)receiveNullableCastableObjectNullableSequence },
9313 { prototypes::id::TestExampleInterface },
9314 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9315 JSJitInfo::Method,
9316 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9317 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
9318 false, /* isInfallible. False in setters. */
9319 false, /* isMovable. Not relevant for setters. */
9320 false, /* isEliminatable. Not relevant for setters. */
9321 false, /* isAlwaysInSlot. Only relevant for getters. */
9322 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9323 false, /* isTypedMethod. Only relevant for methods. */
9324 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9325};
9326
9327MOZ_CAN_RUN_SCRIPT static bool
9328receiveWeakCastableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9329{
9330 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9333( cx, "TestExampleInterface"
, "receiveWeakCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9331 "TestExampleInterface", "receiveWeakCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9333( cx, "TestExampleInterface"
, "receiveWeakCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9332 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9333( cx, "TestExampleInterface"
, "receiveWeakCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9333 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9333( cx, "TestExampleInterface"
, "receiveWeakCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9334
9335 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9336 nsTArray<StrongPtrForMember<mozilla::dom::TestInterface>> result;
9337 // NOTE: This assert does NOT call the function.
9338 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveWeakCastableObjectSequence(result))>, "Should be returning void here");
9339 MOZ_KnownLive(self)(self)->ReceiveWeakCastableObjectSequence(result);
9340 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9340); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9340; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9341
9342 uint32_t length = result.Length();
9343 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9344 if (!returnArray) {
9345 return false;
9346 }
9347 // Scope for 'tmp'
9348 {
9349 JS::Rooted<JS::Value> tmp(cx);
9350 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9351 // Control block to let us common up the JS_DefineElement calls when there
9352 // are different ways to succeed at wrapping the object.
9353 do {
9354 if (!GetOrCreateDOMReflector(cx, result[sequenceIdx0], &tmp)) {
9355 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9355); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9355; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9356 return false;
9357 }
9358 break;
9359 } while (false);
9360 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9361 JSPROP_ENUMERATE)) {
9362 return false;
9363 }
9364 }
9365 }
9366 args.rval().setObject(*returnArray);
9367 return true;
9368}
9369
9370static const JSJitInfo receiveWeakCastableObjectSequence_methodinfo = {
9371 { (JSJitGetterOp)receiveWeakCastableObjectSequence },
9372 { prototypes::id::TestExampleInterface },
9373 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9374 JSJitInfo::Method,
9375 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9376 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9377 false, /* isInfallible. False in setters. */
9378 false, /* isMovable. Not relevant for setters. */
9379 false, /* isEliminatable. Not relevant for setters. */
9380 false, /* isAlwaysInSlot. Only relevant for getters. */
9381 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9382 false, /* isTypedMethod. Only relevant for methods. */
9383 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9384};
9385
9386MOZ_CAN_RUN_SCRIPT static bool
9387receiveWeakNullableCastableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9388{
9389 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9392( cx, "TestExampleInterface"
, "receiveWeakNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9390 "TestExampleInterface", "receiveWeakNullableCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9392( cx, "TestExampleInterface"
, "receiveWeakNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9391 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9392( cx, "TestExampleInterface"
, "receiveWeakNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9392 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9392( cx, "TestExampleInterface"
, "receiveWeakNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9393
9394 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9395 nsTArray<StrongPtrForMember<mozilla::dom::TestInterface>> result;
9396 // NOTE: This assert does NOT call the function.
9397 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveWeakNullableCastableObjectSequence(result))>, "Should be returning void here");
9398 MOZ_KnownLive(self)(self)->ReceiveWeakNullableCastableObjectSequence(result);
9399 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9399); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9399; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9400
9401 uint32_t length = result.Length();
9402 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9403 if (!returnArray) {
9404 return false;
9405 }
9406 // Scope for 'tmp'
9407 {
9408 JS::Rooted<JS::Value> tmp(cx);
9409 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9410 // Control block to let us common up the JS_DefineElement calls when there
9411 // are different ways to succeed at wrapping the object.
9412 do {
9413 if (!result[sequenceIdx0]) {
9414 tmp.setNull();
9415 break;
9416 }
9417 if (!GetOrCreateDOMReflector(cx, result[sequenceIdx0], &tmp)) {
9418 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9418); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9418; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9419 return false;
9420 }
9421 break;
9422 } while (false);
9423 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9424 JSPROP_ENUMERATE)) {
9425 return false;
9426 }
9427 }
9428 }
9429 args.rval().setObject(*returnArray);
9430 return true;
9431}
9432
9433static const JSJitInfo receiveWeakNullableCastableObjectSequence_methodinfo = {
9434 { (JSJitGetterOp)receiveWeakNullableCastableObjectSequence },
9435 { prototypes::id::TestExampleInterface },
9436 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9437 JSJitInfo::Method,
9438 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9439 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9440 false, /* isInfallible. False in setters. */
9441 false, /* isMovable. Not relevant for setters. */
9442 false, /* isEliminatable. Not relevant for setters. */
9443 false, /* isAlwaysInSlot. Only relevant for getters. */
9444 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9445 false, /* isTypedMethod. Only relevant for methods. */
9446 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9447};
9448
9449MOZ_CAN_RUN_SCRIPT static bool
9450receiveWeakCastableObjectNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9451{
9452 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9455( cx, "TestExampleInterface"
, "receiveWeakCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9453 "TestExampleInterface", "receiveWeakCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9455( cx, "TestExampleInterface"
, "receiveWeakCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9454 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9455( cx, "TestExampleInterface"
, "receiveWeakCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9455 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9455( cx, "TestExampleInterface"
, "receiveWeakCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9456
9457 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9458 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestInterface>>> result;
9459 // NOTE: This assert does NOT call the function.
9460 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveWeakCastableObjectNullableSequence(result))>, "Should be returning void here");
9461 MOZ_KnownLive(self)(self)->ReceiveWeakCastableObjectNullableSequence(result);
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)"
, "../TestExampleGenBinding.cpp", 9462); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9462; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9463
9464 if (result.IsNull()) {
9465 args.rval().setNull();
9466 return true;
9467 }
9468
9469 uint32_t length = result.Value().Length();
9470 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9471 if (!returnArray) {
9472 return false;
9473 }
9474 // Scope for 'tmp'
9475 {
9476 JS::Rooted<JS::Value> tmp(cx);
9477 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9478 // Control block to let us common up the JS_DefineElement calls when there
9479 // are different ways to succeed at wrapping the object.
9480 do {
9481 if (!GetOrCreateDOMReflector(cx, result.Value()[sequenceIdx0], &tmp)) {
9482 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9482); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9482; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9483 return false;
9484 }
9485 break;
9486 } while (false);
9487 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9488 JSPROP_ENUMERATE)) {
9489 return false;
9490 }
9491 }
9492 }
9493 args.rval().setObject(*returnArray);
9494 return true;
9495}
9496
9497static const JSJitInfo receiveWeakCastableObjectNullableSequence_methodinfo = {
9498 { (JSJitGetterOp)receiveWeakCastableObjectNullableSequence },
9499 { prototypes::id::TestExampleInterface },
9500 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9501 JSJitInfo::Method,
9502 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9503 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
9504 false, /* isInfallible. False in setters. */
9505 false, /* isMovable. Not relevant for setters. */
9506 false, /* isEliminatable. Not relevant for setters. */
9507 false, /* isAlwaysInSlot. Only relevant for getters. */
9508 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9509 false, /* isTypedMethod. Only relevant for methods. */
9510 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9511};
9512
9513MOZ_CAN_RUN_SCRIPT static bool
9514receiveWeakNullableCastableObjectNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9515{
9516 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9519( cx, "TestExampleInterface"
, "receiveWeakNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9517 "TestExampleInterface", "receiveWeakNullableCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9519( cx, "TestExampleInterface"
, "receiveWeakNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9518 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9519( cx, "TestExampleInterface"
, "receiveWeakNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9519 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9519( cx, "TestExampleInterface"
, "receiveWeakNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9520
9521 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9522 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestInterface>>> result;
9523 // NOTE: This assert does NOT call the function.
9524 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveWeakNullableCastableObjectNullableSequence(result))>, "Should be returning void here");
9525 MOZ_KnownLive(self)(self)->ReceiveWeakNullableCastableObjectNullableSequence(result);
9526 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9526); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9526; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9527
9528 if (result.IsNull()) {
9529 args.rval().setNull();
9530 return true;
9531 }
9532
9533 uint32_t length = result.Value().Length();
9534 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9535 if (!returnArray) {
9536 return false;
9537 }
9538 // Scope for 'tmp'
9539 {
9540 JS::Rooted<JS::Value> tmp(cx);
9541 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9542 // Control block to let us common up the JS_DefineElement calls when there
9543 // are different ways to succeed at wrapping the object.
9544 do {
9545 if (!result.Value()[sequenceIdx0]) {
9546 tmp.setNull();
9547 break;
9548 }
9549 if (!GetOrCreateDOMReflector(cx, result.Value()[sequenceIdx0], &tmp)) {
9550 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9550); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9550; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9551 return false;
9552 }
9553 break;
9554 } while (false);
9555 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9556 JSPROP_ENUMERATE)) {
9557 return false;
9558 }
9559 }
9560 }
9561 args.rval().setObject(*returnArray);
9562 return true;
9563}
9564
9565static const JSJitInfo receiveWeakNullableCastableObjectNullableSequence_methodinfo = {
9566 { (JSJitGetterOp)receiveWeakNullableCastableObjectNullableSequence },
9567 { prototypes::id::TestExampleInterface },
9568 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9569 JSJitInfo::Method,
9570 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9571 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
9572 false, /* isInfallible. False in setters. */
9573 false, /* isMovable. Not relevant for setters. */
9574 false, /* isEliminatable. Not relevant for setters. */
9575 false, /* isAlwaysInSlot. Only relevant for getters. */
9576 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9577 false, /* isTypedMethod. Only relevant for methods. */
9578 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9579};
9580
9581MOZ_CAN_RUN_SCRIPT static bool
9582passCastableObjectSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9583{
9584 BindingCallContext cx(cx_, "TestExampleInterface.passCastableObjectSequence");
9585 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9588( cx, "TestExampleInterface"
, "passCastableObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9586 "TestExampleInterface", "passCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9588( cx, "TestExampleInterface"
, "passCastableObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9587 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9588( cx, "TestExampleInterface"
, "passCastableObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9588 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9588( cx, "TestExampleInterface"
, "passCastableObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9589
9590 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9591 if (!args.requireAtLeast(cx, "TestExampleInterface.passCastableObjectSequence", 1)) {
9592 return false;
9593 }
9594 binding_detail::AutoSequence<OwningNonNull<mozilla::dom::TestInterface>> arg0;
9595 if (args[0].isObject()) {
9596 JS::ForOfIterator iter(cx);
9597 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9598 return false;
9599 }
9600 if (!iter.valueIsIterable()) {
9601 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9602 return false;
9603 }
9604 binding_detail::AutoSequence<OwningNonNull<mozilla::dom::TestInterface>> &arr = arg0;
9605 JS::Rooted<JS::Value> temp(cx);
9606 while (true) {
9607 bool done;
9608 if (!iter.next(&temp, &done)) {
9609 return false;
9610 }
9611 if (done) {
9612 break;
9613 }
9614 OwningNonNull<mozilla::dom::TestInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
9615 if (!slotPtr) {
9616 JS_ReportOutOfMemory(cx);
9617 return false;
9618 }
9619 OwningNonNull<mozilla::dom::TestInterface>& slot = *slotPtr;
9620 if (temp.isObject()) {
9621 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
9622 {
9623 // Our JSContext should be in the right global to do unwrapping in.
9624 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
9625 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
9626 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestInterface");
9627 return false;
9628 }
9629 }
9630 } else {
9631 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
9632 return false;
9633 }
9634 }
9635 } else {
9636 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9637 return false;
9638 }
9639 // NOTE: This assert does NOT call the function.
9640 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCastableObjectSequence(Constify(arg0)))>, "Should be returning void here");
9641 MOZ_KnownLive(self)(self)->PassCastableObjectSequence(Constify(arg0));
9642 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9642); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9642; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9643 args.rval().setUndefined();
9644 return true;
9645}
9646
9647static const JSJitInfo passCastableObjectSequence_methodinfo = {
9648 { (JSJitGetterOp)passCastableObjectSequence },
9649 { prototypes::id::TestExampleInterface },
9650 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9651 JSJitInfo::Method,
9652 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9653 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9654 false, /* isInfallible. False in setters. */
9655 false, /* isMovable. Not relevant for setters. */
9656 false, /* isEliminatable. Not relevant for setters. */
9657 false, /* isAlwaysInSlot. Only relevant for getters. */
9658 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9659 false, /* isTypedMethod. Only relevant for methods. */
9660 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9661};
9662
9663MOZ_CAN_RUN_SCRIPT static bool
9664passNullableCastableObjectSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9665{
9666 BindingCallContext cx(cx_, "TestExampleInterface.passNullableCastableObjectSequence");
9667 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9670( cx, "TestExampleInterface"
, "passNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9668 "TestExampleInterface", "passNullableCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9670( cx, "TestExampleInterface"
, "passNullableCastableObjectSequence", 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, "TestExampleInterface"
, "passNullableCastableObjectSequence", 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, "TestExampleInterface"
, "passNullableCastableObjectSequence", 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::TestExampleInterface*>(void_self);
9673 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableCastableObjectSequence", 1)) {
9674 return false;
9675 }
9676 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestInterface>> arg0;
9677 if (args[0].isObject()) {
9678 JS::ForOfIterator iter(cx);
9679 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9680 return false;
9681 }
9682 if (!iter.valueIsIterable()) {
9683 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9684 return false;
9685 }
9686 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestInterface>> &arr = arg0;
9687 JS::Rooted<JS::Value> temp(cx);
9688 while (true) {
9689 bool done;
9690 if (!iter.next(&temp, &done)) {
9691 return false;
9692 }
9693 if (done) {
9694 break;
9695 }
9696 RefPtr<mozilla::dom::TestInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
9697 if (!slotPtr) {
9698 JS_ReportOutOfMemory(cx);
9699 return false;
9700 }
9701 RefPtr<mozilla::dom::TestInterface>& slot = *slotPtr;
9702 if (temp.isObject()) {
9703 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
9704 {
9705 // Our JSContext should be in the right global to do unwrapping in.
9706 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
9707 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
9708 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestInterface");
9709 return false;
9710 }
9711 }
9712 } else if (temp.isNullOrUndefined()) {
9713 slot = nullptr;
9714 } else {
9715 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
9716 return false;
9717 }
9718 }
9719 } else {
9720 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9721 return false;
9722 }
9723 // NOTE: This assert does NOT call the function.
9724 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCastableObjectSequence(Constify(arg0)))>, "Should be returning void here");
9725 MOZ_KnownLive(self)(self)->PassNullableCastableObjectSequence(Constify(arg0));
9726 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9726); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9726; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9727 args.rval().setUndefined();
9728 return true;
9729}
9730
9731static const JSJitInfo passNullableCastableObjectSequence_methodinfo = {
9732 { (JSJitGetterOp)passNullableCastableObjectSequence },
9733 { prototypes::id::TestExampleInterface },
9734 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9735 JSJitInfo::Method,
9736 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9737 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9738 false, /* isInfallible. False in setters. */
9739 false, /* isMovable. Not relevant for setters. */
9740 false, /* isEliminatable. Not relevant for setters. */
9741 false, /* isAlwaysInSlot. Only relevant for getters. */
9742 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9743 false, /* isTypedMethod. Only relevant for methods. */
9744 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9745};
9746
9747MOZ_CAN_RUN_SCRIPT static bool
9748passCastableObjectNullableSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9749{
9750 BindingCallContext cx(cx_, "TestExampleInterface.passCastableObjectNullableSequence");
9751 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9754( cx, "TestExampleInterface"
, "passCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9752 "TestExampleInterface", "passCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9754( cx, "TestExampleInterface"
, "passCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9753 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9754( cx, "TestExampleInterface"
, "passCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9754 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9754( cx, "TestExampleInterface"
, "passCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9755
9756 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9757 if (!args.requireAtLeast(cx, "TestExampleInterface.passCastableObjectNullableSequence", 1)) {
9758 return false;
9759 }
9760 Nullable<Sequence<OwningNonNull<mozilla::dom::TestInterface>>> arg0;
9761 if (args[0].isObject()) {
9762 JS::ForOfIterator iter(cx);
9763 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9764 return false;
9765 }
9766 if (!iter.valueIsIterable()) {
9767 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9768 return false;
9769 }
9770 Sequence<OwningNonNull<mozilla::dom::TestInterface>> &arr = arg0.SetValue();
9771 JS::Rooted<JS::Value> temp(cx);
9772 while (true) {
9773 bool done;
9774 if (!iter.next(&temp, &done)) {
9775 return false;
9776 }
9777 if (done) {
9778 break;
9779 }
9780 OwningNonNull<mozilla::dom::TestInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
9781 if (!slotPtr) {
9782 JS_ReportOutOfMemory(cx);
9783 return false;
9784 }
9785 OwningNonNull<mozilla::dom::TestInterface>& slot = *slotPtr;
9786 if (temp.isObject()) {
9787 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
9788 {
9789 // Our JSContext should be in the right global to do unwrapping in.
9790 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
9791 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
9792 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestInterface");
9793 return false;
9794 }
9795 }
9796 } else {
9797 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
9798 return false;
9799 }
9800 }
9801 } else if (args[0].isNullOrUndefined()) {
9802 arg0.SetNull();
9803 } else {
9804 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9805 return false;
9806 }
9807 // NOTE: This assert does NOT call the function.
9808 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCastableObjectNullableSequence(Constify(arg0)))>, "Should be returning void here");
9809 MOZ_KnownLive(self)(self)->PassCastableObjectNullableSequence(Constify(arg0));
9810 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9810); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9810; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9811 args.rval().setUndefined();
9812 return true;
9813}
9814
9815static const JSJitInfo passCastableObjectNullableSequence_methodinfo = {
9816 { (JSJitGetterOp)passCastableObjectNullableSequence },
9817 { prototypes::id::TestExampleInterface },
9818 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9819 JSJitInfo::Method,
9820 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9821 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9822 false, /* isInfallible. False in setters. */
9823 false, /* isMovable. Not relevant for setters. */
9824 false, /* isEliminatable. Not relevant for setters. */
9825 false, /* isAlwaysInSlot. Only relevant for getters. */
9826 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9827 false, /* isTypedMethod. Only relevant for methods. */
9828 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9829};
9830
9831MOZ_CAN_RUN_SCRIPT static bool
9832passNullableCastableObjectNullableSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9833{
9834 BindingCallContext cx(cx_, "TestExampleInterface.passNullableCastableObjectNullableSequence");
9835 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9838( cx, "TestExampleInterface"
, "passNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9836 "TestExampleInterface", "passNullableCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9838( cx, "TestExampleInterface"
, "passNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9837 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9838( cx, "TestExampleInterface"
, "passNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9838 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9838( cx, "TestExampleInterface"
, "passNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9839
9840 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9841 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableCastableObjectNullableSequence", 1)) {
9842 return false;
9843 }
9844 Nullable<Sequence<RefPtr<mozilla::dom::TestInterface>>> arg0;
9845 if (args[0].isObject()) {
9846 JS::ForOfIterator iter(cx);
9847 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9848 return false;
9849 }
9850 if (!iter.valueIsIterable()) {
9851 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9852 return false;
9853 }
9854 Sequence<RefPtr<mozilla::dom::TestInterface>> &arr = arg0.SetValue();
9855 JS::Rooted<JS::Value> temp(cx);
9856 while (true) {
9857 bool done;
9858 if (!iter.next(&temp, &done)) {
9859 return false;
9860 }
9861 if (done) {
9862 break;
9863 }
9864 RefPtr<mozilla::dom::TestInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
9865 if (!slotPtr) {
9866 JS_ReportOutOfMemory(cx);
9867 return false;
9868 }
9869 RefPtr<mozilla::dom::TestInterface>& slot = *slotPtr;
9870 if (temp.isObject()) {
9871 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
9872 {
9873 // Our JSContext should be in the right global to do unwrapping in.
9874 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
9875 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
9876 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestInterface");
9877 return false;
9878 }
9879 }
9880 } else if (temp.isNullOrUndefined()) {
9881 slot = nullptr;
9882 } else {
9883 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
9884 return false;
9885 }
9886 }
9887 } else if (args[0].isNullOrUndefined()) {
9888 arg0.SetNull();
9889 } else {
9890 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9891 return false;
9892 }
9893 // NOTE: This assert does NOT call the function.
9894 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCastableObjectNullableSequence(Constify(arg0)))>, "Should be returning void here");
9895 MOZ_KnownLive(self)(self)->PassNullableCastableObjectNullableSequence(Constify(arg0));
9896 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9896); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9896; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9897 args.rval().setUndefined();
9898 return true;
9899}
9900
9901static const JSJitInfo passNullableCastableObjectNullableSequence_methodinfo = {
9902 { (JSJitGetterOp)passNullableCastableObjectNullableSequence },
9903 { prototypes::id::TestExampleInterface },
9904 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9905 JSJitInfo::Method,
9906 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9907 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9908 false, /* isInfallible. False in setters. */
9909 false, /* isMovable. Not relevant for setters. */
9910 false, /* isEliminatable. Not relevant for setters. */
9911 false, /* isAlwaysInSlot. Only relevant for getters. */
9912 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9913 false, /* isTypedMethod. Only relevant for methods. */
9914 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9915};
9916
9917MOZ_CAN_RUN_SCRIPT static bool
9918passOptionalSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9919{
9920 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalSequence");
9921 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9924( cx, "TestExampleInterface"
, "passOptionalSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
9922 "TestExampleInterface", "passOptionalSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9924( cx, "TestExampleInterface"
, "passOptionalSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
9923 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9924( cx, "TestExampleInterface"
, "passOptionalSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
9924 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9924( cx, "TestExampleInterface"
, "passOptionalSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
9925
9926 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9927 Optional<Sequence<int32_t>> arg0;
9928 if (args.hasDefined(0)) {
9929 arg0.Construct();
9930 if (args[0].isObject()) {
9931 JS::ForOfIterator iter(cx);
9932 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9933 return false;
9934 }
9935 if (!iter.valueIsIterable()) {
9936 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9937 return false;
9938 }
9939 Sequence<int32_t> &arr = arg0.Value();
9940 JS::Rooted<JS::Value> temp(cx);
9941 while (true) {
9942 bool done;
9943 if (!iter.next(&temp, &done)) {
9944 return false;
9945 }
9946 if (done) {
9947 break;
9948 }
9949 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
9950 if (!slotPtr) {
9951 JS_ReportOutOfMemory(cx);
9952 return false;
9953 }
9954 int32_t& slot = *slotPtr;
9955 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
9956 return false;
9957 }
9958 }
9959 } else {
9960 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9961 return false;
9962 }
9963 }
9964 // NOTE: This assert does NOT call the function.
9965 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequence(Constify(arg0)))>, "Should be returning void here");
9966 MOZ_KnownLive(self)(self)->PassOptionalSequence(Constify(arg0));
9967 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 9967); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9967; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9968 args.rval().setUndefined();
9969 return true;
9970}
9971
9972static const JSJitInfo passOptionalSequence_methodinfo = {
9973 { (JSJitGetterOp)passOptionalSequence },
9974 { prototypes::id::TestExampleInterface },
9975 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
9976 JSJitInfo::Method,
9977 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9978 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9979 false, /* isInfallible. False in setters. */
9980 false, /* isMovable. Not relevant for setters. */
9981 false, /* isEliminatable. Not relevant for setters. */
9982 false, /* isAlwaysInSlot. Only relevant for getters. */
9983 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9984 false, /* isTypedMethod. Only relevant for methods. */
9985 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9986};
9987
9988MOZ_CAN_RUN_SCRIPT static bool
9989passOptionalSequenceWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9990{
9991 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalSequenceWithDefaultValue");
9992 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9995( cx, "TestExampleInterface"
, "passOptionalSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9993 "TestExampleInterface", "passOptionalSequenceWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9995( cx, "TestExampleInterface"
, "passOptionalSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9994 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9995( cx, "TestExampleInterface"
, "passOptionalSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9995 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9995( cx, "TestExampleInterface"
, "passOptionalSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9996
9997 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
9998 binding_detail::AutoSequence<int32_t> arg0;
9999 if (args.hasDefined(0)) {
10000 if (args[0].isObject()) {
10001 JS::ForOfIterator iter(cx);
10002 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10003 return false;
10004 }
10005 if (!iter.valueIsIterable()) {
10006 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10007 return false;
10008 }
10009 binding_detail::AutoSequence<int32_t> &arr = arg0;
10010 JS::Rooted<JS::Value> temp(cx);
10011 while (true) {
10012 bool done;
10013 if (!iter.next(&temp, &done)) {
10014 return false;
10015 }
10016 if (done) {
10017 break;
10018 }
10019 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
10020 if (!slotPtr) {
10021 JS_ReportOutOfMemory(cx);
10022 return false;
10023 }
10024 int32_t& slot = *slotPtr;
10025 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
10026 return false;
10027 }
10028 }
10029 } else {
10030 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10031 return false;
10032 }
10033 } else {
10034 /* arg0 array is already empty; nothing to do */
10035 }
10036 // NOTE: This assert does NOT call the function.
10037 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequenceWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
10038 MOZ_KnownLive(self)(self)->PassOptionalSequenceWithDefaultValue(Constify(arg0));
10039 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10039); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10039; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10040 args.rval().setUndefined();
10041 return true;
10042}
10043
10044static const JSJitInfo passOptionalSequenceWithDefaultValue_methodinfo = {
10045 { (JSJitGetterOp)passOptionalSequenceWithDefaultValue },
10046 { prototypes::id::TestExampleInterface },
10047 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10048 JSJitInfo::Method,
10049 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10050 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10051 false, /* isInfallible. False in setters. */
10052 false, /* isMovable. Not relevant for setters. */
10053 false, /* isEliminatable. Not relevant for setters. */
10054 false, /* isAlwaysInSlot. Only relevant for getters. */
10055 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10056 false, /* isTypedMethod. Only relevant for methods. */
10057 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10058};
10059
10060MOZ_CAN_RUN_SCRIPT static bool
10061passOptionalNullableSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10062{
10063 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableSequence");
10064 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10067( cx, "TestExampleInterface"
, "passOptionalNullableSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10065 "TestExampleInterface", "passOptionalNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10067( cx, "TestExampleInterface"
, "passOptionalNullableSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10066 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10067( cx, "TestExampleInterface"
, "passOptionalNullableSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10067 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10067( cx, "TestExampleInterface"
, "passOptionalNullableSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10068
10069 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10070 Optional<Nullable<Sequence<int32_t>>> arg0;
10071 if (args.hasDefined(0)) {
10072 arg0.Construct();
10073 if (args[0].isObject()) {
10074 JS::ForOfIterator iter(cx);
10075 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10076 return false;
10077 }
10078 if (!iter.valueIsIterable()) {
10079 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10080 return false;
10081 }
10082 Sequence<int32_t> &arr = arg0.Value().SetValue();
10083 JS::Rooted<JS::Value> temp(cx);
10084 while (true) {
10085 bool done;
10086 if (!iter.next(&temp, &done)) {
10087 return false;
10088 }
10089 if (done) {
10090 break;
10091 }
10092 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
10093 if (!slotPtr) {
10094 JS_ReportOutOfMemory(cx);
10095 return false;
10096 }
10097 int32_t& slot = *slotPtr;
10098 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
10099 return false;
10100 }
10101 }
10102 } else if (args[0].isNullOrUndefined()) {
10103 arg0.Value().SetNull();
10104 } else {
10105 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10106 return false;
10107 }
10108 }
10109 // NOTE: This assert does NOT call the function.
10110 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequence(Constify(arg0)))>, "Should be returning void here");
10111 MOZ_KnownLive(self)(self)->PassOptionalNullableSequence(Constify(arg0));
10112 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10112); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10112; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10113 args.rval().setUndefined();
10114 return true;
10115}
10116
10117static const JSJitInfo passOptionalNullableSequence_methodinfo = {
10118 { (JSJitGetterOp)passOptionalNullableSequence },
10119 { prototypes::id::TestExampleInterface },
10120 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10121 JSJitInfo::Method,
10122 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10123 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10124 false, /* isInfallible. False in setters. */
10125 false, /* isMovable. Not relevant for setters. */
10126 false, /* isEliminatable. Not relevant for setters. */
10127 false, /* isAlwaysInSlot. Only relevant for getters. */
10128 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10129 false, /* isTypedMethod. Only relevant for methods. */
10130 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10131};
10132
10133MOZ_CAN_RUN_SCRIPT static bool
10134passOptionalNullableSequenceWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10135{
10136 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableSequenceWithDefaultValue");
10137 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10140( cx, "TestExampleInterface"
, "passOptionalNullableSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10138 "TestExampleInterface", "passOptionalNullableSequenceWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10140( cx, "TestExampleInterface"
, "passOptionalNullableSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10139 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10140( cx, "TestExampleInterface"
, "passOptionalNullableSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10140 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10140( cx, "TestExampleInterface"
, "passOptionalNullableSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10141
10142 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10143 Nullable<Sequence<int32_t>> arg0;
10144 if (args.hasDefined(0)) {
10145 if (args[0].isObject()) {
10146 JS::ForOfIterator iter(cx);
10147 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10148 return false;
10149 }
10150 if (!iter.valueIsIterable()) {
10151 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10152 return false;
10153 }
10154 Sequence<int32_t> &arr = arg0.SetValue();
10155 JS::Rooted<JS::Value> temp(cx);
10156 while (true) {
10157 bool done;
10158 if (!iter.next(&temp, &done)) {
10159 return false;
10160 }
10161 if (done) {
10162 break;
10163 }
10164 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
10165 if (!slotPtr) {
10166 JS_ReportOutOfMemory(cx);
10167 return false;
10168 }
10169 int32_t& slot = *slotPtr;
10170 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
10171 return false;
10172 }
10173 }
10174 } else if (args[0].isNullOrUndefined()) {
10175 arg0.SetNull();
10176 } else {
10177 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10178 return false;
10179 }
10180 } else {
10181 arg0.SetNull();
10182 }
10183 // NOTE: This assert does NOT call the function.
10184 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
10185 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceWithDefaultValue(Constify(arg0));
10186 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10186); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10186; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10187 args.rval().setUndefined();
10188 return true;
10189}
10190
10191static const JSJitInfo passOptionalNullableSequenceWithDefaultValue_methodinfo = {
10192 { (JSJitGetterOp)passOptionalNullableSequenceWithDefaultValue },
10193 { prototypes::id::TestExampleInterface },
10194 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10195 JSJitInfo::Method,
10196 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10197 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10198 false, /* isInfallible. False in setters. */
10199 false, /* isMovable. Not relevant for setters. */
10200 false, /* isEliminatable. Not relevant for setters. */
10201 false, /* isAlwaysInSlot. Only relevant for getters. */
10202 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10203 false, /* isTypedMethod. Only relevant for methods. */
10204 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10205};
10206
10207MOZ_CAN_RUN_SCRIPT static bool
10208passOptionalNullableSequenceWithDefaultValue2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10209{
10210 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableSequenceWithDefaultValue2");
10211 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10214( cx, "TestExampleInterface"
, "passOptionalNullableSequenceWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10212 "TestExampleInterface", "passOptionalNullableSequenceWithDefaultValue2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10214( cx, "TestExampleInterface"
, "passOptionalNullableSequenceWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10213 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10214( cx, "TestExampleInterface"
, "passOptionalNullableSequenceWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10214 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10214( cx, "TestExampleInterface"
, "passOptionalNullableSequenceWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10215
10216 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10217 Nullable<Sequence<int32_t>> arg0;
10218 if (args.hasDefined(0)) {
10219 if (args[0].isObject()) {
10220 JS::ForOfIterator iter(cx);
10221 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10222 return false;
10223 }
10224 if (!iter.valueIsIterable()) {
10225 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10226 return false;
10227 }
10228 Sequence<int32_t> &arr = arg0.SetValue();
10229 JS::Rooted<JS::Value> temp(cx);
10230 while (true) {
10231 bool done;
10232 if (!iter.next(&temp, &done)) {
10233 return false;
10234 }
10235 if (done) {
10236 break;
10237 }
10238 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
10239 if (!slotPtr) {
10240 JS_ReportOutOfMemory(cx);
10241 return false;
10242 }
10243 int32_t& slot = *slotPtr;
10244 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
10245 return false;
10246 }
10247 }
10248 } else if (args[0].isNullOrUndefined()) {
10249 arg0.SetNull();
10250 } else {
10251 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10252 return false;
10253 }
10254 } else {
10255 arg0.SetValue();
10256 }
10257 // NOTE: This assert does NOT call the function.
10258 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceWithDefaultValue2(Constify(arg0)))>, "Should be returning void here");
10259 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceWithDefaultValue2(Constify(arg0));
10260 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10260); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10260; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10261 args.rval().setUndefined();
10262 return true;
10263}
10264
10265static const JSJitInfo passOptionalNullableSequenceWithDefaultValue2_methodinfo = {
10266 { (JSJitGetterOp)passOptionalNullableSequenceWithDefaultValue2 },
10267 { prototypes::id::TestExampleInterface },
10268 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10269 JSJitInfo::Method,
10270 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10271 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10272 false, /* isInfallible. False in setters. */
10273 false, /* isMovable. Not relevant for setters. */
10274 false, /* isEliminatable. Not relevant for setters. */
10275 false, /* isAlwaysInSlot. Only relevant for getters. */
10276 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10277 false, /* isTypedMethod. Only relevant for methods. */
10278 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10279};
10280
10281MOZ_CAN_RUN_SCRIPT static bool
10282passOptionalObjectSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10283{
10284 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalObjectSequence");
10285 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10288( cx, "TestExampleInterface"
, "passOptionalObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10286 "TestExampleInterface", "passOptionalObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10288( cx, "TestExampleInterface"
, "passOptionalObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10287 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10288( cx, "TestExampleInterface"
, "passOptionalObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10288 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10288( cx, "TestExampleInterface"
, "passOptionalObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10289
10290 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10291 Optional<Sequence<OwningNonNull<mozilla::dom::TestInterface>>> arg0;
10292 if (args.hasDefined(0)) {
10293 arg0.Construct();
10294 if (args[0].isObject()) {
10295 JS::ForOfIterator iter(cx);
10296 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10297 return false;
10298 }
10299 if (!iter.valueIsIterable()) {
10300 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10301 return false;
10302 }
10303 Sequence<OwningNonNull<mozilla::dom::TestInterface>> &arr = arg0.Value();
10304 JS::Rooted<JS::Value> temp(cx);
10305 while (true) {
10306 bool done;
10307 if (!iter.next(&temp, &done)) {
10308 return false;
10309 }
10310 if (done) {
10311 break;
10312 }
10313 OwningNonNull<mozilla::dom::TestInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
10314 if (!slotPtr) {
10315 JS_ReportOutOfMemory(cx);
10316 return false;
10317 }
10318 OwningNonNull<mozilla::dom::TestInterface>& slot = *slotPtr;
10319 if (temp.isObject()) {
10320 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
10321 {
10322 // Our JSContext should be in the right global to do unwrapping in.
10323 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
10324 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
10325 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestInterface");
10326 return false;
10327 }
10328 }
10329 } else {
10330 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
10331 return false;
10332 }
10333 }
10334 } else {
10335 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10336 return false;
10337 }
10338 }
10339 // NOTE: This assert does NOT call the function.
10340 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalObjectSequence(Constify(arg0)))>, "Should be returning void here");
10341 MOZ_KnownLive(self)(self)->PassOptionalObjectSequence(Constify(arg0));
10342 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10342); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10342; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10343 args.rval().setUndefined();
10344 return true;
10345}
10346
10347static const JSJitInfo passOptionalObjectSequence_methodinfo = {
10348 { (JSJitGetterOp)passOptionalObjectSequence },
10349 { prototypes::id::TestExampleInterface },
10350 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10351 JSJitInfo::Method,
10352 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10353 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10354 false, /* isInfallible. False in setters. */
10355 false, /* isMovable. Not relevant for setters. */
10356 false, /* isEliminatable. Not relevant for setters. */
10357 false, /* isAlwaysInSlot. Only relevant for getters. */
10358 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10359 false, /* isTypedMethod. Only relevant for methods. */
10360 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10361};
10362
10363MOZ_CAN_RUN_SCRIPT static bool
10364passExternalInterfaceSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10365{
10366 BindingCallContext cx(cx_, "TestExampleInterface.passExternalInterfaceSequence");
10367 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10370( cx, "TestExampleInterface"
, "passExternalInterfaceSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10368 "TestExampleInterface", "passExternalInterfaceSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10370( cx, "TestExampleInterface"
, "passExternalInterfaceSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10369 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10370( cx, "TestExampleInterface"
, "passExternalInterfaceSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10370 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10370( cx, "TestExampleInterface"
, "passExternalInterfaceSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10371
10372 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10373 if (!args.requireAtLeast(cx, "TestExampleInterface.passExternalInterfaceSequence", 1)) {
10374 return false;
10375 }
10376 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestExternalInterface>> arg0;
10377 if (args[0].isObject()) {
10378 JS::ForOfIterator iter(cx);
10379 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10380 return false;
10381 }
10382 if (!iter.valueIsIterable()) {
10383 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10384 return false;
10385 }
10386 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestExternalInterface>> &arr = arg0;
10387 JS::Rooted<JS::Value> temp(cx);
10388 while (true) {
10389 bool done;
10390 if (!iter.next(&temp, &done)) {
10391 return false;
10392 }
10393 if (done) {
10394 break;
10395 }
10396 RefPtr<mozilla::dom::TestExternalInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
10397 if (!slotPtr) {
10398 JS_ReportOutOfMemory(cx);
10399 return false;
10400 }
10401 RefPtr<mozilla::dom::TestExternalInterface>& slot = *slotPtr;
10402 if (temp.isObject()) {
10403 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
10404 RefPtr<mozilla::dom::TestExternalInterface> tempHolder;
10405 JS::Rooted<JSObject*> source(cx, &temp.toObject());
10406 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)))
) {
10407 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestExternalInterface");
10408 return false;
10409 }
10410 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", "../TestExampleGenBinding.cpp"
, 10410); AnnotateMozCrashReason("MOZ_ASSERT" "(" "tempHolder"
")"); do { *((volatile int*)__null) = 10410; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
10411 slot = tempHolder;
10412 } else {
10413 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
10414 return false;
10415 }
10416 }
10417 } else {
10418 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10419 return false;
10420 }
10421 // NOTE: This assert does NOT call the function.
10422 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassExternalInterfaceSequence(Constify(arg0)))>, "Should be returning void here");
10423 MOZ_KnownLive(self)(self)->PassExternalInterfaceSequence(Constify(arg0));
10424 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10424); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10424; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10425 args.rval().setUndefined();
10426 return true;
10427}
10428
10429static const JSJitInfo passExternalInterfaceSequence_methodinfo = {
10430 { (JSJitGetterOp)passExternalInterfaceSequence },
10431 { prototypes::id::TestExampleInterface },
10432 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10433 JSJitInfo::Method,
10434 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10435 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10436 false, /* isInfallible. False in setters. */
10437 false, /* isMovable. Not relevant for setters. */
10438 false, /* isEliminatable. Not relevant for setters. */
10439 false, /* isAlwaysInSlot. Only relevant for getters. */
10440 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10441 false, /* isTypedMethod. Only relevant for methods. */
10442 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10443};
10444
10445MOZ_CAN_RUN_SCRIPT static bool
10446passNullableExternalInterfaceSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10447{
10448 BindingCallContext cx(cx_, "TestExampleInterface.passNullableExternalInterfaceSequence");
10449 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10452( cx, "TestExampleInterface"
, "passNullableExternalInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10450 "TestExampleInterface", "passNullableExternalInterfaceSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10452( cx, "TestExampleInterface"
, "passNullableExternalInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10451 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10452( cx, "TestExampleInterface"
, "passNullableExternalInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10452 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10452( cx, "TestExampleInterface"
, "passNullableExternalInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10453
10454 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10455 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableExternalInterfaceSequence", 1)) {
10456 return false;
10457 }
10458 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestExternalInterface>> arg0;
10459 if (args[0].isObject()) {
10460 JS::ForOfIterator iter(cx);
10461 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10462 return false;
10463 }
10464 if (!iter.valueIsIterable()) {
10465 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10466 return false;
10467 }
10468 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestExternalInterface>> &arr = arg0;
10469 JS::Rooted<JS::Value> temp(cx);
10470 while (true) {
10471 bool done;
10472 if (!iter.next(&temp, &done)) {
10473 return false;
10474 }
10475 if (done) {
10476 break;
10477 }
10478 RefPtr<mozilla::dom::TestExternalInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
10479 if (!slotPtr) {
10480 JS_ReportOutOfMemory(cx);
10481 return false;
10482 }
10483 RefPtr<mozilla::dom::TestExternalInterface>& slot = *slotPtr;
10484 if (temp.isObject()) {
10485 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
10486 RefPtr<mozilla::dom::TestExternalInterface> tempHolder;
10487 JS::Rooted<JSObject*> source(cx, &temp.toObject());
10488 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)))
) {
10489 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestExternalInterface");
10490 return false;
10491 }
10492 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", "../TestExampleGenBinding.cpp"
, 10492); AnnotateMozCrashReason("MOZ_ASSERT" "(" "tempHolder"
")"); do { *((volatile int*)__null) = 10492; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
10493 slot = tempHolder;
10494 } else if (temp.isNullOrUndefined()) {
10495 slot = nullptr;
10496 } else {
10497 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
10498 return false;
10499 }
10500 }
10501 } else {
10502 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10503 return false;
10504 }
10505 // NOTE: This assert does NOT call the function.
10506 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableExternalInterfaceSequence(Constify(arg0)))>, "Should be returning void here");
10507 MOZ_KnownLive(self)(self)->PassNullableExternalInterfaceSequence(Constify(arg0));
10508 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10508); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10508; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10509 args.rval().setUndefined();
10510 return true;
10511}
10512
10513static const JSJitInfo passNullableExternalInterfaceSequence_methodinfo = {
10514 { (JSJitGetterOp)passNullableExternalInterfaceSequence },
10515 { prototypes::id::TestExampleInterface },
10516 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10517 JSJitInfo::Method,
10518 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10519 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10520 false, /* isInfallible. False in setters. */
10521 false, /* isMovable. Not relevant for setters. */
10522 false, /* isEliminatable. Not relevant for setters. */
10523 false, /* isAlwaysInSlot. Only relevant for getters. */
10524 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10525 false, /* isTypedMethod. Only relevant for methods. */
10526 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10527};
10528
10529MOZ_CAN_RUN_SCRIPT static bool
10530receiveStringSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10531{
10532 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10535( cx, "TestExampleInterface"
, "receiveStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10533 "TestExampleInterface", "receiveStringSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10535( cx, "TestExampleInterface"
, "receiveStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10534 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10535( cx, "TestExampleInterface"
, "receiveStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10535 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10535( cx, "TestExampleInterface"
, "receiveStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
10536
10537 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10538 nsTArray<nsString> result;
10539 // NOTE: This assert does NOT call the function.
10540 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveStringSequence(result))>, "Should be returning void here");
10541 MOZ_KnownLive(self)(self)->ReceiveStringSequence(result);
10542 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10542); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10542; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10543
10544 uint32_t length = result.Length();
10545 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
10546 if (!returnArray) {
10547 return false;
10548 }
10549 // Scope for 'tmp'
10550 {
10551 JS::Rooted<JS::Value> tmp(cx);
10552 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
10553 // Control block to let us common up the JS_DefineElement calls when there
10554 // are different ways to succeed at wrapping the object.
10555 do {
10556 if (!xpc::NonVoidStringToJsval(cx, result[sequenceIdx0], &tmp)) {
10557 return false;
10558 }
10559 break;
10560 } while (false);
10561 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
10562 JSPROP_ENUMERATE)) {
10563 return false;
10564 }
10565 }
10566 }
10567 args.rval().setObject(*returnArray);
10568 return true;
10569}
10570
10571static const JSJitInfo receiveStringSequence_methodinfo = {
10572 { (JSJitGetterOp)receiveStringSequence },
10573 { prototypes::id::TestExampleInterface },
10574 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10575 JSJitInfo::Method,
10576 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10577 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
10578 false, /* isInfallible. False in setters. */
10579 false, /* isMovable. Not relevant for setters. */
10580 false, /* isEliminatable. Not relevant for setters. */
10581 false, /* isAlwaysInSlot. Only relevant for getters. */
10582 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10583 false, /* isTypedMethod. Only relevant for methods. */
10584 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10585};
10586
10587MOZ_CAN_RUN_SCRIPT static bool
10588passStringSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10589{
10590 BindingCallContext cx(cx_, "TestExampleInterface.passStringSequence");
10591 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10594( cx, "TestExampleInterface"
, "passStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10592 "TestExampleInterface", "passStringSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10594( cx, "TestExampleInterface"
, "passStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10593 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10594( cx, "TestExampleInterface"
, "passStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10594 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10594( cx, "TestExampleInterface"
, "passStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
10595
10596 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10597 if (!args.requireAtLeast(cx, "TestExampleInterface.passStringSequence", 1)) {
10598 return false;
10599 }
10600 binding_detail::AutoSequence<nsString> arg0;
10601 if (args[0].isObject()) {
10602 JS::ForOfIterator iter(cx);
10603 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10604 return false;
10605 }
10606 if (!iter.valueIsIterable()) {
10607 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10608 return false;
10609 }
10610 binding_detail::AutoSequence<nsString> &arr = arg0;
10611 JS::Rooted<JS::Value> temp(cx);
10612 while (true) {
10613 bool done;
10614 if (!iter.next(&temp, &done)) {
10615 return false;
10616 }
10617 if (done) {
10618 break;
10619 }
10620 nsString* slotPtr = arr.AppendElement(mozilla::fallible);
10621 if (!slotPtr) {
10622 JS_ReportOutOfMemory(cx);
10623 return false;
10624 }
10625 nsString& slot = *slotPtr;
10626 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
10627 return false;
10628 }
10629 }
10630 } else {
10631 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10632 return false;
10633 }
10634 // NOTE: This assert does NOT call the function.
10635 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassStringSequence(Constify(arg0)))>, "Should be returning void here");
10636 MOZ_KnownLive(self)(self)->PassStringSequence(Constify(arg0));
10637 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10637); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10637; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10638 args.rval().setUndefined();
10639 return true;
10640}
10641
10642static const JSJitInfo passStringSequence_methodinfo = {
10643 { (JSJitGetterOp)passStringSequence },
10644 { prototypes::id::TestExampleInterface },
10645 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10646 JSJitInfo::Method,
10647 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10648 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10649 false, /* isInfallible. False in setters. */
10650 false, /* isMovable. Not relevant for setters. */
10651 false, /* isEliminatable. Not relevant for setters. */
10652 false, /* isAlwaysInSlot. Only relevant for getters. */
10653 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10654 false, /* isTypedMethod. Only relevant for methods. */
10655 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10656};
10657
10658MOZ_CAN_RUN_SCRIPT static bool
10659receiveByteStringSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10660{
10661 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10664( cx, "TestExampleInterface"
, "receiveByteStringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10662 "TestExampleInterface", "receiveByteStringSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10664( cx, "TestExampleInterface"
, "receiveByteStringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10663 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10664( cx, "TestExampleInterface"
, "receiveByteStringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10664 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10664( cx, "TestExampleInterface"
, "receiveByteStringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10665
10666 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10667 nsTArray<nsCString> result;
10668 // NOTE: This assert does NOT call the function.
10669 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveByteStringSequence(result))>, "Should be returning void here");
10670 MOZ_KnownLive(self)(self)->ReceiveByteStringSequence(result);
10671 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10671); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10671; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10672
10673 uint32_t length = result.Length();
10674 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
10675 if (!returnArray) {
10676 return false;
10677 }
10678 // Scope for 'tmp'
10679 {
10680 JS::Rooted<JS::Value> tmp(cx);
10681 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
10682 // Control block to let us common up the JS_DefineElement calls when there
10683 // are different ways to succeed at wrapping the object.
10684 do {
10685 if (!NonVoidByteStringToJsval(cx, result[sequenceIdx0], &tmp)) {
10686 return false;
10687 }
10688 break;
10689 } while (false);
10690 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
10691 JSPROP_ENUMERATE)) {
10692 return false;
10693 }
10694 }
10695 }
10696 args.rval().setObject(*returnArray);
10697 return true;
10698}
10699
10700static const JSJitInfo receiveByteStringSequence_methodinfo = {
10701 { (JSJitGetterOp)receiveByteStringSequence },
10702 { prototypes::id::TestExampleInterface },
10703 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10704 JSJitInfo::Method,
10705 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10706 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
10707 false, /* isInfallible. False in setters. */
10708 false, /* isMovable. Not relevant for setters. */
10709 false, /* isEliminatable. Not relevant for setters. */
10710 false, /* isAlwaysInSlot. Only relevant for getters. */
10711 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10712 false, /* isTypedMethod. Only relevant for methods. */
10713 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10714};
10715
10716MOZ_CAN_RUN_SCRIPT static bool
10717passByteStringSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10718{
10719 BindingCallContext cx(cx_, "TestExampleInterface.passByteStringSequence");
10720 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10723( cx, "TestExampleInterface"
, "passByteStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10721 "TestExampleInterface", "passByteStringSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10723( cx, "TestExampleInterface"
, "passByteStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10722 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10723( cx, "TestExampleInterface"
, "passByteStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10723 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10723( cx, "TestExampleInterface"
, "passByteStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
10724
10725 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10726 if (!args.requireAtLeast(cx, "TestExampleInterface.passByteStringSequence", 1)) {
10727 return false;
10728 }
10729 binding_detail::AutoSequence<nsCString> arg0;
10730 if (args[0].isObject()) {
10731 JS::ForOfIterator iter(cx);
10732 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10733 return false;
10734 }
10735 if (!iter.valueIsIterable()) {
10736 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10737 return false;
10738 }
10739 binding_detail::AutoSequence<nsCString> &arr = arg0;
10740 JS::Rooted<JS::Value> temp(cx);
10741 while (true) {
10742 bool done;
10743 if (!iter.next(&temp, &done)) {
10744 return false;
10745 }
10746 if (done) {
10747 break;
10748 }
10749 nsCString* slotPtr = arr.AppendElement(mozilla::fallible);
10750 if (!slotPtr) {
10751 JS_ReportOutOfMemory(cx);
10752 return false;
10753 }
10754 nsCString& slot = *slotPtr;
10755 if (!ConvertJSValueToByteString(cx, temp, false, "element of argument 1", slot)) {
10756 return false;
10757 }
10758 }
10759 } else {
10760 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10761 return false;
10762 }
10763 // NOTE: This assert does NOT call the function.
10764 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassByteStringSequence(Constify(arg0)))>, "Should be returning void here");
10765 MOZ_KnownLive(self)(self)->PassByteStringSequence(Constify(arg0));
10766 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10766); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10766; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10767 args.rval().setUndefined();
10768 return true;
10769}
10770
10771static const JSJitInfo passByteStringSequence_methodinfo = {
10772 { (JSJitGetterOp)passByteStringSequence },
10773 { prototypes::id::TestExampleInterface },
10774 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10775 JSJitInfo::Method,
10776 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10777 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10778 false, /* isInfallible. False in setters. */
10779 false, /* isMovable. Not relevant for setters. */
10780 false, /* isEliminatable. Not relevant for setters. */
10781 false, /* isAlwaysInSlot. Only relevant for getters. */
10782 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10783 false, /* isTypedMethod. Only relevant for methods. */
10784 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10785};
10786
10787MOZ_CAN_RUN_SCRIPT static bool
10788receiveUTF8StringSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10789{
10790 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10793( cx, "TestExampleInterface"
, "receiveUTF8StringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10791 "TestExampleInterface", "receiveUTF8StringSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10793( cx, "TestExampleInterface"
, "receiveUTF8StringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10792 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10793( cx, "TestExampleInterface"
, "receiveUTF8StringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10793 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10793( cx, "TestExampleInterface"
, "receiveUTF8StringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10794
10795 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10796 nsTArray<nsCString> result;
10797 // NOTE: This assert does NOT call the function.
10798 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUTF8StringSequence(result))>, "Should be returning void here");
10799 MOZ_KnownLive(self)(self)->ReceiveUTF8StringSequence(result);
10800 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10800); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10800; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10801
10802 uint32_t length = result.Length();
10803 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
10804 if (!returnArray) {
10805 return false;
10806 }
10807 // Scope for 'tmp'
10808 {
10809 JS::Rooted<JS::Value> tmp(cx);
10810 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
10811 // Control block to let us common up the JS_DefineElement calls when there
10812 // are different ways to succeed at wrapping the object.
10813 do {
10814 if (!NonVoidUTF8StringToJsval(cx, result[sequenceIdx0], &tmp)) {
10815 return false;
10816 }
10817 break;
10818 } while (false);
10819 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
10820 JSPROP_ENUMERATE)) {
10821 return false;
10822 }
10823 }
10824 }
10825 args.rval().setObject(*returnArray);
10826 return true;
10827}
10828
10829static const JSJitInfo receiveUTF8StringSequence_methodinfo = {
10830 { (JSJitGetterOp)receiveUTF8StringSequence },
10831 { prototypes::id::TestExampleInterface },
10832 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10833 JSJitInfo::Method,
10834 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10835 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
10836 false, /* isInfallible. False in setters. */
10837 false, /* isMovable. Not relevant for setters. */
10838 false, /* isEliminatable. Not relevant for setters. */
10839 false, /* isAlwaysInSlot. Only relevant for getters. */
10840 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10841 false, /* isTypedMethod. Only relevant for methods. */
10842 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10843};
10844
10845MOZ_CAN_RUN_SCRIPT static bool
10846passUTF8StringSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10847{
10848 BindingCallContext cx(cx_, "TestExampleInterface.passUTF8StringSequence");
10849 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10852( cx, "TestExampleInterface"
, "passUTF8StringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10850 "TestExampleInterface", "passUTF8StringSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10852( cx, "TestExampleInterface"
, "passUTF8StringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10851 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10852( cx, "TestExampleInterface"
, "passUTF8StringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10852 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10852( cx, "TestExampleInterface"
, "passUTF8StringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
10853
10854 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10855 if (!args.requireAtLeast(cx, "TestExampleInterface.passUTF8StringSequence", 1)) {
10856 return false;
10857 }
10858 binding_detail::AutoSequence<nsCString> arg0;
10859 if (args[0].isObject()) {
10860 JS::ForOfIterator iter(cx);
10861 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10862 return false;
10863 }
10864 if (!iter.valueIsIterable()) {
10865 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10866 return false;
10867 }
10868 binding_detail::AutoSequence<nsCString> &arr = arg0;
10869 JS::Rooted<JS::Value> temp(cx);
10870 while (true) {
10871 bool done;
10872 if (!iter.next(&temp, &done)) {
10873 return false;
10874 }
10875 if (done) {
10876 break;
10877 }
10878 nsCString* slotPtr = arr.AppendElement(mozilla::fallible);
10879 if (!slotPtr) {
10880 JS_ReportOutOfMemory(cx);
10881 return false;
10882 }
10883 nsCString& slot = *slotPtr;
10884 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
10885 return false;
10886 }
10887 }
10888 } else {
10889 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10890 return false;
10891 }
10892 // NOTE: This assert does NOT call the function.
10893 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUTF8StringSequence(Constify(arg0)))>, "Should be returning void here");
10894 MOZ_KnownLive(self)(self)->PassUTF8StringSequence(Constify(arg0));
10895 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10895); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10895; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10896 args.rval().setUndefined();
10897 return true;
10898}
10899
10900static const JSJitInfo passUTF8StringSequence_methodinfo = {
10901 { (JSJitGetterOp)passUTF8StringSequence },
10902 { prototypes::id::TestExampleInterface },
10903 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10904 JSJitInfo::Method,
10905 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10906 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10907 false, /* isInfallible. False in setters. */
10908 false, /* isMovable. Not relevant for setters. */
10909 false, /* isEliminatable. Not relevant for setters. */
10910 false, /* isAlwaysInSlot. Only relevant for getters. */
10911 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10912 false, /* isTypedMethod. Only relevant for methods. */
10913 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10914};
10915
10916MOZ_CAN_RUN_SCRIPT static bool
10917receiveAnySequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10918{
10919 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10922( cx, "TestExampleInterface"
, "receiveAnySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10920 "TestExampleInterface", "receiveAnySequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10922( cx, "TestExampleInterface"
, "receiveAnySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10921 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10922( cx, "TestExampleInterface"
, "receiveAnySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10922 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10922( cx, "TestExampleInterface"
, "receiveAnySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
10923
10924 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10925 nsTArray<JS::Value> result;
10926 SequenceRooter<JS::Value > resultRooter(cx, &result);
10927 // NOTE: This assert does NOT call the function.
10928 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveAnySequence(cx, result))>, "Should be returning void here");
10929 MOZ_KnownLive(self)(self)->ReceiveAnySequence(cx, result);
10930 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10930); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10930; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10931
10932 uint32_t length = result.Length();
10933 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
10934 if (!returnArray) {
10935 return false;
10936 }
10937 // Scope for 'tmp'
10938 {
10939 JS::Rooted<JS::Value> tmp(cx);
10940 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
10941 // Control block to let us common up the JS_DefineElement calls when there
10942 // are different ways to succeed at wrapping the object.
10943 do {
10944 JS::ExposeValueToActiveJS(result[sequenceIdx0]);
10945 tmp.set(result[sequenceIdx0]);
10946 if (!MaybeWrapValue(cx, &tmp)) {
10947 return false;
10948 }
10949 break;
10950 } while (false);
10951 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
10952 JSPROP_ENUMERATE)) {
10953 return false;
10954 }
10955 }
10956 }
10957 args.rval().setObject(*returnArray);
10958 return true;
10959}
10960
10961static const JSJitInfo receiveAnySequence_methodinfo = {
10962 { (JSJitGetterOp)receiveAnySequence },
10963 { prototypes::id::TestExampleInterface },
10964 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
10965 JSJitInfo::Method,
10966 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10967 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
10968 false, /* isInfallible. False in setters. */
10969 false, /* isMovable. Not relevant for setters. */
10970 false, /* isEliminatable. Not relevant for setters. */
10971 false, /* isAlwaysInSlot. Only relevant for getters. */
10972 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10973 false, /* isTypedMethod. Only relevant for methods. */
10974 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10975};
10976
10977MOZ_CAN_RUN_SCRIPT static bool
10978receiveNullableAnySequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10979{
10980 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10983( cx, "TestExampleInterface"
, "receiveNullableAnySequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10981 "TestExampleInterface", "receiveNullableAnySequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10983( cx, "TestExampleInterface"
, "receiveNullableAnySequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10982 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10983( cx, "TestExampleInterface"
, "receiveNullableAnySequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10983 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10983( cx, "TestExampleInterface"
, "receiveNullableAnySequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10984
10985 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
10986 Nullable<nsTArray<JS::Value>> result;
10987 SequenceRooter<JS::Value > resultRooter(cx, &result);
10988 // NOTE: This assert does NOT call the function.
10989 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableAnySequence(cx, result))>, "Should be returning void here");
10990 MOZ_KnownLive(self)(self)->ReceiveNullableAnySequence(cx, result);
10991 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 10991); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10991; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10992
10993 if (result.IsNull()) {
10994 args.rval().setNull();
10995 return true;
10996 }
10997
10998 uint32_t length = result.Value().Length();
10999 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11000 if (!returnArray) {
11001 return false;
11002 }
11003 // Scope for 'tmp'
11004 {
11005 JS::Rooted<JS::Value> tmp(cx);
11006 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11007 // Control block to let us common up the JS_DefineElement calls when there
11008 // are different ways to succeed at wrapping the object.
11009 do {
11010 JS::ExposeValueToActiveJS(result.Value()[sequenceIdx0]);
11011 tmp.set(result.Value()[sequenceIdx0]);
11012 if (!MaybeWrapValue(cx, &tmp)) {
11013 return false;
11014 }
11015 break;
11016 } while (false);
11017 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11018 JSPROP_ENUMERATE)) {
11019 return false;
11020 }
11021 }
11022 }
11023 args.rval().setObject(*returnArray);
11024 return true;
11025}
11026
11027static const JSJitInfo receiveNullableAnySequence_methodinfo = {
11028 { (JSJitGetterOp)receiveNullableAnySequence },
11029 { prototypes::id::TestExampleInterface },
11030 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11031 JSJitInfo::Method,
11032 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11033 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
11034 false, /* isInfallible. False in setters. */
11035 false, /* isMovable. Not relevant for setters. */
11036 false, /* isEliminatable. Not relevant for setters. */
11037 false, /* isAlwaysInSlot. Only relevant for getters. */
11038 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11039 false, /* isTypedMethod. Only relevant for methods. */
11040 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11041};
11042
11043MOZ_CAN_RUN_SCRIPT static bool
11044receiveObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11045{
11046 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11049( cx, "TestExampleInterface"
, "receiveObjectSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11047 "TestExampleInterface", "receiveObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11049( cx, "TestExampleInterface"
, "receiveObjectSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11048 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11049( cx, "TestExampleInterface"
, "receiveObjectSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11049 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11049( cx, "TestExampleInterface"
, "receiveObjectSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
11050
11051 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11052 nsTArray<JSObject*> result;
11053 SequenceRooter<JSObject* > resultRooter(cx, &result);
11054 // NOTE: This assert does NOT call the function.
11055 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveObjectSequence(cx, result))>, "Should be returning void here");
11056 MOZ_KnownLive(self)(self)->ReceiveObjectSequence(cx, result);
11057 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 11057); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11057; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11058
11059 uint32_t length = result.Length();
11060 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11061 if (!returnArray) {
11062 return false;
11063 }
11064 // Scope for 'tmp'
11065 {
11066 JS::Rooted<JS::Value> tmp(cx);
11067 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11068 // Control block to let us common up the JS_DefineElement calls when there
11069 // are different ways to succeed at wrapping the object.
11070 do {
11071 JS::ExposeObjectToActiveJS(result[sequenceIdx0]);
11072 tmp.setObject(*result[sequenceIdx0]);
11073 if (!MaybeWrapObjectValue(cx, &tmp)) {
11074 return false;
11075 }
11076 break;
11077 } while (false);
11078 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11079 JSPROP_ENUMERATE)) {
11080 return false;
11081 }
11082 }
11083 }
11084 args.rval().setObject(*returnArray);
11085 return true;
11086}
11087
11088static const JSJitInfo receiveObjectSequence_methodinfo = {
11089 { (JSJitGetterOp)receiveObjectSequence },
11090 { prototypes::id::TestExampleInterface },
11091 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11092 JSJitInfo::Method,
11093 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11094 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
11095 false, /* isInfallible. False in setters. */
11096 false, /* isMovable. Not relevant for setters. */
11097 false, /* isEliminatable. Not relevant for setters. */
11098 false, /* isAlwaysInSlot. Only relevant for getters. */
11099 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11100 false, /* isTypedMethod. Only relevant for methods. */
11101 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11102};
11103
11104MOZ_CAN_RUN_SCRIPT static bool
11105receiveNullableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11106{
11107 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11110( cx, "TestExampleInterface"
, "receiveNullableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11108 "TestExampleInterface", "receiveNullableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11110( cx, "TestExampleInterface"
, "receiveNullableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11109 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11110( cx, "TestExampleInterface"
, "receiveNullableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11110 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11110( cx, "TestExampleInterface"
, "receiveNullableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11111
11112 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11113 nsTArray<JSObject*> result;
11114 SequenceRooter<JSObject* > resultRooter(cx, &result);
11115 // NOTE: This assert does NOT call the function.
11116 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableObjectSequence(cx, result))>, "Should be returning void here");
11117 MOZ_KnownLive(self)(self)->ReceiveNullableObjectSequence(cx, result);
11118 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 11118); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11118; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11119
11120 uint32_t length = result.Length();
11121 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11122 if (!returnArray) {
11123 return false;
11124 }
11125 // Scope for 'tmp'
11126 {
11127 JS::Rooted<JS::Value> tmp(cx);
11128 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11129 // Control block to let us common up the JS_DefineElement calls when there
11130 // are different ways to succeed at wrapping the object.
11131 do {
11132 if (result[sequenceIdx0]) {
11133 JS::ExposeObjectToActiveJS(result[sequenceIdx0]);
11134 }
11135 tmp.setObjectOrNull(result[sequenceIdx0]);
11136 if (!MaybeWrapObjectOrNullValue(cx, &tmp)) {
11137 return false;
11138 }
11139 break;
11140 } while (false);
11141 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11142 JSPROP_ENUMERATE)) {
11143 return false;
11144 }
11145 }
11146 }
11147 args.rval().setObject(*returnArray);
11148 return true;
11149}
11150
11151static const JSJitInfo receiveNullableObjectSequence_methodinfo = {
11152 { (JSJitGetterOp)receiveNullableObjectSequence },
11153 { prototypes::id::TestExampleInterface },
11154 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11155 JSJitInfo::Method,
11156 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11157 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
11158 false, /* isInfallible. False in setters. */
11159 false, /* isMovable. Not relevant for setters. */
11160 false, /* isEliminatable. Not relevant for setters. */
11161 false, /* isAlwaysInSlot. Only relevant for getters. */
11162 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11163 false, /* isTypedMethod. Only relevant for methods. */
11164 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11165};
11166
11167MOZ_CAN_RUN_SCRIPT static bool
11168passSequenceOfSequences(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11169{
11170 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfSequences");
11171 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11174( cx, "TestExampleInterface"
, "passSequenceOfSequences", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11172 "TestExampleInterface", "passSequenceOfSequences", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11174( cx, "TestExampleInterface"
, "passSequenceOfSequences", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11173 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11174( cx, "TestExampleInterface"
, "passSequenceOfSequences", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11174 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11174( cx, "TestExampleInterface"
, "passSequenceOfSequences", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
11175
11176 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11177 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfSequences", 1)) {
11178 return false;
11179 }
11180 binding_detail::AutoSequence<Sequence<int32_t>> arg0;
11181 if (args[0].isObject()) {
11182 JS::ForOfIterator iter(cx);
11183 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
11184 return false;
11185 }
11186 if (!iter.valueIsIterable()) {
11187 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11188 return false;
11189 }
11190 binding_detail::AutoSequence<Sequence<int32_t>> &arr = arg0;
11191 JS::Rooted<JS::Value> temp(cx);
11192 while (true) {
11193 bool done;
11194 if (!iter.next(&temp, &done)) {
11195 return false;
11196 }
11197 if (done) {
11198 break;
11199 }
11200 Sequence<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
11201 if (!slotPtr) {
11202 JS_ReportOutOfMemory(cx);
11203 return false;
11204 }
11205 Sequence<int32_t>& slot = *slotPtr;
11206 if (temp.isObject()) {
11207 JS::ForOfIterator iter1(cx);
11208 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
11209 return false;
11210 }
11211 if (!iter1.valueIsIterable()) {
11212 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
11213 return false;
11214 }
11215 Sequence<int32_t> &arr1 = slot;
11216 JS::Rooted<JS::Value> temp1(cx);
11217 while (true) {
11218 bool done1;
11219 if (!iter1.next(&temp1, &done1)) {
11220 return false;
11221 }
11222 if (done1) {
11223 break;
11224 }
11225 int32_t* slotPtr1 = arr1.AppendElement(mozilla::fallible);
11226 if (!slotPtr1) {
11227 JS_ReportOutOfMemory(cx);
11228 return false;
11229 }
11230 int32_t& slot1 = *slotPtr1;
11231 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp1, "Element of element of argument 1", &slot1)) {
11232 return false;
11233 }
11234 }
11235 } else {
11236 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
11237 return false;
11238 }
11239 }
11240 } else {
11241 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11242 return false;
11243 }
11244 // NOTE: This assert does NOT call the function.
11245 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfSequences(Constify(arg0)))>, "Should be returning void here");
11246 MOZ_KnownLive(self)(self)->PassSequenceOfSequences(Constify(arg0));
11247 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 11247); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11247; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11248 args.rval().setUndefined();
11249 return true;
11250}
11251
11252static const JSJitInfo passSequenceOfSequences_methodinfo = {
11253 { (JSJitGetterOp)passSequenceOfSequences },
11254 { prototypes::id::TestExampleInterface },
11255 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11256 JSJitInfo::Method,
11257 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11258 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11259 false, /* isInfallible. False in setters. */
11260 false, /* isMovable. Not relevant for setters. */
11261 false, /* isEliminatable. Not relevant for setters. */
11262 false, /* isAlwaysInSlot. Only relevant for getters. */
11263 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11264 false, /* isTypedMethod. Only relevant for methods. */
11265 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11266};
11267
11268MOZ_CAN_RUN_SCRIPT static bool
11269passSequenceOfSequencesOfSequences(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11270{
11271 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfSequencesOfSequences");
11272 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11275( cx, "TestExampleInterface"
, "passSequenceOfSequencesOfSequences", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11273 "TestExampleInterface", "passSequenceOfSequencesOfSequences", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11275( cx, "TestExampleInterface"
, "passSequenceOfSequencesOfSequences", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11274 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11275( cx, "TestExampleInterface"
, "passSequenceOfSequencesOfSequences", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11275 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11275( cx, "TestExampleInterface"
, "passSequenceOfSequencesOfSequences", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11276
11277 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11278 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfSequencesOfSequences", 1)) {
11279 return false;
11280 }
11281 binding_detail::AutoSequence<Sequence<Sequence<int32_t>>> arg0;
11282 if (args[0].isObject()) {
11283 JS::ForOfIterator iter(cx);
11284 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
11285 return false;
11286 }
11287 if (!iter.valueIsIterable()) {
11288 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11289 return false;
11290 }
11291 binding_detail::AutoSequence<Sequence<Sequence<int32_t>>> &arr = arg0;
11292 JS::Rooted<JS::Value> temp(cx);
11293 while (true) {
11294 bool done;
11295 if (!iter.next(&temp, &done)) {
11296 return false;
11297 }
11298 if (done) {
11299 break;
11300 }
11301 Sequence<Sequence<int32_t>>* slotPtr = arr.AppendElement(mozilla::fallible);
11302 if (!slotPtr) {
11303 JS_ReportOutOfMemory(cx);
11304 return false;
11305 }
11306 Sequence<Sequence<int32_t>>& slot = *slotPtr;
11307 if (temp.isObject()) {
11308 JS::ForOfIterator iter1(cx);
11309 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
11310 return false;
11311 }
11312 if (!iter1.valueIsIterable()) {
11313 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
11314 return false;
11315 }
11316 Sequence<Sequence<int32_t>> &arr1 = slot;
11317 JS::Rooted<JS::Value> temp1(cx);
11318 while (true) {
11319 bool done1;
11320 if (!iter1.next(&temp1, &done1)) {
11321 return false;
11322 }
11323 if (done1) {
11324 break;
11325 }
11326 Sequence<int32_t>* slotPtr1 = arr1.AppendElement(mozilla::fallible);
11327 if (!slotPtr1) {
11328 JS_ReportOutOfMemory(cx);
11329 return false;
11330 }
11331 Sequence<int32_t>& slot1 = *slotPtr1;
11332 if (temp1.isObject()) {
11333 JS::ForOfIterator iter2(cx);
11334 if (!iter2.init(temp1, JS::ForOfIterator::AllowNonIterable)) {
11335 return false;
11336 }
11337 if (!iter2.valueIsIterable()) {
11338 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of element of argument 1", "sequence");
11339 return false;
11340 }
11341 Sequence<int32_t> &arr2 = slot1;
11342 JS::Rooted<JS::Value> temp2(cx);
11343 while (true) {
11344 bool done2;
11345 if (!iter2.next(&temp2, &done2)) {
11346 return false;
11347 }
11348 if (done2) {
11349 break;
11350 }
11351 int32_t* slotPtr2 = arr2.AppendElement(mozilla::fallible);
11352 if (!slotPtr2) {
11353 JS_ReportOutOfMemory(cx);
11354 return false;
11355 }
11356 int32_t& slot2 = *slotPtr2;
11357 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp2, "Element of element of element of argument 1", &slot2)) {
11358 return false;
11359 }
11360 }
11361 } else {
11362 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of element of argument 1", "sequence");
11363 return false;
11364 }
11365 }
11366 } else {
11367 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
11368 return false;
11369 }
11370 }
11371 } else {
11372 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11373 return false;
11374 }
11375 // NOTE: This assert does NOT call the function.
11376 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfSequencesOfSequences(Constify(arg0)))>, "Should be returning void here");
11377 MOZ_KnownLive(self)(self)->PassSequenceOfSequencesOfSequences(Constify(arg0));
11378 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 11378); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11378; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11379 args.rval().setUndefined();
11380 return true;
11381}
11382
11383static const JSJitInfo passSequenceOfSequencesOfSequences_methodinfo = {
11384 { (JSJitGetterOp)passSequenceOfSequencesOfSequences },
11385 { prototypes::id::TestExampleInterface },
11386 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11387 JSJitInfo::Method,
11388 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11389 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11390 false, /* isInfallible. False in setters. */
11391 false, /* isMovable. Not relevant for setters. */
11392 false, /* isEliminatable. Not relevant for setters. */
11393 false, /* isAlwaysInSlot. Only relevant for getters. */
11394 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11395 false, /* isTypedMethod. Only relevant for methods. */
11396 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11397};
11398
11399MOZ_CAN_RUN_SCRIPT static bool
11400passRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11401{
11402 BindingCallContext cx(cx_, "TestExampleInterface.passRecord");
11403 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11406( cx, "TestExampleInterface"
, "passRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11404 "TestExampleInterface", "passRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11406( cx, "TestExampleInterface"
, "passRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11405 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11406( cx, "TestExampleInterface"
, "passRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11406 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11406( cx, "TestExampleInterface"
, "passRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
11407
11408 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11409 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecord", 1)) {
11410 return false;
11411 }
11412 Record<nsString, int32_t> arg0;
11413 if (args[0].isObject()) {
11414 auto& recordEntries = arg0.Entries();
11415
11416 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
11417 JS::RootedVector<jsid> ids(cx);
11418 if (!js::GetPropertyKeys(cx, recordObj,
11419 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
11420 return false;
11421 }
11422 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
11423 JS_ReportOutOfMemory(cx);
11424 return false;
11425 }
11426 JS::Rooted<JS::Value> propNameValue(cx);
11427 JS::Rooted<JS::Value> temp(cx);
11428 JS::Rooted<jsid> curId(cx);
11429 JS::Rooted<JS::Value> idVal(cx);
11430 // Use a hashset to keep track of ids seen, to avoid
11431 // introducing nasty O(N^2) behavior scanning for them all the
11432 // time. Ideally we'd use a data structure with O(1) lookup
11433 // _and_ ordering for the MozMap, but we don't have one lying
11434 // around.
11435 nsTHashtable<nsStringHashKey> idsSeen;
11436 for (size_t i = 0; i < ids.length(); ++i) {
11437 curId = ids[i];
11438
11439 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
11440 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
11441 &desc)) {
11442 return false;
11443 }
11444
11445 if (desc.isNothing() || !desc->enumerable()) {
11446 continue;
11447 }
11448
11449 idVal = js::IdToValue(curId);
11450 nsString propName;
11451 // This will just throw if idVal is a Symbol, like the spec says
11452 // to do.
11453 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
11454 return false;
11455 }
11456
11457 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
11458 return false;
11459 }
11460
11461 Record<nsString, int32_t>::EntryType* entry;
11462 if (!idsSeen.EnsureInserted(propName)) {
11463 // Find the existing entry.
11464 auto idx = recordEntries.IndexOf(propName);
11465 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?" ")"
, "../TestExampleGenBinding.cpp", 11466); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11466; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
11466 "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?" ")"
, "../TestExampleGenBinding.cpp", 11466); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11466; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
11467 // Now blow it away to make it look like it was just added
11468 // to the array, because it's not obvious that it's
11469 // safe to write to its already-initialized mValue via our
11470 // normal codegen conversions. For example, the value
11471 // could be a union and this would change its type, but
11472 // codegen assumes we won't do that.
11473 entry = recordEntries.ReconstructElementAt(idx);
11474 } else {
11475 // Safe to do an infallible append here, because we did a
11476 // SetCapacity above to the right capacity.
11477 entry = recordEntries.AppendElement();
11478 }
11479 entry->mKey = propName;
11480 int32_t& slot = entry->mValue;
11481 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
11482 return false;
11483 }
11484 }
11485 } else {
11486 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
11487 return false;
11488 }
11489 // NOTE: This assert does NOT call the function.
11490 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecord(Constify(arg0)))>, "Should be returning void here");
11491 MOZ_KnownLive(self)(self)->PassRecord(Constify(arg0));
11492 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 11492); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11492; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11493 args.rval().setUndefined();
11494 return true;
11495}
11496
11497static const JSJitInfo passRecord_methodinfo = {
11498 { (JSJitGetterOp)passRecord },
11499 { prototypes::id::TestExampleInterface },
11500 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11501 JSJitInfo::Method,
11502 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11503 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11504 false, /* isInfallible. False in setters. */
11505 false, /* isMovable. Not relevant for setters. */
11506 false, /* isEliminatable. Not relevant for setters. */
11507 false, /* isAlwaysInSlot. Only relevant for getters. */
11508 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11509 false, /* isTypedMethod. Only relevant for methods. */
11510 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11511};
11512
11513MOZ_CAN_RUN_SCRIPT static bool
11514passNullableRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11515{
11516 BindingCallContext cx(cx_, "TestExampleInterface.passNullableRecord");
11517 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11520( cx, "TestExampleInterface"
, "passNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11518 "TestExampleInterface", "passNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11520( cx, "TestExampleInterface"
, "passNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11519 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11520( cx, "TestExampleInterface"
, "passNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11520 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11520( cx, "TestExampleInterface"
, "passNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
11521
11522 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11523 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableRecord", 1)) {
11524 return false;
11525 }
11526 Nullable<Record<nsString, int32_t>> arg0;
11527 if (args[0].isObject()) {
11528 auto& recordEntries = arg0.SetValue().Entries();
11529
11530 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
11531 JS::RootedVector<jsid> ids(cx);
11532 if (!js::GetPropertyKeys(cx, recordObj,
11533 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
11534 return false;
11535 }
11536 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
11537 JS_ReportOutOfMemory(cx);
11538 return false;
11539 }
11540 JS::Rooted<JS::Value> propNameValue(cx);
11541 JS::Rooted<JS::Value> temp(cx);
11542 JS::Rooted<jsid> curId(cx);
11543 JS::Rooted<JS::Value> idVal(cx);
11544 // Use a hashset to keep track of ids seen, to avoid
11545 // introducing nasty O(N^2) behavior scanning for them all the
11546 // time. Ideally we'd use a data structure with O(1) lookup
11547 // _and_ ordering for the MozMap, but we don't have one lying
11548 // around.
11549 nsTHashtable<nsStringHashKey> idsSeen;
11550 for (size_t i = 0; i < ids.length(); ++i) {
11551 curId = ids[i];
11552
11553 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
11554 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
11555 &desc)) {
11556 return false;
11557 }
11558
11559 if (desc.isNothing() || !desc->enumerable()) {
11560 continue;
11561 }
11562
11563 idVal = js::IdToValue(curId);
11564 nsString propName;
11565 // This will just throw if idVal is a Symbol, like the spec says
11566 // to do.
11567 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
11568 return false;
11569 }
11570
11571 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
11572 return false;
11573 }
11574
11575 Record<nsString, int32_t>::EntryType* entry;
11576 if (!idsSeen.EnsureInserted(propName)) {
11577 // Find the existing entry.
11578 auto idx = recordEntries.IndexOf(propName);
11579 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?" ")"
, "../TestExampleGenBinding.cpp", 11580); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11580; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
11580 "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?" ")"
, "../TestExampleGenBinding.cpp", 11580); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11580; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
11581 // Now blow it away to make it look like it was just added
11582 // to the array, because it's not obvious that it's
11583 // safe to write to its already-initialized mValue via our
11584 // normal codegen conversions. For example, the value
11585 // could be a union and this would change its type, but
11586 // codegen assumes we won't do that.
11587 entry = recordEntries.ReconstructElementAt(idx);
11588 } else {
11589 // Safe to do an infallible append here, because we did a
11590 // SetCapacity above to the right capacity.
11591 entry = recordEntries.AppendElement();
11592 }
11593 entry->mKey = propName;
11594 int32_t& slot = entry->mValue;
11595 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
11596 return false;
11597 }
11598 }
11599 } else if (args[0].isNullOrUndefined()) {
11600 arg0.SetNull();
11601 } else {
11602 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
11603 return false;
11604 }
11605 // NOTE: This assert does NOT call the function.
11606 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableRecord(Constify(arg0)))>, "Should be returning void here");
11607 MOZ_KnownLive(self)(self)->PassNullableRecord(Constify(arg0));
11608 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 11608); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11608; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11609 args.rval().setUndefined();
11610 return true;
11611}
11612
11613static const JSJitInfo passNullableRecord_methodinfo = {
11614 { (JSJitGetterOp)passNullableRecord },
11615 { prototypes::id::TestExampleInterface },
11616 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11617 JSJitInfo::Method,
11618 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11619 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11620 false, /* isInfallible. False in setters. */
11621 false, /* isMovable. Not relevant for setters. */
11622 false, /* isEliminatable. Not relevant for setters. */
11623 false, /* isAlwaysInSlot. Only relevant for getters. */
11624 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11625 false, /* isTypedMethod. Only relevant for methods. */
11626 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11627};
11628
11629MOZ_CAN_RUN_SCRIPT static bool
11630passRecordOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11631{
11632 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfNullableInts");
11633 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11636( cx, "TestExampleInterface"
, "passRecordOfNullableInts", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11634 "TestExampleInterface", "passRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11636( cx, "TestExampleInterface"
, "passRecordOfNullableInts", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11635 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11636( cx, "TestExampleInterface"
, "passRecordOfNullableInts", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11636 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11636( cx, "TestExampleInterface"
, "passRecordOfNullableInts", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11637
11638 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11639 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfNullableInts", 1)) {
11640 return false;
11641 }
11642 Record<nsString, Nullable<int32_t>> arg0;
11643 if (args[0].isObject()) {
11644 auto& recordEntries = arg0.Entries();
11645
11646 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
11647 JS::RootedVector<jsid> ids(cx);
11648 if (!js::GetPropertyKeys(cx, recordObj,
11649 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
11650 return false;
11651 }
11652 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
11653 JS_ReportOutOfMemory(cx);
11654 return false;
11655 }
11656 JS::Rooted<JS::Value> propNameValue(cx);
11657 JS::Rooted<JS::Value> temp(cx);
11658 JS::Rooted<jsid> curId(cx);
11659 JS::Rooted<JS::Value> idVal(cx);
11660 // Use a hashset to keep track of ids seen, to avoid
11661 // introducing nasty O(N^2) behavior scanning for them all the
11662 // time. Ideally we'd use a data structure with O(1) lookup
11663 // _and_ ordering for the MozMap, but we don't have one lying
11664 // around.
11665 nsTHashtable<nsStringHashKey> idsSeen;
11666 for (size_t i = 0; i < ids.length(); ++i) {
11667 curId = ids[i];
11668
11669 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
11670 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
11671 &desc)) {
11672 return false;
11673 }
11674
11675 if (desc.isNothing() || !desc->enumerable()) {
11676 continue;
11677 }
11678
11679 idVal = js::IdToValue(curId);
11680 nsString propName;
11681 // This will just throw if idVal is a Symbol, like the spec says
11682 // to do.
11683 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
11684 return false;
11685 }
11686
11687 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
11688 return false;
11689 }
11690
11691 Record<nsString, Nullable<int32_t>>::EntryType* entry;
11692 if (!idsSeen.EnsureInserted(propName)) {
11693 // Find the existing entry.
11694 auto idx = recordEntries.IndexOf(propName);
11695 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?" ")"
, "../TestExampleGenBinding.cpp", 11696); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11696; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
11696 "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?" ")"
, "../TestExampleGenBinding.cpp", 11696); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11696; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
11697 // Now blow it away to make it look like it was just added
11698 // to the array, because it's not obvious that it's
11699 // safe to write to its already-initialized mValue via our
11700 // normal codegen conversions. For example, the value
11701 // could be a union and this would change its type, but
11702 // codegen assumes we won't do that.
11703 entry = recordEntries.ReconstructElementAt(idx);
11704 } else {
11705 // Safe to do an infallible append here, because we did a
11706 // SetCapacity above to the right capacity.
11707 entry = recordEntries.AppendElement();
11708 }
11709 entry->mKey = propName;
11710 Nullable<int32_t>& slot = entry->mValue;
11711 if (temp.isNullOrUndefined()) {
11712 slot.SetNull();
11713 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot.SetValue())) {
11714 return false;
11715 }
11716 }
11717 } else {
11718 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
11719 return false;
11720 }
11721 // NOTE: This assert does NOT call the function.
11722 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfNullableInts(Constify(arg0)))>, "Should be returning void here");
11723 MOZ_KnownLive(self)(self)->PassRecordOfNullableInts(Constify(arg0));
11724 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 11724); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11724; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11725 args.rval().setUndefined();
11726 return true;
11727}
11728
11729static const JSJitInfo passRecordOfNullableInts_methodinfo = {
11730 { (JSJitGetterOp)passRecordOfNullableInts },
11731 { prototypes::id::TestExampleInterface },
11732 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11733 JSJitInfo::Method,
11734 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11735 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11736 false, /* isInfallible. False in setters. */
11737 false, /* isMovable. Not relevant for setters. */
11738 false, /* isEliminatable. Not relevant for setters. */
11739 false, /* isAlwaysInSlot. Only relevant for getters. */
11740 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11741 false, /* isTypedMethod. Only relevant for methods. */
11742 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11743};
11744
11745MOZ_CAN_RUN_SCRIPT static bool
11746passOptionalRecordOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11747{
11748 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalRecordOfNullableInts");
11749 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11752( cx, "TestExampleInterface"
, "passOptionalRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11750 "TestExampleInterface", "passOptionalRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11752( cx, "TestExampleInterface"
, "passOptionalRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11751 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11752( cx, "TestExampleInterface"
, "passOptionalRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11752 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11752( cx, "TestExampleInterface"
, "passOptionalRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11753
11754 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11755 Optional<Record<nsString, Nullable<int32_t>>> arg0;
11756 if (args.hasDefined(0)) {
11757 arg0.Construct();
11758 if (args[0].isObject()) {
11759 auto& recordEntries = arg0.Value().Entries();
11760
11761 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
11762 JS::RootedVector<jsid> ids(cx);
11763 if (!js::GetPropertyKeys(cx, recordObj,
11764 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
11765 return false;
11766 }
11767 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
11768 JS_ReportOutOfMemory(cx);
11769 return false;
11770 }
11771 JS::Rooted<JS::Value> propNameValue(cx);
11772 JS::Rooted<JS::Value> temp(cx);
11773 JS::Rooted<jsid> curId(cx);
11774 JS::Rooted<JS::Value> idVal(cx);
11775 // Use a hashset to keep track of ids seen, to avoid
11776 // introducing nasty O(N^2) behavior scanning for them all the
11777 // time. Ideally we'd use a data structure with O(1) lookup
11778 // _and_ ordering for the MozMap, but we don't have one lying
11779 // around.
11780 nsTHashtable<nsStringHashKey> idsSeen;
11781 for (size_t i = 0; i < ids.length(); ++i) {
11782 curId = ids[i];
11783
11784 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
11785 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
11786 &desc)) {
11787 return false;
11788 }
11789
11790 if (desc.isNothing() || !desc->enumerable()) {
11791 continue;
11792 }
11793
11794 idVal = js::IdToValue(curId);
11795 nsString propName;
11796 // This will just throw if idVal is a Symbol, like the spec says
11797 // to do.
11798 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
11799 return false;
11800 }
11801
11802 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
11803 return false;
11804 }
11805
11806 Record<nsString, Nullable<int32_t>>::EntryType* entry;
11807 if (!idsSeen.EnsureInserted(propName)) {
11808 // Find the existing entry.
11809 auto idx = recordEntries.IndexOf(propName);
11810 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?" ")"
, "../TestExampleGenBinding.cpp", 11811); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11811; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
11811 "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?" ")"
, "../TestExampleGenBinding.cpp", 11811); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11811; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
11812 // Now blow it away to make it look like it was just added
11813 // to the array, because it's not obvious that it's
11814 // safe to write to its already-initialized mValue via our
11815 // normal codegen conversions. For example, the value
11816 // could be a union and this would change its type, but
11817 // codegen assumes we won't do that.
11818 entry = recordEntries.ReconstructElementAt(idx);
11819 } else {
11820 // Safe to do an infallible append here, because we did a
11821 // SetCapacity above to the right capacity.
11822 entry = recordEntries.AppendElement();
11823 }
11824 entry->mKey = propName;
11825 Nullable<int32_t>& slot = entry->mValue;
11826 if (temp.isNullOrUndefined()) {
11827 slot.SetNull();
11828 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot.SetValue())) {
11829 return false;
11830 }
11831 }
11832 } else {
11833 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
11834 return false;
11835 }
11836 }
11837 // NOTE: This assert does NOT call the function.
11838 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalRecordOfNullableInts(Constify(arg0)))>, "Should be returning void here");
11839 MOZ_KnownLive(self)(self)->PassOptionalRecordOfNullableInts(Constify(arg0));
11840 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 11840); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11840; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11841 args.rval().setUndefined();
11842 return true;
11843}
11844
11845static const JSJitInfo passOptionalRecordOfNullableInts_methodinfo = {
11846 { (JSJitGetterOp)passOptionalRecordOfNullableInts },
11847 { prototypes::id::TestExampleInterface },
11848 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11849 JSJitInfo::Method,
11850 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11851 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11852 false, /* isInfallible. False in setters. */
11853 false, /* isMovable. Not relevant for setters. */
11854 false, /* isEliminatable. Not relevant for setters. */
11855 false, /* isAlwaysInSlot. Only relevant for getters. */
11856 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11857 false, /* isTypedMethod. Only relevant for methods. */
11858 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11859};
11860
11861MOZ_CAN_RUN_SCRIPT static bool
11862passOptionalNullableRecordOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11863{
11864 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableRecordOfNullableInts");
11865 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11868( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11866 "TestExampleInterface", "passOptionalNullableRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11868( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11867 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11868( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11868 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11868( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11869
11870 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11871 Optional<Nullable<Record<nsString, Nullable<int32_t>>>> arg0;
11872 if (args.hasDefined(0)) {
11873 arg0.Construct();
11874 if (args[0].isObject()) {
11875 auto& recordEntries = arg0.Value().SetValue().Entries();
11876
11877 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
11878 JS::RootedVector<jsid> ids(cx);
11879 if (!js::GetPropertyKeys(cx, recordObj,
11880 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
11881 return false;
11882 }
11883 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
11884 JS_ReportOutOfMemory(cx);
11885 return false;
11886 }
11887 JS::Rooted<JS::Value> propNameValue(cx);
11888 JS::Rooted<JS::Value> temp(cx);
11889 JS::Rooted<jsid> curId(cx);
11890 JS::Rooted<JS::Value> idVal(cx);
11891 // Use a hashset to keep track of ids seen, to avoid
11892 // introducing nasty O(N^2) behavior scanning for them all the
11893 // time. Ideally we'd use a data structure with O(1) lookup
11894 // _and_ ordering for the MozMap, but we don't have one lying
11895 // around.
11896 nsTHashtable<nsStringHashKey> idsSeen;
11897 for (size_t i = 0; i < ids.length(); ++i) {
11898 curId = ids[i];
11899
11900 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
11901 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
11902 &desc)) {
11903 return false;
11904 }
11905
11906 if (desc.isNothing() || !desc->enumerable()) {
11907 continue;
11908 }
11909
11910 idVal = js::IdToValue(curId);
11911 nsString propName;
11912 // This will just throw if idVal is a Symbol, like the spec says
11913 // to do.
11914 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
11915 return false;
11916 }
11917
11918 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
11919 return false;
11920 }
11921
11922 Record<nsString, Nullable<int32_t>>::EntryType* entry;
11923 if (!idsSeen.EnsureInserted(propName)) {
11924 // Find the existing entry.
11925 auto idx = recordEntries.IndexOf(propName);
11926 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?" ")"
, "../TestExampleGenBinding.cpp", 11927); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11927; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
11927 "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?" ")"
, "../TestExampleGenBinding.cpp", 11927); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 11927; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
11928 // Now blow it away to make it look like it was just added
11929 // to the array, because it's not obvious that it's
11930 // safe to write to its already-initialized mValue via our
11931 // normal codegen conversions. For example, the value
11932 // could be a union and this would change its type, but
11933 // codegen assumes we won't do that.
11934 entry = recordEntries.ReconstructElementAt(idx);
11935 } else {
11936 // Safe to do an infallible append here, because we did a
11937 // SetCapacity above to the right capacity.
11938 entry = recordEntries.AppendElement();
11939 }
11940 entry->mKey = propName;
11941 Nullable<int32_t>& slot = entry->mValue;
11942 if (temp.isNullOrUndefined()) {
11943 slot.SetNull();
11944 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot.SetValue())) {
11945 return false;
11946 }
11947 }
11948 } else if (args[0].isNullOrUndefined()) {
11949 arg0.Value().SetNull();
11950 } else {
11951 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
11952 return false;
11953 }
11954 }
11955 // NOTE: This assert does NOT call the function.
11956 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableInts(Constify(arg0)))>, "Should be returning void here");
11957 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableInts(Constify(arg0));
11958 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 11958); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11958; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11959 args.rval().setUndefined();
11960 return true;
11961}
11962
11963static const JSJitInfo passOptionalNullableRecordOfNullableInts_methodinfo = {
11964 { (JSJitGetterOp)passOptionalNullableRecordOfNullableInts },
11965 { prototypes::id::TestExampleInterface },
11966 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
11967 JSJitInfo::Method,
11968 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11969 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11970 false, /* isInfallible. False in setters. */
11971 false, /* isMovable. Not relevant for setters. */
11972 false, /* isEliminatable. Not relevant for setters. */
11973 false, /* isAlwaysInSlot. Only relevant for getters. */
11974 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11975 false, /* isTypedMethod. Only relevant for methods. */
11976 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11977};
11978
11979MOZ_CAN_RUN_SCRIPT static bool
11980passCastableObjectRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11981{
11982 BindingCallContext cx(cx_, "TestExampleInterface.passCastableObjectRecord");
11983 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11986( cx, "TestExampleInterface"
, "passCastableObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11984 "TestExampleInterface", "passCastableObjectRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11986( cx, "TestExampleInterface"
, "passCastableObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11985 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11986( cx, "TestExampleInterface"
, "passCastableObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11986 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11986( cx, "TestExampleInterface"
, "passCastableObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11987
11988 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
11989 if (!args.requireAtLeast(cx, "TestExampleInterface.passCastableObjectRecord", 1)) {
11990 return false;
11991 }
11992 Record<nsString, OwningNonNull<mozilla::dom::TestInterface>> arg0;
11993 if (args[0].isObject()) {
11994 auto& recordEntries = arg0.Entries();
11995
11996 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
11997 JS::RootedVector<jsid> ids(cx);
11998 if (!js::GetPropertyKeys(cx, recordObj,
11999 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12000 return false;
12001 }
12002 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12003 JS_ReportOutOfMemory(cx);
12004 return false;
12005 }
12006 JS::Rooted<JS::Value> propNameValue(cx);
12007 JS::Rooted<JS::Value> temp(cx);
12008 JS::Rooted<jsid> curId(cx);
12009 JS::Rooted<JS::Value> idVal(cx);
12010 // Use a hashset to keep track of ids seen, to avoid
12011 // introducing nasty O(N^2) behavior scanning for them all the
12012 // time. Ideally we'd use a data structure with O(1) lookup
12013 // _and_ ordering for the MozMap, but we don't have one lying
12014 // around.
12015 nsTHashtable<nsStringHashKey> idsSeen;
12016 for (size_t i = 0; i < ids.length(); ++i) {
12017 curId = ids[i];
12018
12019 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12020 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12021 &desc)) {
12022 return false;
12023 }
12024
12025 if (desc.isNothing() || !desc->enumerable()) {
12026 continue;
12027 }
12028
12029 idVal = js::IdToValue(curId);
12030 nsString propName;
12031 // This will just throw if idVal is a Symbol, like the spec says
12032 // to do.
12033 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12034 return false;
12035 }
12036
12037 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12038 return false;
12039 }
12040
12041 Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>::EntryType* entry;
12042 if (!idsSeen.EnsureInserted(propName)) {
12043 // Find the existing entry.
12044 auto idx = recordEntries.IndexOf(propName);
12045 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?" ")"
, "../TestExampleGenBinding.cpp", 12046); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12046; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12046 "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?" ")"
, "../TestExampleGenBinding.cpp", 12046); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12046; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12047 // Now blow it away to make it look like it was just added
12048 // to the array, because it's not obvious that it's
12049 // safe to write to its already-initialized mValue via our
12050 // normal codegen conversions. For example, the value
12051 // could be a union and this would change its type, but
12052 // codegen assumes we won't do that.
12053 entry = recordEntries.ReconstructElementAt(idx);
12054 } else {
12055 // Safe to do an infallible append here, because we did a
12056 // SetCapacity above to the right capacity.
12057 entry = recordEntries.AppendElement();
12058 }
12059 entry->mKey = propName;
12060 OwningNonNull<mozilla::dom::TestInterface>& slot = entry->mValue;
12061 if (temp.isObject()) {
12062 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
12063 {
12064 // Our JSContext should be in the right global to do unwrapping in.
12065 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
12066 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
12067 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
12068 return false;
12069 }
12070 }
12071 } else {
12072 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
12073 return false;
12074 }
12075 }
12076 } else {
12077 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12078 return false;
12079 }
12080 // NOTE: This assert does NOT call the function.
12081 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCastableObjectRecord(Constify(arg0)))>, "Should be returning void here");
12082 MOZ_KnownLive(self)(self)->PassCastableObjectRecord(Constify(arg0));
12083 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 12083); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12083; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12084 args.rval().setUndefined();
12085 return true;
12086}
12087
12088static const JSJitInfo passCastableObjectRecord_methodinfo = {
12089 { (JSJitGetterOp)passCastableObjectRecord },
12090 { prototypes::id::TestExampleInterface },
12091 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
12092 JSJitInfo::Method,
12093 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12094 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12095 false, /* isInfallible. False in setters. */
12096 false, /* isMovable. Not relevant for setters. */
12097 false, /* isEliminatable. Not relevant for setters. */
12098 false, /* isAlwaysInSlot. Only relevant for getters. */
12099 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12100 false, /* isTypedMethod. Only relevant for methods. */
12101 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12102};
12103
12104MOZ_CAN_RUN_SCRIPT static bool
12105passNullableCastableObjectRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12106{
12107 BindingCallContext cx(cx_, "TestExampleInterface.passNullableCastableObjectRecord");
12108 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12111( cx, "TestExampleInterface"
, "passNullableCastableObjectRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12109 "TestExampleInterface", "passNullableCastableObjectRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12111( cx, "TestExampleInterface"
, "passNullableCastableObjectRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12110 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12111( cx, "TestExampleInterface"
, "passNullableCastableObjectRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12111 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12111( cx, "TestExampleInterface"
, "passNullableCastableObjectRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12112
12113 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
12114 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableCastableObjectRecord", 1)) {
12115 return false;
12116 }
12117 Record<nsString, RefPtr<mozilla::dom::TestInterface>> arg0;
12118 if (args[0].isObject()) {
12119 auto& recordEntries = arg0.Entries();
12120
12121 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12122 JS::RootedVector<jsid> ids(cx);
12123 if (!js::GetPropertyKeys(cx, recordObj,
12124 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12125 return false;
12126 }
12127 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12128 JS_ReportOutOfMemory(cx);
12129 return false;
12130 }
12131 JS::Rooted<JS::Value> propNameValue(cx);
12132 JS::Rooted<JS::Value> temp(cx);
12133 JS::Rooted<jsid> curId(cx);
12134 JS::Rooted<JS::Value> idVal(cx);
12135 // Use a hashset to keep track of ids seen, to avoid
12136 // introducing nasty O(N^2) behavior scanning for them all the
12137 // time. Ideally we'd use a data structure with O(1) lookup
12138 // _and_ ordering for the MozMap, but we don't have one lying
12139 // around.
12140 nsTHashtable<nsStringHashKey> idsSeen;
12141 for (size_t i = 0; i < ids.length(); ++i) {
12142 curId = ids[i];
12143
12144 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12145 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12146 &desc)) {
12147 return false;
12148 }
12149
12150 if (desc.isNothing() || !desc->enumerable()) {
12151 continue;
12152 }
12153
12154 idVal = js::IdToValue(curId);
12155 nsString propName;
12156 // This will just throw if idVal is a Symbol, like the spec says
12157 // to do.
12158 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12159 return false;
12160 }
12161
12162 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12163 return false;
12164 }
12165
12166 Record<nsString, RefPtr<mozilla::dom::TestInterface>>::EntryType* entry;
12167 if (!idsSeen.EnsureInserted(propName)) {
12168 // Find the existing entry.
12169 auto idx = recordEntries.IndexOf(propName);
12170 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?" ")"
, "../TestExampleGenBinding.cpp", 12171); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12171; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12171 "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?" ")"
, "../TestExampleGenBinding.cpp", 12171); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12171; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12172 // Now blow it away to make it look like it was just added
12173 // to the array, because it's not obvious that it's
12174 // safe to write to its already-initialized mValue via our
12175 // normal codegen conversions. For example, the value
12176 // could be a union and this would change its type, but
12177 // codegen assumes we won't do that.
12178 entry = recordEntries.ReconstructElementAt(idx);
12179 } else {
12180 // Safe to do an infallible append here, because we did a
12181 // SetCapacity above to the right capacity.
12182 entry = recordEntries.AppendElement();
12183 }
12184 entry->mKey = propName;
12185 RefPtr<mozilla::dom::TestInterface>& slot = entry->mValue;
12186 if (temp.isObject()) {
12187 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
12188 {
12189 // Our JSContext should be in the right global to do unwrapping in.
12190 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
12191 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
12192 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
12193 return false;
12194 }
12195 }
12196 } else if (temp.isNullOrUndefined()) {
12197 slot = nullptr;
12198 } else {
12199 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
12200 return false;
12201 }
12202 }
12203 } else {
12204 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12205 return false;
12206 }
12207 // NOTE: This assert does NOT call the function.
12208 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCastableObjectRecord(Constify(arg0)))>, "Should be returning void here");
12209 MOZ_KnownLive(self)(self)->PassNullableCastableObjectRecord(Constify(arg0));
12210 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 12210); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12210; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12211 args.rval().setUndefined();
12212 return true;
12213}
12214
12215static const JSJitInfo passNullableCastableObjectRecord_methodinfo = {
12216 { (JSJitGetterOp)passNullableCastableObjectRecord },
12217 { prototypes::id::TestExampleInterface },
12218 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
12219 JSJitInfo::Method,
12220 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12221 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12222 false, /* isInfallible. False in setters. */
12223 false, /* isMovable. Not relevant for setters. */
12224 false, /* isEliminatable. Not relevant for setters. */
12225 false, /* isAlwaysInSlot. Only relevant for getters. */
12226 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12227 false, /* isTypedMethod. Only relevant for methods. */
12228 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12229};
12230
12231MOZ_CAN_RUN_SCRIPT static bool
12232passCastableObjectNullableRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12233{
12234 BindingCallContext cx(cx_, "TestExampleInterface.passCastableObjectNullableRecord");
12235 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12238( cx, "TestExampleInterface"
, "passCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12236 "TestExampleInterface", "passCastableObjectNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12238( cx, "TestExampleInterface"
, "passCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12237 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12238( cx, "TestExampleInterface"
, "passCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12238 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12238( cx, "TestExampleInterface"
, "passCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12239
12240 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
12241 if (!args.requireAtLeast(cx, "TestExampleInterface.passCastableObjectNullableRecord", 1)) {
12242 return false;
12243 }
12244 Nullable<Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>> arg0;
12245 if (args[0].isObject()) {
12246 auto& recordEntries = arg0.SetValue().Entries();
12247
12248 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12249 JS::RootedVector<jsid> ids(cx);
12250 if (!js::GetPropertyKeys(cx, recordObj,
12251 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12252 return false;
12253 }
12254 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12255 JS_ReportOutOfMemory(cx);
12256 return false;
12257 }
12258 JS::Rooted<JS::Value> propNameValue(cx);
12259 JS::Rooted<JS::Value> temp(cx);
12260 JS::Rooted<jsid> curId(cx);
12261 JS::Rooted<JS::Value> idVal(cx);
12262 // Use a hashset to keep track of ids seen, to avoid
12263 // introducing nasty O(N^2) behavior scanning for them all the
12264 // time. Ideally we'd use a data structure with O(1) lookup
12265 // _and_ ordering for the MozMap, but we don't have one lying
12266 // around.
12267 nsTHashtable<nsStringHashKey> idsSeen;
12268 for (size_t i = 0; i < ids.length(); ++i) {
12269 curId = ids[i];
12270
12271 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12272 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12273 &desc)) {
12274 return false;
12275 }
12276
12277 if (desc.isNothing() || !desc->enumerable()) {
12278 continue;
12279 }
12280
12281 idVal = js::IdToValue(curId);
12282 nsString propName;
12283 // This will just throw if idVal is a Symbol, like the spec says
12284 // to do.
12285 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12286 return false;
12287 }
12288
12289 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12290 return false;
12291 }
12292
12293 Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>::EntryType* entry;
12294 if (!idsSeen.EnsureInserted(propName)) {
12295 // Find the existing entry.
12296 auto idx = recordEntries.IndexOf(propName);
12297 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?" ")"
, "../TestExampleGenBinding.cpp", 12298); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12298; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12298 "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?" ")"
, "../TestExampleGenBinding.cpp", 12298); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12298; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12299 // Now blow it away to make it look like it was just added
12300 // to the array, because it's not obvious that it's
12301 // safe to write to its already-initialized mValue via our
12302 // normal codegen conversions. For example, the value
12303 // could be a union and this would change its type, but
12304 // codegen assumes we won't do that.
12305 entry = recordEntries.ReconstructElementAt(idx);
12306 } else {
12307 // Safe to do an infallible append here, because we did a
12308 // SetCapacity above to the right capacity.
12309 entry = recordEntries.AppendElement();
12310 }
12311 entry->mKey = propName;
12312 OwningNonNull<mozilla::dom::TestInterface>& slot = entry->mValue;
12313 if (temp.isObject()) {
12314 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
12315 {
12316 // Our JSContext should be in the right global to do unwrapping in.
12317 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
12318 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
12319 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
12320 return false;
12321 }
12322 }
12323 } else {
12324 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
12325 return false;
12326 }
12327 }
12328 } else if (args[0].isNullOrUndefined()) {
12329 arg0.SetNull();
12330 } else {
12331 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12332 return false;
12333 }
12334 // NOTE: This assert does NOT call the function.
12335 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCastableObjectNullableRecord(Constify(arg0)))>, "Should be returning void here");
12336 MOZ_KnownLive(self)(self)->PassCastableObjectNullableRecord(Constify(arg0));
12337 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 12337); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12337; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12338 args.rval().setUndefined();
12339 return true;
12340}
12341
12342static const JSJitInfo passCastableObjectNullableRecord_methodinfo = {
12343 { (JSJitGetterOp)passCastableObjectNullableRecord },
12344 { prototypes::id::TestExampleInterface },
12345 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
12346 JSJitInfo::Method,
12347 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12348 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12349 false, /* isInfallible. False in setters. */
12350 false, /* isMovable. Not relevant for setters. */
12351 false, /* isEliminatable. Not relevant for setters. */
12352 false, /* isAlwaysInSlot. Only relevant for getters. */
12353 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12354 false, /* isTypedMethod. Only relevant for methods. */
12355 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12356};
12357
12358MOZ_CAN_RUN_SCRIPT static bool
12359passNullableCastableObjectNullableRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12360{
12361 BindingCallContext cx(cx_, "TestExampleInterface.passNullableCastableObjectNullableRecord");
12362 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12365( cx, "TestExampleInterface"
, "passNullableCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12363 "TestExampleInterface", "passNullableCastableObjectNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12365( cx, "TestExampleInterface"
, "passNullableCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12364 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12365( cx, "TestExampleInterface"
, "passNullableCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12365 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12365( cx, "TestExampleInterface"
, "passNullableCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12366
12367 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
12368 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableCastableObjectNullableRecord", 1)) {
12369 return false;
12370 }
12371 Nullable<Record<nsString, RefPtr<mozilla::dom::TestInterface>>> arg0;
12372 if (args[0].isObject()) {
12373 auto& recordEntries = arg0.SetValue().Entries();
12374
12375 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12376 JS::RootedVector<jsid> ids(cx);
12377 if (!js::GetPropertyKeys(cx, recordObj,
12378 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12379 return false;
12380 }
12381 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12382 JS_ReportOutOfMemory(cx);
12383 return false;
12384 }
12385 JS::Rooted<JS::Value> propNameValue(cx);
12386 JS::Rooted<JS::Value> temp(cx);
12387 JS::Rooted<jsid> curId(cx);
12388 JS::Rooted<JS::Value> idVal(cx);
12389 // Use a hashset to keep track of ids seen, to avoid
12390 // introducing nasty O(N^2) behavior scanning for them all the
12391 // time. Ideally we'd use a data structure with O(1) lookup
12392 // _and_ ordering for the MozMap, but we don't have one lying
12393 // around.
12394 nsTHashtable<nsStringHashKey> idsSeen;
12395 for (size_t i = 0; i < ids.length(); ++i) {
12396 curId = ids[i];
12397
12398 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12399 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12400 &desc)) {
12401 return false;
12402 }
12403
12404 if (desc.isNothing() || !desc->enumerable()) {
12405 continue;
12406 }
12407
12408 idVal = js::IdToValue(curId);
12409 nsString propName;
12410 // This will just throw if idVal is a Symbol, like the spec says
12411 // to do.
12412 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12413 return false;
12414 }
12415
12416 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12417 return false;
12418 }
12419
12420 Record<nsString, RefPtr<mozilla::dom::TestInterface>>::EntryType* entry;
12421 if (!idsSeen.EnsureInserted(propName)) {
12422 // Find the existing entry.
12423 auto idx = recordEntries.IndexOf(propName);
12424 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?" ")"
, "../TestExampleGenBinding.cpp", 12425); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12425; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12425 "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?" ")"
, "../TestExampleGenBinding.cpp", 12425); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12425; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12426 // Now blow it away to make it look like it was just added
12427 // to the array, because it's not obvious that it's
12428 // safe to write to its already-initialized mValue via our
12429 // normal codegen conversions. For example, the value
12430 // could be a union and this would change its type, but
12431 // codegen assumes we won't do that.
12432 entry = recordEntries.ReconstructElementAt(idx);
12433 } else {
12434 // Safe to do an infallible append here, because we did a
12435 // SetCapacity above to the right capacity.
12436 entry = recordEntries.AppendElement();
12437 }
12438 entry->mKey = propName;
12439 RefPtr<mozilla::dom::TestInterface>& slot = entry->mValue;
12440 if (temp.isObject()) {
12441 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
12442 {
12443 // Our JSContext should be in the right global to do unwrapping in.
12444 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
12445 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
12446 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
12447 return false;
12448 }
12449 }
12450 } else if (temp.isNullOrUndefined()) {
12451 slot = nullptr;
12452 } else {
12453 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
12454 return false;
12455 }
12456 }
12457 } else if (args[0].isNullOrUndefined()) {
12458 arg0.SetNull();
12459 } else {
12460 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12461 return false;
12462 }
12463 // NOTE: This assert does NOT call the function.
12464 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCastableObjectNullableRecord(Constify(arg0)))>, "Should be returning void here");
12465 MOZ_KnownLive(self)(self)->PassNullableCastableObjectNullableRecord(Constify(arg0));
12466 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 12466); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12466; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12467 args.rval().setUndefined();
12468 return true;
12469}
12470
12471static const JSJitInfo passNullableCastableObjectNullableRecord_methodinfo = {
12472 { (JSJitGetterOp)passNullableCastableObjectNullableRecord },
12473 { prototypes::id::TestExampleInterface },
12474 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
12475 JSJitInfo::Method,
12476 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12477 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12478 false, /* isInfallible. False in setters. */
12479 false, /* isMovable. Not relevant for setters. */
12480 false, /* isEliminatable. Not relevant for setters. */
12481 false, /* isAlwaysInSlot. Only relevant for getters. */
12482 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12483 false, /* isTypedMethod. Only relevant for methods. */
12484 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12485};
12486
12487MOZ_CAN_RUN_SCRIPT static bool
12488passOptionalRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12489{
12490 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalRecord");
12491 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12494( cx, "TestExampleInterface"
, "passOptionalRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
12492 "TestExampleInterface", "passOptionalRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12494( cx, "TestExampleInterface"
, "passOptionalRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
12493 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12494( cx, "TestExampleInterface"
, "passOptionalRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
12494 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12494( cx, "TestExampleInterface"
, "passOptionalRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
12495
12496 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
12497 Optional<Record<nsString, int32_t>> arg0;
12498 if (args.hasDefined(0)) {
12499 arg0.Construct();
12500 if (args[0].isObject()) {
12501 auto& recordEntries = arg0.Value().Entries();
12502
12503 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12504 JS::RootedVector<jsid> ids(cx);
12505 if (!js::GetPropertyKeys(cx, recordObj,
12506 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12507 return false;
12508 }
12509 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12510 JS_ReportOutOfMemory(cx);
12511 return false;
12512 }
12513 JS::Rooted<JS::Value> propNameValue(cx);
12514 JS::Rooted<JS::Value> temp(cx);
12515 JS::Rooted<jsid> curId(cx);
12516 JS::Rooted<JS::Value> idVal(cx);
12517 // Use a hashset to keep track of ids seen, to avoid
12518 // introducing nasty O(N^2) behavior scanning for them all the
12519 // time. Ideally we'd use a data structure with O(1) lookup
12520 // _and_ ordering for the MozMap, but we don't have one lying
12521 // around.
12522 nsTHashtable<nsStringHashKey> idsSeen;
12523 for (size_t i = 0; i < ids.length(); ++i) {
12524 curId = ids[i];
12525
12526 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12527 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12528 &desc)) {
12529 return false;
12530 }
12531
12532 if (desc.isNothing() || !desc->enumerable()) {
12533 continue;
12534 }
12535
12536 idVal = js::IdToValue(curId);
12537 nsString propName;
12538 // This will just throw if idVal is a Symbol, like the spec says
12539 // to do.
12540 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12541 return false;
12542 }
12543
12544 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12545 return false;
12546 }
12547
12548 Record<nsString, int32_t>::EntryType* entry;
12549 if (!idsSeen.EnsureInserted(propName)) {
12550 // Find the existing entry.
12551 auto idx = recordEntries.IndexOf(propName);
12552 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?" ")"
, "../TestExampleGenBinding.cpp", 12553); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12553; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12553 "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?" ")"
, "../TestExampleGenBinding.cpp", 12553); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12553; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12554 // Now blow it away to make it look like it was just added
12555 // to the array, because it's not obvious that it's
12556 // safe to write to its already-initialized mValue via our
12557 // normal codegen conversions. For example, the value
12558 // could be a union and this would change its type, but
12559 // codegen assumes we won't do that.
12560 entry = recordEntries.ReconstructElementAt(idx);
12561 } else {
12562 // Safe to do an infallible append here, because we did a
12563 // SetCapacity above to the right capacity.
12564 entry = recordEntries.AppendElement();
12565 }
12566 entry->mKey = propName;
12567 int32_t& slot = entry->mValue;
12568 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
12569 return false;
12570 }
12571 }
12572 } else {
12573 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12574 return false;
12575 }
12576 }
12577 // NOTE: This assert does NOT call the function.
12578 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalRecord(Constify(arg0)))>, "Should be returning void here");
12579 MOZ_KnownLive(self)(self)->PassOptionalRecord(Constify(arg0));
12580 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 12580); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12580; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12581 args.rval().setUndefined();
12582 return true;
12583}
12584
12585static const JSJitInfo passOptionalRecord_methodinfo = {
12586 { (JSJitGetterOp)passOptionalRecord },
12587 { prototypes::id::TestExampleInterface },
12588 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
12589 JSJitInfo::Method,
12590 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12591 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12592 false, /* isInfallible. False in setters. */
12593 false, /* isMovable. Not relevant for setters. */
12594 false, /* isEliminatable. Not relevant for setters. */
12595 false, /* isAlwaysInSlot. Only relevant for getters. */
12596 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12597 false, /* isTypedMethod. Only relevant for methods. */
12598 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12599};
12600
12601MOZ_CAN_RUN_SCRIPT static bool
12602passOptionalNullableRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12603{
12604 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableRecord");
12605 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12608( cx, "TestExampleInterface"
, "passOptionalNullableRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12606 "TestExampleInterface", "passOptionalNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12608( cx, "TestExampleInterface"
, "passOptionalNullableRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12607 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12608( cx, "TestExampleInterface"
, "passOptionalNullableRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12608 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12608( cx, "TestExampleInterface"
, "passOptionalNullableRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12609
12610 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
12611 Optional<Nullable<Record<nsString, int32_t>>> arg0;
12612 if (args.hasDefined(0)) {
12613 arg0.Construct();
12614 if (args[0].isObject()) {
12615 auto& recordEntries = arg0.Value().SetValue().Entries();
12616
12617 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12618 JS::RootedVector<jsid> ids(cx);
12619 if (!js::GetPropertyKeys(cx, recordObj,
12620 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12621 return false;
12622 }
12623 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12624 JS_ReportOutOfMemory(cx);
12625 return false;
12626 }
12627 JS::Rooted<JS::Value> propNameValue(cx);
12628 JS::Rooted<JS::Value> temp(cx);
12629 JS::Rooted<jsid> curId(cx);
12630 JS::Rooted<JS::Value> idVal(cx);
12631 // Use a hashset to keep track of ids seen, to avoid
12632 // introducing nasty O(N^2) behavior scanning for them all the
12633 // time. Ideally we'd use a data structure with O(1) lookup
12634 // _and_ ordering for the MozMap, but we don't have one lying
12635 // around.
12636 nsTHashtable<nsStringHashKey> idsSeen;
12637 for (size_t i = 0; i < ids.length(); ++i) {
12638 curId = ids[i];
12639
12640 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12641 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12642 &desc)) {
12643 return false;
12644 }
12645
12646 if (desc.isNothing() || !desc->enumerable()) {
12647 continue;
12648 }
12649
12650 idVal = js::IdToValue(curId);
12651 nsString propName;
12652 // This will just throw if idVal is a Symbol, like the spec says
12653 // to do.
12654 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12655 return false;
12656 }
12657
12658 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12659 return false;
12660 }
12661
12662 Record<nsString, int32_t>::EntryType* entry;
12663 if (!idsSeen.EnsureInserted(propName)) {
12664 // Find the existing entry.
12665 auto idx = recordEntries.IndexOf(propName);
12666 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?" ")"
, "../TestExampleGenBinding.cpp", 12667); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12667; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12667 "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?" ")"
, "../TestExampleGenBinding.cpp", 12667); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12667; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12668 // Now blow it away to make it look like it was just added
12669 // to the array, because it's not obvious that it's
12670 // safe to write to its already-initialized mValue via our
12671 // normal codegen conversions. For example, the value
12672 // could be a union and this would change its type, but
12673 // codegen assumes we won't do that.
12674 entry = recordEntries.ReconstructElementAt(idx);
12675 } else {
12676 // Safe to do an infallible append here, because we did a
12677 // SetCapacity above to the right capacity.
12678 entry = recordEntries.AppendElement();
12679 }
12680 entry->mKey = propName;
12681 int32_t& slot = entry->mValue;
12682 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
12683 return false;
12684 }
12685 }
12686 } else if (args[0].isNullOrUndefined()) {
12687 arg0.Value().SetNull();
12688 } else {
12689 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12690 return false;
12691 }
12692 }
12693 // NOTE: This assert does NOT call the function.
12694 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecord(Constify(arg0)))>, "Should be returning void here");
12695 MOZ_KnownLive(self)(self)->PassOptionalNullableRecord(Constify(arg0));
12696 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 12696); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12696; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12697 args.rval().setUndefined();
12698 return true;
12699}
12700
12701static const JSJitInfo passOptionalNullableRecord_methodinfo = {
12702 { (JSJitGetterOp)passOptionalNullableRecord },
12703 { prototypes::id::TestExampleInterface },
12704 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
12705 JSJitInfo::Method,
12706 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12707 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12708 false, /* isInfallible. False in setters. */
12709 false, /* isMovable. Not relevant for setters. */
12710 false, /* isEliminatable. Not relevant for setters. */
12711 false, /* isAlwaysInSlot. Only relevant for getters. */
12712 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12713 false, /* isTypedMethod. Only relevant for methods. */
12714 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12715};
12716
12717MOZ_CAN_RUN_SCRIPT static bool
12718passOptionalNullableRecordWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12719{
12720 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableRecordWithDefaultValue");
12721 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12724( cx, "TestExampleInterface"
, "passOptionalNullableRecordWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12722 "TestExampleInterface", "passOptionalNullableRecordWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12724( cx, "TestExampleInterface"
, "passOptionalNullableRecordWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12723 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12724( cx, "TestExampleInterface"
, "passOptionalNullableRecordWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12724 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12724( cx, "TestExampleInterface"
, "passOptionalNullableRecordWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12725
12726 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
12727 Nullable<Record<nsString, int32_t>> arg0;
12728 if (args.hasDefined(0)) {
12729 if (args[0].isObject()) {
12730 auto& recordEntries = arg0.SetValue().Entries();
12731
12732 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12733 JS::RootedVector<jsid> ids(cx);
12734 if (!js::GetPropertyKeys(cx, recordObj,
12735 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12736 return false;
12737 }
12738 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12739 JS_ReportOutOfMemory(cx);
12740 return false;
12741 }
12742 JS::Rooted<JS::Value> propNameValue(cx);
12743 JS::Rooted<JS::Value> temp(cx);
12744 JS::Rooted<jsid> curId(cx);
12745 JS::Rooted<JS::Value> idVal(cx);
12746 // Use a hashset to keep track of ids seen, to avoid
12747 // introducing nasty O(N^2) behavior scanning for them all the
12748 // time. Ideally we'd use a data structure with O(1) lookup
12749 // _and_ ordering for the MozMap, but we don't have one lying
12750 // around.
12751 nsTHashtable<nsStringHashKey> idsSeen;
12752 for (size_t i = 0; i < ids.length(); ++i) {
12753 curId = ids[i];
12754
12755 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12756 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12757 &desc)) {
12758 return false;
12759 }
12760
12761 if (desc.isNothing() || !desc->enumerable()) {
12762 continue;
12763 }
12764
12765 idVal = js::IdToValue(curId);
12766 nsString propName;
12767 // This will just throw if idVal is a Symbol, like the spec says
12768 // to do.
12769 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12770 return false;
12771 }
12772
12773 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12774 return false;
12775 }
12776
12777 Record<nsString, int32_t>::EntryType* entry;
12778 if (!idsSeen.EnsureInserted(propName)) {
12779 // Find the existing entry.
12780 auto idx = recordEntries.IndexOf(propName);
12781 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?" ")"
, "../TestExampleGenBinding.cpp", 12782); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12782; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12782 "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?" ")"
, "../TestExampleGenBinding.cpp", 12782); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12782; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12783 // Now blow it away to make it look like it was just added
12784 // to the array, because it's not obvious that it's
12785 // safe to write to its already-initialized mValue via our
12786 // normal codegen conversions. For example, the value
12787 // could be a union and this would change its type, but
12788 // codegen assumes we won't do that.
12789 entry = recordEntries.ReconstructElementAt(idx);
12790 } else {
12791 // Safe to do an infallible append here, because we did a
12792 // SetCapacity above to the right capacity.
12793 entry = recordEntries.AppendElement();
12794 }
12795 entry->mKey = propName;
12796 int32_t& slot = entry->mValue;
12797 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
12798 return false;
12799 }
12800 }
12801 } else if (args[0].isNullOrUndefined()) {
12802 arg0.SetNull();
12803 } else {
12804 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12805 return false;
12806 }
12807 } else {
12808 arg0.SetNull();
12809 }
12810 // NOTE: This assert does NOT call the function.
12811 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
12812 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordWithDefaultValue(Constify(arg0));
12813 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 12813); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12813; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12814 args.rval().setUndefined();
12815 return true;
12816}
12817
12818static const JSJitInfo passOptionalNullableRecordWithDefaultValue_methodinfo = {
12819 { (JSJitGetterOp)passOptionalNullableRecordWithDefaultValue },
12820 { prototypes::id::TestExampleInterface },
12821 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
12822 JSJitInfo::Method,
12823 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12824 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12825 false, /* isInfallible. False in setters. */
12826 false, /* isMovable. Not relevant for setters. */
12827 false, /* isEliminatable. Not relevant for setters. */
12828 false, /* isAlwaysInSlot. Only relevant for getters. */
12829 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12830 false, /* isTypedMethod. Only relevant for methods. */
12831 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12832};
12833
12834MOZ_CAN_RUN_SCRIPT static bool
12835passOptionalObjectRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12836{
12837 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalObjectRecord");
12838 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12841( cx, "TestExampleInterface"
, "passOptionalObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12839 "TestExampleInterface", "passOptionalObjectRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12841( cx, "TestExampleInterface"
, "passOptionalObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12840 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12841( cx, "TestExampleInterface"
, "passOptionalObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12841 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12841( cx, "TestExampleInterface"
, "passOptionalObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12842
12843 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
12844 Optional<Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>> arg0;
12845 if (args.hasDefined(0)) {
12846 arg0.Construct();
12847 if (args[0].isObject()) {
12848 auto& recordEntries = arg0.Value().Entries();
12849
12850 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12851 JS::RootedVector<jsid> ids(cx);
12852 if (!js::GetPropertyKeys(cx, recordObj,
12853 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12854 return false;
12855 }
12856 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12857 JS_ReportOutOfMemory(cx);
12858 return false;
12859 }
12860 JS::Rooted<JS::Value> propNameValue(cx);
12861 JS::Rooted<JS::Value> temp(cx);
12862 JS::Rooted<jsid> curId(cx);
12863 JS::Rooted<JS::Value> idVal(cx);
12864 // Use a hashset to keep track of ids seen, to avoid
12865 // introducing nasty O(N^2) behavior scanning for them all the
12866 // time. Ideally we'd use a data structure with O(1) lookup
12867 // _and_ ordering for the MozMap, but we don't have one lying
12868 // around.
12869 nsTHashtable<nsStringHashKey> idsSeen;
12870 for (size_t i = 0; i < ids.length(); ++i) {
12871 curId = ids[i];
12872
12873 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12874 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12875 &desc)) {
12876 return false;
12877 }
12878
12879 if (desc.isNothing() || !desc->enumerable()) {
12880 continue;
12881 }
12882
12883 idVal = js::IdToValue(curId);
12884 nsString propName;
12885 // This will just throw if idVal is a Symbol, like the spec says
12886 // to do.
12887 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12888 return false;
12889 }
12890
12891 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12892 return false;
12893 }
12894
12895 Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>::EntryType* entry;
12896 if (!idsSeen.EnsureInserted(propName)) {
12897 // Find the existing entry.
12898 auto idx = recordEntries.IndexOf(propName);
12899 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?" ")"
, "../TestExampleGenBinding.cpp", 12900); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12900; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12900 "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?" ")"
, "../TestExampleGenBinding.cpp", 12900); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12900; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12901 // Now blow it away to make it look like it was just added
12902 // to the array, because it's not obvious that it's
12903 // safe to write to its already-initialized mValue via our
12904 // normal codegen conversions. For example, the value
12905 // could be a union and this would change its type, but
12906 // codegen assumes we won't do that.
12907 entry = recordEntries.ReconstructElementAt(idx);
12908 } else {
12909 // Safe to do an infallible append here, because we did a
12910 // SetCapacity above to the right capacity.
12911 entry = recordEntries.AppendElement();
12912 }
12913 entry->mKey = propName;
12914 OwningNonNull<mozilla::dom::TestInterface>& slot = entry->mValue;
12915 if (temp.isObject()) {
12916 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
12917 {
12918 // Our JSContext should be in the right global to do unwrapping in.
12919 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
12920 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
12921 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
12922 return false;
12923 }
12924 }
12925 } else {
12926 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
12927 return false;
12928 }
12929 }
12930 } else {
12931 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12932 return false;
12933 }
12934 }
12935 // NOTE: This assert does NOT call the function.
12936 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalObjectRecord(Constify(arg0)))>, "Should be returning void here");
12937 MOZ_KnownLive(self)(self)->PassOptionalObjectRecord(Constify(arg0));
12938 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 12938); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12938; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12939 args.rval().setUndefined();
12940 return true;
12941}
12942
12943static const JSJitInfo passOptionalObjectRecord_methodinfo = {
12944 { (JSJitGetterOp)passOptionalObjectRecord },
12945 { prototypes::id::TestExampleInterface },
12946 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
12947 JSJitInfo::Method,
12948 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12949 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12950 false, /* isInfallible. False in setters. */
12951 false, /* isMovable. Not relevant for setters. */
12952 false, /* isEliminatable. Not relevant for setters. */
12953 false, /* isAlwaysInSlot. Only relevant for getters. */
12954 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12955 false, /* isTypedMethod. Only relevant for methods. */
12956 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12957};
12958
12959MOZ_CAN_RUN_SCRIPT static bool
12960passExternalInterfaceRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12961{
12962 BindingCallContext cx(cx_, "TestExampleInterface.passExternalInterfaceRecord");
12963 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12966( cx, "TestExampleInterface"
, "passExternalInterfaceRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12964 "TestExampleInterface", "passExternalInterfaceRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12966( cx, "TestExampleInterface"
, "passExternalInterfaceRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12965 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12966( cx, "TestExampleInterface"
, "passExternalInterfaceRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12966 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12966( cx, "TestExampleInterface"
, "passExternalInterfaceRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12967
12968 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
12969 if (!args.requireAtLeast(cx, "TestExampleInterface.passExternalInterfaceRecord", 1)) {
12970 return false;
12971 }
12972 Record<nsString, RefPtr<mozilla::dom::TestExternalInterface>> arg0;
12973 if (args[0].isObject()) {
12974 auto& recordEntries = arg0.Entries();
12975
12976 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12977 JS::RootedVector<jsid> ids(cx);
12978 if (!js::GetPropertyKeys(cx, recordObj,
12979 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12980 return false;
12981 }
12982 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12983 JS_ReportOutOfMemory(cx);
12984 return false;
12985 }
12986 JS::Rooted<JS::Value> propNameValue(cx);
12987 JS::Rooted<JS::Value> temp(cx);
12988 JS::Rooted<jsid> curId(cx);
12989 JS::Rooted<JS::Value> idVal(cx);
12990 // Use a hashset to keep track of ids seen, to avoid
12991 // introducing nasty O(N^2) behavior scanning for them all the
12992 // time. Ideally we'd use a data structure with O(1) lookup
12993 // _and_ ordering for the MozMap, but we don't have one lying
12994 // around.
12995 nsTHashtable<nsStringHashKey> idsSeen;
12996 for (size_t i = 0; i < ids.length(); ++i) {
12997 curId = ids[i];
12998
12999 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13000 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13001 &desc)) {
13002 return false;
13003 }
13004
13005 if (desc.isNothing() || !desc->enumerable()) {
13006 continue;
13007 }
13008
13009 idVal = js::IdToValue(curId);
13010 nsString propName;
13011 // This will just throw if idVal is a Symbol, like the spec says
13012 // to do.
13013 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13014 return false;
13015 }
13016
13017 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13018 return false;
13019 }
13020
13021 Record<nsString, RefPtr<mozilla::dom::TestExternalInterface>>::EntryType* entry;
13022 if (!idsSeen.EnsureInserted(propName)) {
13023 // Find the existing entry.
13024 auto idx = recordEntries.IndexOf(propName);
13025 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?" ")"
, "../TestExampleGenBinding.cpp", 13026); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13026; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13026 "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?" ")"
, "../TestExampleGenBinding.cpp", 13026); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13026; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13027 // Now blow it away to make it look like it was just added
13028 // to the array, because it's not obvious that it's
13029 // safe to write to its already-initialized mValue via our
13030 // normal codegen conversions. For example, the value
13031 // could be a union and this would change its type, but
13032 // codegen assumes we won't do that.
13033 entry = recordEntries.ReconstructElementAt(idx);
13034 } else {
13035 // Safe to do an infallible append here, because we did a
13036 // SetCapacity above to the right capacity.
13037 entry = recordEntries.AppendElement();
13038 }
13039 entry->mKey = propName;
13040 RefPtr<mozilla::dom::TestExternalInterface>& slot = entry->mValue;
13041 if (temp.isObject()) {
13042 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
13043 RefPtr<mozilla::dom::TestExternalInterface> tempHolder;
13044 JS::Rooted<JSObject*> source(cx, &temp.toObject());
13045 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)))
) {
13046 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestExternalInterface");
13047 return false;
13048 }
13049 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", "../TestExampleGenBinding.cpp"
, 13049); AnnotateMozCrashReason("MOZ_ASSERT" "(" "tempHolder"
")"); do { *((volatile int*)__null) = 13049; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13050 slot = tempHolder;
13051 } else {
13052 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
13053 return false;
13054 }
13055 }
13056 } else {
13057 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13058 return false;
13059 }
13060 // NOTE: This assert does NOT call the function.
13061 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassExternalInterfaceRecord(Constify(arg0)))>, "Should be returning void here");
13062 MOZ_KnownLive(self)(self)->PassExternalInterfaceRecord(Constify(arg0));
13063 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13063); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13063; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13064 args.rval().setUndefined();
13065 return true;
13066}
13067
13068static const JSJitInfo passExternalInterfaceRecord_methodinfo = {
13069 { (JSJitGetterOp)passExternalInterfaceRecord },
13070 { prototypes::id::TestExampleInterface },
13071 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13072 JSJitInfo::Method,
13073 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13074 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13075 false, /* isInfallible. False in setters. */
13076 false, /* isMovable. Not relevant for setters. */
13077 false, /* isEliminatable. Not relevant for setters. */
13078 false, /* isAlwaysInSlot. Only relevant for getters. */
13079 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13080 false, /* isTypedMethod. Only relevant for methods. */
13081 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13082};
13083
13084MOZ_CAN_RUN_SCRIPT static bool
13085passNullableExternalInterfaceRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13086{
13087 BindingCallContext cx(cx_, "TestExampleInterface.passNullableExternalInterfaceRecord");
13088 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13091( cx, "TestExampleInterface"
, "passNullableExternalInterfaceRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13089 "TestExampleInterface", "passNullableExternalInterfaceRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13091( cx, "TestExampleInterface"
, "passNullableExternalInterfaceRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13090 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13091( cx, "TestExampleInterface"
, "passNullableExternalInterfaceRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13091 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13091( cx, "TestExampleInterface"
, "passNullableExternalInterfaceRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13092
13093 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13094 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableExternalInterfaceRecord", 1)) {
13095 return false;
13096 }
13097 Record<nsString, RefPtr<mozilla::dom::TestExternalInterface>> arg0;
13098 if (args[0].isObject()) {
13099 auto& recordEntries = arg0.Entries();
13100
13101 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13102 JS::RootedVector<jsid> ids(cx);
13103 if (!js::GetPropertyKeys(cx, recordObj,
13104 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13105 return false;
13106 }
13107 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13108 JS_ReportOutOfMemory(cx);
13109 return false;
13110 }
13111 JS::Rooted<JS::Value> propNameValue(cx);
13112 JS::Rooted<JS::Value> temp(cx);
13113 JS::Rooted<jsid> curId(cx);
13114 JS::Rooted<JS::Value> idVal(cx);
13115 // Use a hashset to keep track of ids seen, to avoid
13116 // introducing nasty O(N^2) behavior scanning for them all the
13117 // time. Ideally we'd use a data structure with O(1) lookup
13118 // _and_ ordering for the MozMap, but we don't have one lying
13119 // around.
13120 nsTHashtable<nsStringHashKey> idsSeen;
13121 for (size_t i = 0; i < ids.length(); ++i) {
13122 curId = ids[i];
13123
13124 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13125 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13126 &desc)) {
13127 return false;
13128 }
13129
13130 if (desc.isNothing() || !desc->enumerable()) {
13131 continue;
13132 }
13133
13134 idVal = js::IdToValue(curId);
13135 nsString propName;
13136 // This will just throw if idVal is a Symbol, like the spec says
13137 // to do.
13138 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13139 return false;
13140 }
13141
13142 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13143 return false;
13144 }
13145
13146 Record<nsString, RefPtr<mozilla::dom::TestExternalInterface>>::EntryType* entry;
13147 if (!idsSeen.EnsureInserted(propName)) {
13148 // Find the existing entry.
13149 auto idx = recordEntries.IndexOf(propName);
13150 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?" ")"
, "../TestExampleGenBinding.cpp", 13151); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13151; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13151 "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?" ")"
, "../TestExampleGenBinding.cpp", 13151); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13151; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13152 // Now blow it away to make it look like it was just added
13153 // to the array, because it's not obvious that it's
13154 // safe to write to its already-initialized mValue via our
13155 // normal codegen conversions. For example, the value
13156 // could be a union and this would change its type, but
13157 // codegen assumes we won't do that.
13158 entry = recordEntries.ReconstructElementAt(idx);
13159 } else {
13160 // Safe to do an infallible append here, because we did a
13161 // SetCapacity above to the right capacity.
13162 entry = recordEntries.AppendElement();
13163 }
13164 entry->mKey = propName;
13165 RefPtr<mozilla::dom::TestExternalInterface>& slot = entry->mValue;
13166 if (temp.isObject()) {
13167 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
13168 RefPtr<mozilla::dom::TestExternalInterface> tempHolder;
13169 JS::Rooted<JSObject*> source(cx, &temp.toObject());
13170 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)))
) {
13171 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestExternalInterface");
13172 return false;
13173 }
13174 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", "../TestExampleGenBinding.cpp"
, 13174); AnnotateMozCrashReason("MOZ_ASSERT" "(" "tempHolder"
")"); do { *((volatile int*)__null) = 13174; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13175 slot = tempHolder;
13176 } else if (temp.isNullOrUndefined()) {
13177 slot = nullptr;
13178 } else {
13179 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
13180 return false;
13181 }
13182 }
13183 } else {
13184 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13185 return false;
13186 }
13187 // NOTE: This assert does NOT call the function.
13188 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableExternalInterfaceRecord(Constify(arg0)))>, "Should be returning void here");
13189 MOZ_KnownLive(self)(self)->PassNullableExternalInterfaceRecord(Constify(arg0));
13190 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13190); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13190; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13191 args.rval().setUndefined();
13192 return true;
13193}
13194
13195static const JSJitInfo passNullableExternalInterfaceRecord_methodinfo = {
13196 { (JSJitGetterOp)passNullableExternalInterfaceRecord },
13197 { prototypes::id::TestExampleInterface },
13198 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13199 JSJitInfo::Method,
13200 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13201 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13202 false, /* isInfallible. False in setters. */
13203 false, /* isMovable. Not relevant for setters. */
13204 false, /* isEliminatable. Not relevant for setters. */
13205 false, /* isAlwaysInSlot. Only relevant for getters. */
13206 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13207 false, /* isTypedMethod. Only relevant for methods. */
13208 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13209};
13210
13211MOZ_CAN_RUN_SCRIPT static bool
13212passStringRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13213{
13214 BindingCallContext cx(cx_, "TestExampleInterface.passStringRecord");
13215 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13218( cx, "TestExampleInterface"
, "passStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13216 "TestExampleInterface", "passStringRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13218( cx, "TestExampleInterface"
, "passStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13217 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13218( cx, "TestExampleInterface"
, "passStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13218 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13218( cx, "TestExampleInterface"
, "passStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
13219
13220 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13221 if (!args.requireAtLeast(cx, "TestExampleInterface.passStringRecord", 1)) {
13222 return false;
13223 }
13224 Record<nsString, nsString> arg0;
13225 if (args[0].isObject()) {
13226 auto& recordEntries = arg0.Entries();
13227
13228 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13229 JS::RootedVector<jsid> ids(cx);
13230 if (!js::GetPropertyKeys(cx, recordObj,
13231 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13232 return false;
13233 }
13234 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13235 JS_ReportOutOfMemory(cx);
13236 return false;
13237 }
13238 JS::Rooted<JS::Value> propNameValue(cx);
13239 JS::Rooted<JS::Value> temp(cx);
13240 JS::Rooted<jsid> curId(cx);
13241 JS::Rooted<JS::Value> idVal(cx);
13242 // Use a hashset to keep track of ids seen, to avoid
13243 // introducing nasty O(N^2) behavior scanning for them all the
13244 // time. Ideally we'd use a data structure with O(1) lookup
13245 // _and_ ordering for the MozMap, but we don't have one lying
13246 // around.
13247 nsTHashtable<nsStringHashKey> idsSeen;
13248 for (size_t i = 0; i < ids.length(); ++i) {
13249 curId = ids[i];
13250
13251 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13252 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13253 &desc)) {
13254 return false;
13255 }
13256
13257 if (desc.isNothing() || !desc->enumerable()) {
13258 continue;
13259 }
13260
13261 idVal = js::IdToValue(curId);
13262 nsString propName;
13263 // This will just throw if idVal is a Symbol, like the spec says
13264 // to do.
13265 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13266 return false;
13267 }
13268
13269 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13270 return false;
13271 }
13272
13273 Record<nsString, nsString>::EntryType* entry;
13274 if (!idsSeen.EnsureInserted(propName)) {
13275 // Find the existing entry.
13276 auto idx = recordEntries.IndexOf(propName);
13277 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?" ")"
, "../TestExampleGenBinding.cpp", 13278); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13278; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13278 "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?" ")"
, "../TestExampleGenBinding.cpp", 13278); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13278; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13279 // Now blow it away to make it look like it was just added
13280 // to the array, because it's not obvious that it's
13281 // safe to write to its already-initialized mValue via our
13282 // normal codegen conversions. For example, the value
13283 // could be a union and this would change its type, but
13284 // codegen assumes we won't do that.
13285 entry = recordEntries.ReconstructElementAt(idx);
13286 } else {
13287 // Safe to do an infallible append here, because we did a
13288 // SetCapacity above to the right capacity.
13289 entry = recordEntries.AppendElement();
13290 }
13291 entry->mKey = propName;
13292 nsString& slot = entry->mValue;
13293 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
13294 return false;
13295 }
13296 }
13297 } else {
13298 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13299 return false;
13300 }
13301 // NOTE: This assert does NOT call the function.
13302 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassStringRecord(Constify(arg0)))>, "Should be returning void here");
13303 MOZ_KnownLive(self)(self)->PassStringRecord(Constify(arg0));
13304 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13304); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13304; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13305 args.rval().setUndefined();
13306 return true;
13307}
13308
13309static const JSJitInfo passStringRecord_methodinfo = {
13310 { (JSJitGetterOp)passStringRecord },
13311 { prototypes::id::TestExampleInterface },
13312 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13313 JSJitInfo::Method,
13314 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13315 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13316 false, /* isInfallible. False in setters. */
13317 false, /* isMovable. Not relevant for setters. */
13318 false, /* isEliminatable. Not relevant for setters. */
13319 false, /* isAlwaysInSlot. Only relevant for getters. */
13320 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13321 false, /* isTypedMethod. Only relevant for methods. */
13322 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13323};
13324
13325MOZ_CAN_RUN_SCRIPT static bool
13326passByteStringRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13327{
13328 BindingCallContext cx(cx_, "TestExampleInterface.passByteStringRecord");
13329 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13332( cx, "TestExampleInterface"
, "passByteStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13330 "TestExampleInterface", "passByteStringRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13332( cx, "TestExampleInterface"
, "passByteStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13331 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13332( cx, "TestExampleInterface"
, "passByteStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13332 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13332( cx, "TestExampleInterface"
, "passByteStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
13333
13334 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13335 if (!args.requireAtLeast(cx, "TestExampleInterface.passByteStringRecord", 1)) {
13336 return false;
13337 }
13338 Record<nsString, nsCString> arg0;
13339 if (args[0].isObject()) {
13340 auto& recordEntries = arg0.Entries();
13341
13342 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13343 JS::RootedVector<jsid> ids(cx);
13344 if (!js::GetPropertyKeys(cx, recordObj,
13345 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13346 return false;
13347 }
13348 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13349 JS_ReportOutOfMemory(cx);
13350 return false;
13351 }
13352 JS::Rooted<JS::Value> propNameValue(cx);
13353 JS::Rooted<JS::Value> temp(cx);
13354 JS::Rooted<jsid> curId(cx);
13355 JS::Rooted<JS::Value> idVal(cx);
13356 // Use a hashset to keep track of ids seen, to avoid
13357 // introducing nasty O(N^2) behavior scanning for them all the
13358 // time. Ideally we'd use a data structure with O(1) lookup
13359 // _and_ ordering for the MozMap, but we don't have one lying
13360 // around.
13361 nsTHashtable<nsStringHashKey> idsSeen;
13362 for (size_t i = 0; i < ids.length(); ++i) {
13363 curId = ids[i];
13364
13365 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13366 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13367 &desc)) {
13368 return false;
13369 }
13370
13371 if (desc.isNothing() || !desc->enumerable()) {
13372 continue;
13373 }
13374
13375 idVal = js::IdToValue(curId);
13376 nsString propName;
13377 // This will just throw if idVal is a Symbol, like the spec says
13378 // to do.
13379 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13380 return false;
13381 }
13382
13383 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13384 return false;
13385 }
13386
13387 Record<nsString, nsCString>::EntryType* entry;
13388 if (!idsSeen.EnsureInserted(propName)) {
13389 // Find the existing entry.
13390 auto idx = recordEntries.IndexOf(propName);
13391 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?" ")"
, "../TestExampleGenBinding.cpp", 13392); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13392; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13392 "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?" ")"
, "../TestExampleGenBinding.cpp", 13392); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13392; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13393 // Now blow it away to make it look like it was just added
13394 // to the array, because it's not obvious that it's
13395 // safe to write to its already-initialized mValue via our
13396 // normal codegen conversions. For example, the value
13397 // could be a union and this would change its type, but
13398 // codegen assumes we won't do that.
13399 entry = recordEntries.ReconstructElementAt(idx);
13400 } else {
13401 // Safe to do an infallible append here, because we did a
13402 // SetCapacity above to the right capacity.
13403 entry = recordEntries.AppendElement();
13404 }
13405 entry->mKey = propName;
13406 nsCString& slot = entry->mValue;
13407 if (!ConvertJSValueToByteString(cx, temp, false, "value in argument 1", slot)) {
13408 return false;
13409 }
13410 }
13411 } else {
13412 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13413 return false;
13414 }
13415 // NOTE: This assert does NOT call the function.
13416 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassByteStringRecord(Constify(arg0)))>, "Should be returning void here");
13417 MOZ_KnownLive(self)(self)->PassByteStringRecord(Constify(arg0));
13418 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13418); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13418; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13419 args.rval().setUndefined();
13420 return true;
13421}
13422
13423static const JSJitInfo passByteStringRecord_methodinfo = {
13424 { (JSJitGetterOp)passByteStringRecord },
13425 { prototypes::id::TestExampleInterface },
13426 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13427 JSJitInfo::Method,
13428 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13429 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13430 false, /* isInfallible. False in setters. */
13431 false, /* isMovable. Not relevant for setters. */
13432 false, /* isEliminatable. Not relevant for setters. */
13433 false, /* isAlwaysInSlot. Only relevant for getters. */
13434 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13435 false, /* isTypedMethod. Only relevant for methods. */
13436 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13437};
13438
13439MOZ_CAN_RUN_SCRIPT static bool
13440passUTF8StringRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13441{
13442 BindingCallContext cx(cx_, "TestExampleInterface.passUTF8StringRecord");
13443 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13446( cx, "TestExampleInterface"
, "passUTF8StringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13444 "TestExampleInterface", "passUTF8StringRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13446( cx, "TestExampleInterface"
, "passUTF8StringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13445 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13446( cx, "TestExampleInterface"
, "passUTF8StringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13446 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13446( cx, "TestExampleInterface"
, "passUTF8StringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
13447
13448 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13449 if (!args.requireAtLeast(cx, "TestExampleInterface.passUTF8StringRecord", 1)) {
13450 return false;
13451 }
13452 Record<nsString, nsCString> arg0;
13453 if (args[0].isObject()) {
13454 auto& recordEntries = arg0.Entries();
13455
13456 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13457 JS::RootedVector<jsid> ids(cx);
13458 if (!js::GetPropertyKeys(cx, recordObj,
13459 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13460 return false;
13461 }
13462 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13463 JS_ReportOutOfMemory(cx);
13464 return false;
13465 }
13466 JS::Rooted<JS::Value> propNameValue(cx);
13467 JS::Rooted<JS::Value> temp(cx);
13468 JS::Rooted<jsid> curId(cx);
13469 JS::Rooted<JS::Value> idVal(cx);
13470 // Use a hashset to keep track of ids seen, to avoid
13471 // introducing nasty O(N^2) behavior scanning for them all the
13472 // time. Ideally we'd use a data structure with O(1) lookup
13473 // _and_ ordering for the MozMap, but we don't have one lying
13474 // around.
13475 nsTHashtable<nsStringHashKey> idsSeen;
13476 for (size_t i = 0; i < ids.length(); ++i) {
13477 curId = ids[i];
13478
13479 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13480 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13481 &desc)) {
13482 return false;
13483 }
13484
13485 if (desc.isNothing() || !desc->enumerable()) {
13486 continue;
13487 }
13488
13489 idVal = js::IdToValue(curId);
13490 nsString propName;
13491 // This will just throw if idVal is a Symbol, like the spec says
13492 // to do.
13493 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13494 return false;
13495 }
13496
13497 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13498 return false;
13499 }
13500
13501 Record<nsString, nsCString>::EntryType* entry;
13502 if (!idsSeen.EnsureInserted(propName)) {
13503 // Find the existing entry.
13504 auto idx = recordEntries.IndexOf(propName);
13505 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?" ")"
, "../TestExampleGenBinding.cpp", 13506); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13506; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13506 "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?" ")"
, "../TestExampleGenBinding.cpp", 13506); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13506; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13507 // Now blow it away to make it look like it was just added
13508 // to the array, because it's not obvious that it's
13509 // safe to write to its already-initialized mValue via our
13510 // normal codegen conversions. For example, the value
13511 // could be a union and this would change its type, but
13512 // codegen assumes we won't do that.
13513 entry = recordEntries.ReconstructElementAt(idx);
13514 } else {
13515 // Safe to do an infallible append here, because we did a
13516 // SetCapacity above to the right capacity.
13517 entry = recordEntries.AppendElement();
13518 }
13519 entry->mKey = propName;
13520 nsCString& slot = entry->mValue;
13521 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
13522 return false;
13523 }
13524 }
13525 } else {
13526 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13527 return false;
13528 }
13529 // NOTE: This assert does NOT call the function.
13530 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUTF8StringRecord(Constify(arg0)))>, "Should be returning void here");
13531 MOZ_KnownLive(self)(self)->PassUTF8StringRecord(Constify(arg0));
13532 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13532); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13532; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13533 args.rval().setUndefined();
13534 return true;
13535}
13536
13537static const JSJitInfo passUTF8StringRecord_methodinfo = {
13538 { (JSJitGetterOp)passUTF8StringRecord },
13539 { prototypes::id::TestExampleInterface },
13540 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13541 JSJitInfo::Method,
13542 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13543 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13544 false, /* isInfallible. False in setters. */
13545 false, /* isMovable. Not relevant for setters. */
13546 false, /* isEliminatable. Not relevant for setters. */
13547 false, /* isAlwaysInSlot. Only relevant for getters. */
13548 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13549 false, /* isTypedMethod. Only relevant for methods. */
13550 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13551};
13552
13553MOZ_CAN_RUN_SCRIPT static bool
13554passRecordOfRecords(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13555{
13556 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfRecords");
13557 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13560( cx, "TestExampleInterface"
, "passRecordOfRecords", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13558 "TestExampleInterface", "passRecordOfRecords", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13560( cx, "TestExampleInterface"
, "passRecordOfRecords", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13559 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13560( cx, "TestExampleInterface"
, "passRecordOfRecords", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13560 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13560( cx, "TestExampleInterface"
, "passRecordOfRecords", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
13561
13562 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13563 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfRecords", 1)) {
13564 return false;
13565 }
13566 Record<nsString, Record<nsString, int32_t>> arg0;
13567 if (args[0].isObject()) {
13568 auto& recordEntries = arg0.Entries();
13569
13570 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13571 JS::RootedVector<jsid> ids(cx);
13572 if (!js::GetPropertyKeys(cx, recordObj,
13573 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13574 return false;
13575 }
13576 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13577 JS_ReportOutOfMemory(cx);
13578 return false;
13579 }
13580 JS::Rooted<JS::Value> propNameValue(cx);
13581 JS::Rooted<JS::Value> temp(cx);
13582 JS::Rooted<jsid> curId(cx);
13583 JS::Rooted<JS::Value> idVal(cx);
13584 // Use a hashset to keep track of ids seen, to avoid
13585 // introducing nasty O(N^2) behavior scanning for them all the
13586 // time. Ideally we'd use a data structure with O(1) lookup
13587 // _and_ ordering for the MozMap, but we don't have one lying
13588 // around.
13589 nsTHashtable<nsStringHashKey> idsSeen;
13590 for (size_t i = 0; i < ids.length(); ++i) {
13591 curId = ids[i];
13592
13593 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13594 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13595 &desc)) {
13596 return false;
13597 }
13598
13599 if (desc.isNothing() || !desc->enumerable()) {
13600 continue;
13601 }
13602
13603 idVal = js::IdToValue(curId);
13604 nsString propName;
13605 // This will just throw if idVal is a Symbol, like the spec says
13606 // to do.
13607 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13608 return false;
13609 }
13610
13611 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13612 return false;
13613 }
13614
13615 Record<nsString, Record<nsString, int32_t>>::EntryType* entry;
13616 if (!idsSeen.EnsureInserted(propName)) {
13617 // Find the existing entry.
13618 auto idx = recordEntries.IndexOf(propName);
13619 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?" ")"
, "../TestExampleGenBinding.cpp", 13620); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13620; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13620 "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?" ")"
, "../TestExampleGenBinding.cpp", 13620); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13620; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13621 // Now blow it away to make it look like it was just added
13622 // to the array, because it's not obvious that it's
13623 // safe to write to its already-initialized mValue via our
13624 // normal codegen conversions. For example, the value
13625 // could be a union and this would change its type, but
13626 // codegen assumes we won't do that.
13627 entry = recordEntries.ReconstructElementAt(idx);
13628 } else {
13629 // Safe to do an infallible append here, because we did a
13630 // SetCapacity above to the right capacity.
13631 entry = recordEntries.AppendElement();
13632 }
13633 entry->mKey = propName;
13634 Record<nsString, int32_t>& slot = entry->mValue;
13635 if (temp.isObject()) {
13636 auto& recordEntries = slot.Entries();
13637
13638 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
13639 JS::RootedVector<jsid> ids(cx);
13640 if (!js::GetPropertyKeys(cx, recordObj,
13641 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13642 return false;
13643 }
13644 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13645 JS_ReportOutOfMemory(cx);
13646 return false;
13647 }
13648 JS::Rooted<JS::Value> propNameValue(cx);
13649 JS::Rooted<JS::Value> temp(cx);
13650 JS::Rooted<jsid> curId(cx);
13651 JS::Rooted<JS::Value> idVal(cx);
13652 // Use a hashset to keep track of ids seen, to avoid
13653 // introducing nasty O(N^2) behavior scanning for them all the
13654 // time. Ideally we'd use a data structure with O(1) lookup
13655 // _and_ ordering for the MozMap, but we don't have one lying
13656 // around.
13657 nsTHashtable<nsStringHashKey> idsSeen;
13658 for (size_t i = 0; i < ids.length(); ++i) {
13659 curId = ids[i];
13660
13661 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13662 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13663 &desc)) {
13664 return false;
13665 }
13666
13667 if (desc.isNothing() || !desc->enumerable()) {
13668 continue;
13669 }
13670
13671 idVal = js::IdToValue(curId);
13672 nsString propName;
13673 // This will just throw if idVal is a Symbol, like the spec says
13674 // to do.
13675 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
13676 return false;
13677 }
13678
13679 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13680 return false;
13681 }
13682
13683 Record<nsString, int32_t>::EntryType* entry;
13684 if (!idsSeen.EnsureInserted(propName)) {
13685 // Find the existing entry.
13686 auto idx = recordEntries.IndexOf(propName);
13687 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?" ")"
, "../TestExampleGenBinding.cpp", 13688); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13688; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13688 "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?" ")"
, "../TestExampleGenBinding.cpp", 13688); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13688; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13689 // Now blow it away to make it look like it was just added
13690 // to the array, because it's not obvious that it's
13691 // safe to write to its already-initialized mValue via our
13692 // normal codegen conversions. For example, the value
13693 // could be a union and this would change its type, but
13694 // codegen assumes we won't do that.
13695 entry = recordEntries.ReconstructElementAt(idx);
13696 } else {
13697 // Safe to do an infallible append here, because we did a
13698 // SetCapacity above to the right capacity.
13699 entry = recordEntries.AppendElement();
13700 }
13701 entry->mKey = propName;
13702 int32_t& slot = entry->mValue;
13703 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in value in argument 1", &slot)) {
13704 return false;
13705 }
13706 }
13707 } else {
13708 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
13709 return false;
13710 }
13711 }
13712 } else {
13713 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13714 return false;
13715 }
13716 // NOTE: This assert does NOT call the function.
13717 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfRecords(Constify(arg0)))>, "Should be returning void here");
13718 MOZ_KnownLive(self)(self)->PassRecordOfRecords(Constify(arg0));
13719 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13719); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13719; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13720 args.rval().setUndefined();
13721 return true;
13722}
13723
13724static const JSJitInfo passRecordOfRecords_methodinfo = {
13725 { (JSJitGetterOp)passRecordOfRecords },
13726 { prototypes::id::TestExampleInterface },
13727 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13728 JSJitInfo::Method,
13729 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13730 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13731 false, /* isInfallible. False in setters. */
13732 false, /* isMovable. Not relevant for setters. */
13733 false, /* isEliminatable. Not relevant for setters. */
13734 false, /* isAlwaysInSlot. Only relevant for getters. */
13735 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13736 false, /* isTypedMethod. Only relevant for methods. */
13737 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13738};
13739
13740MOZ_CAN_RUN_SCRIPT static bool
13741receiveRecord(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13742{
13743 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13746( cx, "TestExampleInterface"
, "receiveRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13744 "TestExampleInterface", "receiveRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13746( cx, "TestExampleInterface"
, "receiveRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13745 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13746( cx, "TestExampleInterface"
, "receiveRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13746 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13746( cx, "TestExampleInterface"
, "receiveRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
13747
13748 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13749 Record<nsString, int32_t> result;
13750 // NOTE: This assert does NOT call the function.
13751 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveRecord(result))>, "Should be returning void here");
13752 MOZ_KnownLive(self)(self)->ReceiveRecord(result);
13753 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13753); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13753; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13754
13755 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
13756 if (!returnObj) {
13757 return false;
13758 }
13759 // Scope for 'tmp'
13760 {
13761 JS::Rooted<JS::Value> tmp(cx);
13762 for (auto& entry : result.Entries()) {
13763 auto& recordValue0 = entry.mValue;
13764 // Control block to let us common up the JS_DefineUCProperty calls when there
13765 // are different ways to succeed at wrapping the value.
13766 do {
13767 tmp.setInt32(int32_t(recordValue0));
13768 break;
13769 } while (false);
13770 if (!JS_DefineUCProperty(cx, returnObj,
13771 entry.mKey.BeginReading(),
13772 entry.mKey.Length(), tmp,
13773 JSPROP_ENUMERATE)) {
13774 return false;
13775 }
13776 }
13777 }
13778 args.rval().setObject(*returnObj);
13779 return true;
13780}
13781
13782static const JSJitInfo receiveRecord_methodinfo = {
13783 { (JSJitGetterOp)receiveRecord },
13784 { prototypes::id::TestExampleInterface },
13785 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13786 JSJitInfo::Method,
13787 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13788 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
13789 false, /* isInfallible. False in setters. */
13790 false, /* isMovable. Not relevant for setters. */
13791 false, /* isEliminatable. Not relevant for setters. */
13792 false, /* isAlwaysInSlot. Only relevant for getters. */
13793 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13794 false, /* isTypedMethod. Only relevant for methods. */
13795 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13796};
13797
13798MOZ_CAN_RUN_SCRIPT static bool
13799receiveNullableRecord(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13800{
13801 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13804( cx, "TestExampleInterface"
, "receiveNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13802 "TestExampleInterface", "receiveNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13804( cx, "TestExampleInterface"
, "receiveNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13803 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13804( cx, "TestExampleInterface"
, "receiveNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13804 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13804( cx, "TestExampleInterface"
, "receiveNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
13805
13806 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13807 Nullable<Record<nsString, int32_t>> result;
13808 // NOTE: This assert does NOT call the function.
13809 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableRecord(result))>, "Should be returning void here");
13810 MOZ_KnownLive(self)(self)->ReceiveNullableRecord(result);
13811 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13811); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13811; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13812
13813 if (result.IsNull()) {
13814 args.rval().setNull();
13815 return true;
13816 }
13817
13818 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
13819 if (!returnObj) {
13820 return false;
13821 }
13822 // Scope for 'tmp'
13823 {
13824 JS::Rooted<JS::Value> tmp(cx);
13825 for (auto& entry : result.Value().Entries()) {
13826 auto& recordValue0 = entry.mValue;
13827 // Control block to let us common up the JS_DefineUCProperty calls when there
13828 // are different ways to succeed at wrapping the value.
13829 do {
13830 tmp.setInt32(int32_t(recordValue0));
13831 break;
13832 } while (false);
13833 if (!JS_DefineUCProperty(cx, returnObj,
13834 entry.mKey.BeginReading(),
13835 entry.mKey.Length(), tmp,
13836 JSPROP_ENUMERATE)) {
13837 return false;
13838 }
13839 }
13840 }
13841 args.rval().setObject(*returnObj);
13842 return true;
13843}
13844
13845static const JSJitInfo receiveNullableRecord_methodinfo = {
13846 { (JSJitGetterOp)receiveNullableRecord },
13847 { prototypes::id::TestExampleInterface },
13848 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13849 JSJitInfo::Method,
13850 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13851 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
13852 false, /* isInfallible. False in setters. */
13853 false, /* isMovable. Not relevant for setters. */
13854 false, /* isEliminatable. Not relevant for setters. */
13855 false, /* isAlwaysInSlot. Only relevant for getters. */
13856 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13857 false, /* isTypedMethod. Only relevant for methods. */
13858 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13859};
13860
13861MOZ_CAN_RUN_SCRIPT static bool
13862receiveRecordOfNullableInts(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13863{
13864 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13867( cx, "TestExampleInterface"
, "receiveRecordOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13865 "TestExampleInterface", "receiveRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13867( cx, "TestExampleInterface"
, "receiveRecordOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13866 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13867( cx, "TestExampleInterface"
, "receiveRecordOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13867 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13867( cx, "TestExampleInterface"
, "receiveRecordOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13868
13869 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13870 Record<nsString, Nullable<int32_t>> result;
13871 // NOTE: This assert does NOT call the function.
13872 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveRecordOfNullableInts(result))>, "Should be returning void here");
13873 MOZ_KnownLive(self)(self)->ReceiveRecordOfNullableInts(result);
13874 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13874); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13874; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13875
13876 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
13877 if (!returnObj) {
13878 return false;
13879 }
13880 // Scope for 'tmp'
13881 {
13882 JS::Rooted<JS::Value> tmp(cx);
13883 for (auto& entry : result.Entries()) {
13884 auto& recordValue0 = entry.mValue;
13885 // Control block to let us common up the JS_DefineUCProperty calls when there
13886 // are different ways to succeed at wrapping the value.
13887 do {
13888 if (recordValue0.IsNull()) {
13889 tmp.setNull();
13890 break;
13891 }
13892 tmp.setInt32(int32_t(recordValue0.Value()));
13893 break;
13894 } while (false);
13895 if (!JS_DefineUCProperty(cx, returnObj,
13896 entry.mKey.BeginReading(),
13897 entry.mKey.Length(), tmp,
13898 JSPROP_ENUMERATE)) {
13899 return false;
13900 }
13901 }
13902 }
13903 args.rval().setObject(*returnObj);
13904 return true;
13905}
13906
13907static const JSJitInfo receiveRecordOfNullableInts_methodinfo = {
13908 { (JSJitGetterOp)receiveRecordOfNullableInts },
13909 { prototypes::id::TestExampleInterface },
13910 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13911 JSJitInfo::Method,
13912 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13913 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
13914 false, /* isInfallible. False in setters. */
13915 false, /* isMovable. Not relevant for setters. */
13916 false, /* isEliminatable. Not relevant for setters. */
13917 false, /* isAlwaysInSlot. Only relevant for getters. */
13918 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13919 false, /* isTypedMethod. Only relevant for methods. */
13920 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13921};
13922
13923MOZ_CAN_RUN_SCRIPT static bool
13924receiveNullableRecordOfNullableInts(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13925{
13926 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13929( cx, "TestExampleInterface"
, "receiveNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13927 "TestExampleInterface", "receiveNullableRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13929( cx, "TestExampleInterface"
, "receiveNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13928 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13929( cx, "TestExampleInterface"
, "receiveNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13929 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13929( cx, "TestExampleInterface"
, "receiveNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13930
13931 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13932 Nullable<Record<nsString, Nullable<int32_t>>> result;
13933 // NOTE: This assert does NOT call the function.
13934 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableRecordOfNullableInts(result))>, "Should be returning void here");
13935 MOZ_KnownLive(self)(self)->ReceiveNullableRecordOfNullableInts(result);
13936 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 13936); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13936; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13937
13938 if (result.IsNull()) {
13939 args.rval().setNull();
13940 return true;
13941 }
13942
13943 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
13944 if (!returnObj) {
13945 return false;
13946 }
13947 // Scope for 'tmp'
13948 {
13949 JS::Rooted<JS::Value> tmp(cx);
13950 for (auto& entry : result.Value().Entries()) {
13951 auto& recordValue0 = entry.mValue;
13952 // Control block to let us common up the JS_DefineUCProperty calls when there
13953 // are different ways to succeed at wrapping the value.
13954 do {
13955 if (recordValue0.IsNull()) {
13956 tmp.setNull();
13957 break;
13958 }
13959 tmp.setInt32(int32_t(recordValue0.Value()));
13960 break;
13961 } while (false);
13962 if (!JS_DefineUCProperty(cx, returnObj,
13963 entry.mKey.BeginReading(),
13964 entry.mKey.Length(), tmp,
13965 JSPROP_ENUMERATE)) {
13966 return false;
13967 }
13968 }
13969 }
13970 args.rval().setObject(*returnObj);
13971 return true;
13972}
13973
13974static const JSJitInfo receiveNullableRecordOfNullableInts_methodinfo = {
13975 { (JSJitGetterOp)receiveNullableRecordOfNullableInts },
13976 { prototypes::id::TestExampleInterface },
13977 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
13978 JSJitInfo::Method,
13979 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13980 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
13981 false, /* isInfallible. False in setters. */
13982 false, /* isMovable. Not relevant for setters. */
13983 false, /* isEliminatable. Not relevant for setters. */
13984 false, /* isAlwaysInSlot. Only relevant for getters. */
13985 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13986 false, /* isTypedMethod. Only relevant for methods. */
13987 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13988};
13989
13990MOZ_CAN_RUN_SCRIPT static bool
13991receiveAnyRecord(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13992{
13993 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13996( cx, "TestExampleInterface"
, "receiveAnyRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13994 "TestExampleInterface", "receiveAnyRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13996( cx, "TestExampleInterface"
, "receiveAnyRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13995 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13996( cx, "TestExampleInterface"
, "receiveAnyRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13996 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13996( cx, "TestExampleInterface"
, "receiveAnyRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
13997
13998 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
13999 Record<nsString, JS::Value> result;
14000 RecordRooter<nsString, JS::Value> resultRooter(cx, &result);
14001 // NOTE: This assert does NOT call the function.
14002 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveAnyRecord(cx, result))>, "Should be returning void here");
14003 MOZ_KnownLive(self)(self)->ReceiveAnyRecord(cx, result);
14004 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14004); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14004; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14005
14006 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
14007 if (!returnObj) {
14008 return false;
14009 }
14010 // Scope for 'tmp'
14011 {
14012 JS::Rooted<JS::Value> tmp(cx);
14013 for (auto& entry : result.Entries()) {
14014 auto& recordValue0 = entry.mValue;
14015 // Control block to let us common up the JS_DefineUCProperty calls when there
14016 // are different ways to succeed at wrapping the value.
14017 do {
14018 JS::ExposeValueToActiveJS(recordValue0);
14019 tmp.set(recordValue0);
14020 if (!MaybeWrapValue(cx, &tmp)) {
14021 return false;
14022 }
14023 break;
14024 } while (false);
14025 if (!JS_DefineUCProperty(cx, returnObj,
14026 entry.mKey.BeginReading(),
14027 entry.mKey.Length(), tmp,
14028 JSPROP_ENUMERATE)) {
14029 return false;
14030 }
14031 }
14032 }
14033 args.rval().setObject(*returnObj);
14034 return true;
14035}
14036
14037static const JSJitInfo receiveAnyRecord_methodinfo = {
14038 { (JSJitGetterOp)receiveAnyRecord },
14039 { prototypes::id::TestExampleInterface },
14040 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14041 JSJitInfo::Method,
14042 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14043 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
14044 false, /* isInfallible. False in setters. */
14045 false, /* isMovable. Not relevant for setters. */
14046 false, /* isEliminatable. Not relevant for setters. */
14047 false, /* isAlwaysInSlot. Only relevant for getters. */
14048 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14049 false, /* isTypedMethod. Only relevant for methods. */
14050 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14051};
14052
14053MOZ_CAN_RUN_SCRIPT static bool
14054passArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14055{
14056 BindingCallContext cx(cx_, "TestExampleInterface.passArrayBuffer");
14057 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14060( cx, "TestExampleInterface"
, "passArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14058 "TestExampleInterface", "passArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14060( cx, "TestExampleInterface"
, "passArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14059 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14060( cx, "TestExampleInterface"
, "passArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14060 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14060( cx, "TestExampleInterface"
, "passArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14061
14062 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14063 if (!args.requireAtLeast(cx, "TestExampleInterface.passArrayBuffer", 1)) {
14064 return false;
14065 }
14066 RootedSpiderMonkeyInterface<ArrayBuffer> arg0(cx);
14067 if (args[0].isObject()) {
14068 if (!arg0.Init(&args[0].toObject())) {
14069 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBuffer");
14070 return false;
14071 }
14072 if (JS::IsSharedArrayBufferObject(arg0.Obj())) {
14073 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14074 return false;
14075 }
14076 if (JS::IsLargeArrayBufferMaybeShared(arg0.Obj())) {
14077 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14078 return false;
14079 }
14080 if (JS::IsResizableArrayBufferMaybeShared(arg0.Obj())) {
14081 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14082 return false;
14083 }
14084 } else {
14085 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14086 return false;
14087 }
14088 // NOTE: This assert does NOT call the function.
14089 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassArrayBuffer(Constify(arg0)))>, "Should be returning void here");
14090 MOZ_KnownLive(self)(self)->PassArrayBuffer(Constify(arg0));
14091 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14091); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14091; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14092 args.rval().setUndefined();
14093 return true;
14094}
14095
14096static const JSJitInfo passArrayBuffer_methodinfo = {
14097 { (JSJitGetterOp)passArrayBuffer },
14098 { prototypes::id::TestExampleInterface },
14099 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14100 JSJitInfo::Method,
14101 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14102 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14103 false, /* isInfallible. False in setters. */
14104 false, /* isMovable. Not relevant for setters. */
14105 false, /* isEliminatable. Not relevant for setters. */
14106 false, /* isAlwaysInSlot. Only relevant for getters. */
14107 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14108 false, /* isTypedMethod. Only relevant for methods. */
14109 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14110};
14111
14112MOZ_CAN_RUN_SCRIPT static bool
14113passNullableArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14114{
14115 BindingCallContext cx(cx_, "TestExampleInterface.passNullableArrayBuffer");
14116 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14119( cx, "TestExampleInterface"
, "passNullableArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14117 "TestExampleInterface", "passNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14119( cx, "TestExampleInterface"
, "passNullableArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14118 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14119( cx, "TestExampleInterface"
, "passNullableArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14119 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14119( cx, "TestExampleInterface"
, "passNullableArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14120
14121 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14122 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableArrayBuffer", 1)) {
14123 return false;
14124 }
14125 RootedSpiderMonkeyInterface<Nullable<ArrayBuffer>> arg0(cx);
14126 if (args[0].isObject()) {
14127 if (!arg0.SetValue().Init(&args[0].toObject())) {
14128 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferOrNull");
14129 return false;
14130 }
14131 if (JS::IsSharedArrayBufferObject(arg0.SetValue().Obj())) {
14132 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14133 return false;
14134 }
14135 if (JS::IsLargeArrayBufferMaybeShared(arg0.SetValue().Obj())) {
14136 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14137 return false;
14138 }
14139 if (JS::IsResizableArrayBufferMaybeShared(arg0.SetValue().Obj())) {
14140 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14141 return false;
14142 }
14143 } else if (args[0].isNullOrUndefined()) {
14144 arg0.SetNull();
14145 } else {
14146 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14147 return false;
14148 }
14149 // NOTE: This assert does NOT call the function.
14150 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableArrayBuffer(Constify(arg0)))>, "Should be returning void here");
14151 MOZ_KnownLive(self)(self)->PassNullableArrayBuffer(Constify(arg0));
14152 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14152); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14152; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14153 args.rval().setUndefined();
14154 return true;
14155}
14156
14157static const JSJitInfo passNullableArrayBuffer_methodinfo = {
14158 { (JSJitGetterOp)passNullableArrayBuffer },
14159 { prototypes::id::TestExampleInterface },
14160 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14161 JSJitInfo::Method,
14162 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14163 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14164 false, /* isInfallible. False in setters. */
14165 false, /* isMovable. Not relevant for setters. */
14166 false, /* isEliminatable. Not relevant for setters. */
14167 false, /* isAlwaysInSlot. Only relevant for getters. */
14168 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14169 false, /* isTypedMethod. Only relevant for methods. */
14170 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14171};
14172
14173MOZ_CAN_RUN_SCRIPT static bool
14174passOptionalArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14175{
14176 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalArrayBuffer");
14177 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14180( cx, "TestExampleInterface"
, "passOptionalArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14178 "TestExampleInterface", "passOptionalArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14180( cx, "TestExampleInterface"
, "passOptionalArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14179 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14180( cx, "TestExampleInterface"
, "passOptionalArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14180 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14180( cx, "TestExampleInterface"
, "passOptionalArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14181
14182 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14183 Optional<ArrayBuffer> arg0;
14184 Maybe<SpiderMonkeyInterfaceRooter<ArrayBuffer>> arg0_holder;
14185 if (args.hasDefined(0)) {
14186 arg0.Construct();
14187 arg0_holder.emplace(cx, &arg0.Value());
14188 if (args[0].isObject()) {
14189 if (!arg0.Value().Init(&args[0].toObject())) {
14190 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBuffer");
14191 return false;
14192 }
14193 if (JS::IsSharedArrayBufferObject(arg0.Value().Obj())) {
14194 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14195 return false;
14196 }
14197 if (JS::IsLargeArrayBufferMaybeShared(arg0.Value().Obj())) {
14198 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14199 return false;
14200 }
14201 if (JS::IsResizableArrayBufferMaybeShared(arg0.Value().Obj())) {
14202 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14203 return false;
14204 }
14205 } else {
14206 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14207 return false;
14208 }
14209 }
14210 // NOTE: This assert does NOT call the function.
14211 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalArrayBuffer(Constify(arg0)))>, "Should be returning void here");
14212 MOZ_KnownLive(self)(self)->PassOptionalArrayBuffer(Constify(arg0));
14213 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14213); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14213; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14214 args.rval().setUndefined();
14215 return true;
14216}
14217
14218static const JSJitInfo passOptionalArrayBuffer_methodinfo = {
14219 { (JSJitGetterOp)passOptionalArrayBuffer },
14220 { prototypes::id::TestExampleInterface },
14221 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14222 JSJitInfo::Method,
14223 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14224 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14225 false, /* isInfallible. False in setters. */
14226 false, /* isMovable. Not relevant for setters. */
14227 false, /* isEliminatable. Not relevant for setters. */
14228 false, /* isAlwaysInSlot. Only relevant for getters. */
14229 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14230 false, /* isTypedMethod. Only relevant for methods. */
14231 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14232};
14233
14234MOZ_CAN_RUN_SCRIPT static bool
14235passOptionalNullableArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14236{
14237 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableArrayBuffer");
14238 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14241( cx, "TestExampleInterface"
, "passOptionalNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14239 "TestExampleInterface", "passOptionalNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14241( cx, "TestExampleInterface"
, "passOptionalNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14240 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14241( cx, "TestExampleInterface"
, "passOptionalNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14241 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14241( cx, "TestExampleInterface"
, "passOptionalNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
14242
14243 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14244 Optional<Nullable<ArrayBuffer>> arg0;
14245 Maybe<SpiderMonkeyInterfaceRooter<ArrayBuffer>> arg0_holder;
14246 if (args.hasDefined(0)) {
14247 arg0.Construct();
14248 arg0_holder.emplace(cx, &arg0.Value().SetValue());
14249 if (args[0].isObject()) {
14250 if (!arg0.Value().SetValue().Init(&args[0].toObject())) {
14251 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferOrNull");
14252 return false;
14253 }
14254 if (JS::IsSharedArrayBufferObject(arg0.Value().SetValue().Obj())) {
14255 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14256 return false;
14257 }
14258 if (JS::IsLargeArrayBufferMaybeShared(arg0.Value().SetValue().Obj())) {
14259 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14260 return false;
14261 }
14262 if (JS::IsResizableArrayBufferMaybeShared(arg0.Value().SetValue().Obj())) {
14263 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14264 return false;
14265 }
14266 } else if (args[0].isNullOrUndefined()) {
14267 arg0.Value().SetNull();
14268 } else {
14269 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14270 return false;
14271 }
14272 }
14273 // NOTE: This assert does NOT call the function.
14274 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableArrayBuffer(Constify(arg0)))>, "Should be returning void here");
14275 MOZ_KnownLive(self)(self)->PassOptionalNullableArrayBuffer(Constify(arg0));
14276 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14276); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14276; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14277 args.rval().setUndefined();
14278 return true;
14279}
14280
14281static const JSJitInfo passOptionalNullableArrayBuffer_methodinfo = {
14282 { (JSJitGetterOp)passOptionalNullableArrayBuffer },
14283 { prototypes::id::TestExampleInterface },
14284 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14285 JSJitInfo::Method,
14286 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14287 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14288 false, /* isInfallible. False in setters. */
14289 false, /* isMovable. Not relevant for setters. */
14290 false, /* isEliminatable. Not relevant for setters. */
14291 false, /* isAlwaysInSlot. Only relevant for getters. */
14292 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14293 false, /* isTypedMethod. Only relevant for methods. */
14294 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14295};
14296
14297MOZ_CAN_RUN_SCRIPT static bool
14298passOptionalNullableArrayBufferWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14299{
14300 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableArrayBufferWithDefaultValue");
14301 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14304( cx, "TestExampleInterface"
, "passOptionalNullableArrayBufferWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14302 "TestExampleInterface", "passOptionalNullableArrayBufferWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14304( cx, "TestExampleInterface"
, "passOptionalNullableArrayBufferWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14303 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14304( cx, "TestExampleInterface"
, "passOptionalNullableArrayBufferWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14304 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14304( cx, "TestExampleInterface"
, "passOptionalNullableArrayBufferWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
14305
14306 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14307 RootedSpiderMonkeyInterface<Nullable<ArrayBuffer>> arg0(cx);
14308 if (args.hasDefined(0)) {
14309 if (args[0].isObject()) {
14310 if (!arg0.SetValue().Init(&args[0].toObject())) {
14311 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferOrNull");
14312 return false;
14313 }
14314 if (JS::IsSharedArrayBufferObject(arg0.SetValue().Obj())) {
14315 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14316 return false;
14317 }
14318 if (JS::IsLargeArrayBufferMaybeShared(arg0.SetValue().Obj())) {
14319 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14320 return false;
14321 }
14322 if (JS::IsResizableArrayBufferMaybeShared(arg0.SetValue().Obj())) {
14323 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14324 return false;
14325 }
14326 } else if (args[0].isNullOrUndefined()) {
14327 arg0.SetNull();
14328 } else {
14329 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14330 return false;
14331 }
14332 } else {
14333 arg0.SetNull();
14334 }
14335 // NOTE: This assert does NOT call the function.
14336 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableArrayBufferWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
14337 MOZ_KnownLive(self)(self)->PassOptionalNullableArrayBufferWithDefaultValue(Constify(arg0));
14338 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14338); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14338; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14339 args.rval().setUndefined();
14340 return true;
14341}
14342
14343static const JSJitInfo passOptionalNullableArrayBufferWithDefaultValue_methodinfo = {
14344 { (JSJitGetterOp)passOptionalNullableArrayBufferWithDefaultValue },
14345 { prototypes::id::TestExampleInterface },
14346 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14347 JSJitInfo::Method,
14348 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14349 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14350 false, /* isInfallible. False in setters. */
14351 false, /* isMovable. Not relevant for setters. */
14352 false, /* isEliminatable. Not relevant for setters. */
14353 false, /* isAlwaysInSlot. Only relevant for getters. */
14354 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14355 false, /* isTypedMethod. Only relevant for methods. */
14356 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14357};
14358
14359MOZ_CAN_RUN_SCRIPT static bool
14360passArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14361{
14362 BindingCallContext cx(cx_, "TestExampleInterface.passArrayBufferView");
14363 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14366( cx, "TestExampleInterface"
, "passArrayBufferView", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14364 "TestExampleInterface", "passArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14366( cx, "TestExampleInterface"
, "passArrayBufferView", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14365 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14366( cx, "TestExampleInterface"
, "passArrayBufferView", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14366 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14366( cx, "TestExampleInterface"
, "passArrayBufferView", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14367
14368 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14369 if (!args.requireAtLeast(cx, "TestExampleInterface.passArrayBufferView", 1)) {
14370 return false;
14371 }
14372 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
14373 if (args[0].isObject()) {
14374 if (!arg0.Init(&args[0].toObject())) {
14375 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferView");
14376 return false;
14377 }
14378 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14379 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14380 return false;
14381 }
14382 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14383 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14384 return false;
14385 }
14386 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14387 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14388 return false;
14389 }
14390 } else {
14391 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14392 return false;
14393 }
14394 // NOTE: This assert does NOT call the function.
14395 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassArrayBufferView(Constify(arg0)))>, "Should be returning void here");
14396 MOZ_KnownLive(self)(self)->PassArrayBufferView(Constify(arg0));
14397 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14397); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14397; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14398 args.rval().setUndefined();
14399 return true;
14400}
14401
14402static const JSJitInfo passArrayBufferView_methodinfo = {
14403 { (JSJitGetterOp)passArrayBufferView },
14404 { prototypes::id::TestExampleInterface },
14405 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14406 JSJitInfo::Method,
14407 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14408 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14409 false, /* isInfallible. False in setters. */
14410 false, /* isMovable. Not relevant for setters. */
14411 false, /* isEliminatable. Not relevant for setters. */
14412 false, /* isAlwaysInSlot. Only relevant for getters. */
14413 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14414 false, /* isTypedMethod. Only relevant for methods. */
14415 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14416};
14417
14418MOZ_CAN_RUN_SCRIPT static bool
14419passInt8Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14420{
14421 BindingCallContext cx(cx_, "TestExampleInterface.passInt8Array");
14422 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14425( cx, "TestExampleInterface"
, "passInt8Array", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14423 "TestExampleInterface", "passInt8Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14425( cx, "TestExampleInterface"
, "passInt8Array", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14424 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14425( cx, "TestExampleInterface"
, "passInt8Array", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14425 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14425( cx, "TestExampleInterface"
, "passInt8Array", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14426
14427 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14428 if (!args.requireAtLeast(cx, "TestExampleInterface.passInt8Array", 1)) {
14429 return false;
14430 }
14431 RootedSpiderMonkeyInterface<Int8Array> arg0(cx);
14432 if (args[0].isObject()) {
14433 if (!arg0.Init(&args[0].toObject())) {
14434 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Int8Array");
14435 return false;
14436 }
14437 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14438 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14439 return false;
14440 }
14441 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14442 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14443 return false;
14444 }
14445 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14446 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14447 return false;
14448 }
14449 } else {
14450 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14451 return false;
14452 }
14453 // NOTE: This assert does NOT call the function.
14454 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassInt8Array(Constify(arg0)))>, "Should be returning void here");
14455 MOZ_KnownLive(self)(self)->PassInt8Array(Constify(arg0));
14456 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14456); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14456; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14457 args.rval().setUndefined();
14458 return true;
14459}
14460
14461static const JSJitInfo passInt8Array_methodinfo = {
14462 { (JSJitGetterOp)passInt8Array },
14463 { prototypes::id::TestExampleInterface },
14464 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14465 JSJitInfo::Method,
14466 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14467 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14468 false, /* isInfallible. False in setters. */
14469 false, /* isMovable. Not relevant for setters. */
14470 false, /* isEliminatable. Not relevant for setters. */
14471 false, /* isAlwaysInSlot. Only relevant for getters. */
14472 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14473 false, /* isTypedMethod. Only relevant for methods. */
14474 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14475};
14476
14477MOZ_CAN_RUN_SCRIPT static bool
14478passInt16Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14479{
14480 BindingCallContext cx(cx_, "TestExampleInterface.passInt16Array");
14481 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14484( cx, "TestExampleInterface"
, "passInt16Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14482 "TestExampleInterface", "passInt16Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14484( cx, "TestExampleInterface"
, "passInt16Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14483 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14484( cx, "TestExampleInterface"
, "passInt16Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14484 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14484( cx, "TestExampleInterface"
, "passInt16Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14485
14486 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14487 if (!args.requireAtLeast(cx, "TestExampleInterface.passInt16Array", 1)) {
14488 return false;
14489 }
14490 RootedSpiderMonkeyInterface<Int16Array> arg0(cx);
14491 if (args[0].isObject()) {
14492 if (!arg0.Init(&args[0].toObject())) {
14493 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Int16Array");
14494 return false;
14495 }
14496 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14497 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14498 return false;
14499 }
14500 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14501 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14502 return false;
14503 }
14504 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14505 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14506 return false;
14507 }
14508 } else {
14509 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14510 return false;
14511 }
14512 // NOTE: This assert does NOT call the function.
14513 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassInt16Array(Constify(arg0)))>, "Should be returning void here");
14514 MOZ_KnownLive(self)(self)->PassInt16Array(Constify(arg0));
14515 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14515); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14515; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14516 args.rval().setUndefined();
14517 return true;
14518}
14519
14520static const JSJitInfo passInt16Array_methodinfo = {
14521 { (JSJitGetterOp)passInt16Array },
14522 { prototypes::id::TestExampleInterface },
14523 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14524 JSJitInfo::Method,
14525 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14526 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14527 false, /* isInfallible. False in setters. */
14528 false, /* isMovable. Not relevant for setters. */
14529 false, /* isEliminatable. Not relevant for setters. */
14530 false, /* isAlwaysInSlot. Only relevant for getters. */
14531 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14532 false, /* isTypedMethod. Only relevant for methods. */
14533 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14534};
14535
14536MOZ_CAN_RUN_SCRIPT static bool
14537passInt32Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14538{
14539 BindingCallContext cx(cx_, "TestExampleInterface.passInt32Array");
14540 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14543( cx, "TestExampleInterface"
, "passInt32Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14541 "TestExampleInterface", "passInt32Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14543( cx, "TestExampleInterface"
, "passInt32Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14542 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14543( cx, "TestExampleInterface"
, "passInt32Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14543 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14543( cx, "TestExampleInterface"
, "passInt32Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14544
14545 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14546 if (!args.requireAtLeast(cx, "TestExampleInterface.passInt32Array", 1)) {
14547 return false;
14548 }
14549 RootedSpiderMonkeyInterface<Int32Array> arg0(cx);
14550 if (args[0].isObject()) {
14551 if (!arg0.Init(&args[0].toObject())) {
14552 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Int32Array");
14553 return false;
14554 }
14555 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14556 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14557 return false;
14558 }
14559 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14560 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14561 return false;
14562 }
14563 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14564 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14565 return false;
14566 }
14567 } else {
14568 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14569 return false;
14570 }
14571 // NOTE: This assert does NOT call the function.
14572 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassInt32Array(Constify(arg0)))>, "Should be returning void here");
14573 MOZ_KnownLive(self)(self)->PassInt32Array(Constify(arg0));
14574 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14574); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14574; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14575 args.rval().setUndefined();
14576 return true;
14577}
14578
14579static const JSJitInfo passInt32Array_methodinfo = {
14580 { (JSJitGetterOp)passInt32Array },
14581 { prototypes::id::TestExampleInterface },
14582 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14583 JSJitInfo::Method,
14584 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14585 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14586 false, /* isInfallible. False in setters. */
14587 false, /* isMovable. Not relevant for setters. */
14588 false, /* isEliminatable. Not relevant for setters. */
14589 false, /* isAlwaysInSlot. Only relevant for getters. */
14590 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14591 false, /* isTypedMethod. Only relevant for methods. */
14592 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14593};
14594
14595MOZ_CAN_RUN_SCRIPT static bool
14596passUint8Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14597{
14598 BindingCallContext cx(cx_, "TestExampleInterface.passUint8Array");
14599 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14602( cx, "TestExampleInterface"
, "passUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14600 "TestExampleInterface", "passUint8Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14602( cx, "TestExampleInterface"
, "passUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14601 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14602( cx, "TestExampleInterface"
, "passUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14602 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14602( cx, "TestExampleInterface"
, "passUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14603
14604 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14605 if (!args.requireAtLeast(cx, "TestExampleInterface.passUint8Array", 1)) {
14606 return false;
14607 }
14608 RootedSpiderMonkeyInterface<Uint8Array> arg0(cx);
14609 if (args[0].isObject()) {
14610 if (!arg0.Init(&args[0].toObject())) {
14611 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Uint8Array");
14612 return false;
14613 }
14614 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14615 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14616 return false;
14617 }
14618 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14619 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14620 return false;
14621 }
14622 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14623 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14624 return false;
14625 }
14626 } else {
14627 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14628 return false;
14629 }
14630 // NOTE: This assert does NOT call the function.
14631 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUint8Array(Constify(arg0)))>, "Should be returning void here");
14632 MOZ_KnownLive(self)(self)->PassUint8Array(Constify(arg0));
14633 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14633); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14633; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14634 args.rval().setUndefined();
14635 return true;
14636}
14637
14638static const JSJitInfo passUint8Array_methodinfo = {
14639 { (JSJitGetterOp)passUint8Array },
14640 { prototypes::id::TestExampleInterface },
14641 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14642 JSJitInfo::Method,
14643 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14644 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14645 false, /* isInfallible. False in setters. */
14646 false, /* isMovable. Not relevant for setters. */
14647 false, /* isEliminatable. Not relevant for setters. */
14648 false, /* isAlwaysInSlot. Only relevant for getters. */
14649 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14650 false, /* isTypedMethod. Only relevant for methods. */
14651 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14652};
14653
14654MOZ_CAN_RUN_SCRIPT static bool
14655passUint16Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14656{
14657 BindingCallContext cx(cx_, "TestExampleInterface.passUint16Array");
14658 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14661( cx, "TestExampleInterface"
, "passUint16Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14659 "TestExampleInterface", "passUint16Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14661( cx, "TestExampleInterface"
, "passUint16Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14660 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14661( cx, "TestExampleInterface"
, "passUint16Array", 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::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14661( cx, "TestExampleInterface"
, "passUint16Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14662
14663 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14664 if (!args.requireAtLeast(cx, "TestExampleInterface.passUint16Array", 1)) {
14665 return false;
14666 }
14667 RootedSpiderMonkeyInterface<Uint16Array> arg0(cx);
14668 if (args[0].isObject()) {
14669 if (!arg0.Init(&args[0].toObject())) {
14670 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Uint16Array");
14671 return false;
14672 }
14673 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14674 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14675 return false;
14676 }
14677 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14678 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14679 return false;
14680 }
14681 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14682 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14683 return false;
14684 }
14685 } else {
14686 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14687 return false;
14688 }
14689 // NOTE: This assert does NOT call the function.
14690 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUint16Array(Constify(arg0)))>, "Should be returning void here");
14691 MOZ_KnownLive(self)(self)->PassUint16Array(Constify(arg0));
14692 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14692); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14692; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14693 args.rval().setUndefined();
14694 return true;
14695}
14696
14697static const JSJitInfo passUint16Array_methodinfo = {
14698 { (JSJitGetterOp)passUint16Array },
14699 { prototypes::id::TestExampleInterface },
14700 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14701 JSJitInfo::Method,
14702 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14703 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14704 false, /* isInfallible. False in setters. */
14705 false, /* isMovable. Not relevant for setters. */
14706 false, /* isEliminatable. Not relevant for setters. */
14707 false, /* isAlwaysInSlot. Only relevant for getters. */
14708 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14709 false, /* isTypedMethod. Only relevant for methods. */
14710 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14711};
14712
14713MOZ_CAN_RUN_SCRIPT static bool
14714passUint32Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14715{
14716 BindingCallContext cx(cx_, "TestExampleInterface.passUint32Array");
14717 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14720( cx, "TestExampleInterface"
, "passUint32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14718 "TestExampleInterface", "passUint32Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14720( cx, "TestExampleInterface"
, "passUint32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14719 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14720( cx, "TestExampleInterface"
, "passUint32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14720 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14720( cx, "TestExampleInterface"
, "passUint32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14721
14722 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14723 if (!args.requireAtLeast(cx, "TestExampleInterface.passUint32Array", 1)) {
14724 return false;
14725 }
14726 RootedSpiderMonkeyInterface<Uint32Array> arg0(cx);
14727 if (args[0].isObject()) {
14728 if (!arg0.Init(&args[0].toObject())) {
14729 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Uint32Array");
14730 return false;
14731 }
14732 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14733 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14734 return false;
14735 }
14736 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14737 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14738 return false;
14739 }
14740 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14741 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14742 return false;
14743 }
14744 } else {
14745 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14746 return false;
14747 }
14748 // NOTE: This assert does NOT call the function.
14749 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUint32Array(Constify(arg0)))>, "Should be returning void here");
14750 MOZ_KnownLive(self)(self)->PassUint32Array(Constify(arg0));
14751 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14751); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14751; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14752 args.rval().setUndefined();
14753 return true;
14754}
14755
14756static const JSJitInfo passUint32Array_methodinfo = {
14757 { (JSJitGetterOp)passUint32Array },
14758 { prototypes::id::TestExampleInterface },
14759 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14760 JSJitInfo::Method,
14761 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14762 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14763 false, /* isInfallible. False in setters. */
14764 false, /* isMovable. Not relevant for setters. */
14765 false, /* isEliminatable. Not relevant for setters. */
14766 false, /* isAlwaysInSlot. Only relevant for getters. */
14767 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14768 false, /* isTypedMethod. Only relevant for methods. */
14769 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14770};
14771
14772MOZ_CAN_RUN_SCRIPT static bool
14773passUint8ClampedArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14774{
14775 BindingCallContext cx(cx_, "TestExampleInterface.passUint8ClampedArray");
14776 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14779( cx, "TestExampleInterface"
, "passUint8ClampedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14777 "TestExampleInterface", "passUint8ClampedArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14779( cx, "TestExampleInterface"
, "passUint8ClampedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14778 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14779( cx, "TestExampleInterface"
, "passUint8ClampedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14779 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14779( cx, "TestExampleInterface"
, "passUint8ClampedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14780
14781 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14782 if (!args.requireAtLeast(cx, "TestExampleInterface.passUint8ClampedArray", 1)) {
14783 return false;
14784 }
14785 RootedSpiderMonkeyInterface<Uint8ClampedArray> arg0(cx);
14786 if (args[0].isObject()) {
14787 if (!arg0.Init(&args[0].toObject())) {
14788 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Uint8ClampedArray");
14789 return false;
14790 }
14791 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14792 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14793 return false;
14794 }
14795 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14796 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14797 return false;
14798 }
14799 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14800 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14801 return false;
14802 }
14803 } else {
14804 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14805 return false;
14806 }
14807 // NOTE: This assert does NOT call the function.
14808 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUint8ClampedArray(Constify(arg0)))>, "Should be returning void here");
14809 MOZ_KnownLive(self)(self)->PassUint8ClampedArray(Constify(arg0));
14810 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14810); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14810; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14811 args.rval().setUndefined();
14812 return true;
14813}
14814
14815static const JSJitInfo passUint8ClampedArray_methodinfo = {
14816 { (JSJitGetterOp)passUint8ClampedArray },
14817 { prototypes::id::TestExampleInterface },
14818 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14819 JSJitInfo::Method,
14820 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14821 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14822 false, /* isInfallible. False in setters. */
14823 false, /* isMovable. Not relevant for setters. */
14824 false, /* isEliminatable. Not relevant for setters. */
14825 false, /* isAlwaysInSlot. Only relevant for getters. */
14826 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14827 false, /* isTypedMethod. Only relevant for methods. */
14828 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14829};
14830
14831MOZ_CAN_RUN_SCRIPT static bool
14832passFloat32Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14833{
14834 BindingCallContext cx(cx_, "TestExampleInterface.passFloat32Array");
14835 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14838( cx, "TestExampleInterface"
, "passFloat32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14836 "TestExampleInterface", "passFloat32Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14838( cx, "TestExampleInterface"
, "passFloat32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14837 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14838( cx, "TestExampleInterface"
, "passFloat32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14838 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14838( cx, "TestExampleInterface"
, "passFloat32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14839
14840 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14841 if (!args.requireAtLeast(cx, "TestExampleInterface.passFloat32Array", 1)) {
14842 return false;
14843 }
14844 RootedSpiderMonkeyInterface<Float32Array> arg0(cx);
14845 if (args[0].isObject()) {
14846 if (!arg0.Init(&args[0].toObject())) {
14847 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Float32Array");
14848 return false;
14849 }
14850 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14851 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14852 return false;
14853 }
14854 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14855 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14856 return false;
14857 }
14858 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14859 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14860 return false;
14861 }
14862 } else {
14863 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14864 return false;
14865 }
14866 // NOTE: This assert does NOT call the function.
14867 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassFloat32Array(Constify(arg0)))>, "Should be returning void here");
14868 MOZ_KnownLive(self)(self)->PassFloat32Array(Constify(arg0));
14869 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14869); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14869; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14870 args.rval().setUndefined();
14871 return true;
14872}
14873
14874static const JSJitInfo passFloat32Array_methodinfo = {
14875 { (JSJitGetterOp)passFloat32Array },
14876 { prototypes::id::TestExampleInterface },
14877 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14878 JSJitInfo::Method,
14879 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14880 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14881 false, /* isInfallible. False in setters. */
14882 false, /* isMovable. Not relevant for setters. */
14883 false, /* isEliminatable. Not relevant for setters. */
14884 false, /* isAlwaysInSlot. Only relevant for getters. */
14885 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14886 false, /* isTypedMethod. Only relevant for methods. */
14887 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14888};
14889
14890MOZ_CAN_RUN_SCRIPT static bool
14891passFloat64Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14892{
14893 BindingCallContext cx(cx_, "TestExampleInterface.passFloat64Array");
14894 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14897( cx, "TestExampleInterface"
, "passFloat64Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14895 "TestExampleInterface", "passFloat64Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14897( cx, "TestExampleInterface"
, "passFloat64Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14896 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14897( cx, "TestExampleInterface"
, "passFloat64Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14897 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14897( cx, "TestExampleInterface"
, "passFloat64Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14898
14899 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14900 if (!args.requireAtLeast(cx, "TestExampleInterface.passFloat64Array", 1)) {
14901 return false;
14902 }
14903 RootedSpiderMonkeyInterface<Float64Array> arg0(cx);
14904 if (args[0].isObject()) {
14905 if (!arg0.Init(&args[0].toObject())) {
14906 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Float64Array");
14907 return false;
14908 }
14909 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
14910 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
14911 return false;
14912 }
14913 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
14914 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
14915 return false;
14916 }
14917 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
14918 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
14919 return false;
14920 }
14921 } else {
14922 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14923 return false;
14924 }
14925 // NOTE: This assert does NOT call the function.
14926 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassFloat64Array(Constify(arg0)))>, "Should be returning void here");
14927 MOZ_KnownLive(self)(self)->PassFloat64Array(Constify(arg0));
14928 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 14928); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14928; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14929 args.rval().setUndefined();
14930 return true;
14931}
14932
14933static const JSJitInfo passFloat64Array_methodinfo = {
14934 { (JSJitGetterOp)passFloat64Array },
14935 { prototypes::id::TestExampleInterface },
14936 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
14937 JSJitInfo::Method,
14938 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14939 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14940 false, /* isInfallible. False in setters. */
14941 false, /* isMovable. Not relevant for setters. */
14942 false, /* isEliminatable. Not relevant for setters. */
14943 false, /* isAlwaysInSlot. Only relevant for getters. */
14944 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14945 false, /* isTypedMethod. Only relevant for methods. */
14946 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14947};
14948
14949MOZ_CAN_RUN_SCRIPT static bool
14950passSequenceOfArrayBuffers(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14951{
14952 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfArrayBuffers");
14953 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14956( cx, "TestExampleInterface"
, "passSequenceOfArrayBuffers", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14954 "TestExampleInterface", "passSequenceOfArrayBuffers", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14956( cx, "TestExampleInterface"
, "passSequenceOfArrayBuffers", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14955 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14956( cx, "TestExampleInterface"
, "passSequenceOfArrayBuffers", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14956 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14956( cx, "TestExampleInterface"
, "passSequenceOfArrayBuffers", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
14957
14958 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
14959 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfArrayBuffers", 1)) {
14960 return false;
14961 }
14962 binding_detail::AutoSequence<ArrayBuffer> arg0;
14963 SequenceRooter<ArrayBuffer> arg0_holder(cx, &arg0);
14964 if (args[0].isObject()) {
14965 JS::ForOfIterator iter(cx);
14966 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
14967 return false;
14968 }
14969 if (!iter.valueIsIterable()) {
14970 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
14971 return false;
14972 }
14973 binding_detail::AutoSequence<ArrayBuffer> &arr = arg0;
14974 JS::Rooted<JS::Value> temp(cx);
14975 while (true) {
14976 bool done;
14977 if (!iter.next(&temp, &done)) {
14978 return false;
14979 }
14980 if (done) {
14981 break;
14982 }
14983 ArrayBuffer* slotPtr = arr.AppendElement(mozilla::fallible);
14984 if (!slotPtr) {
14985 JS_ReportOutOfMemory(cx);
14986 return false;
14987 }
14988 ArrayBuffer& slot = *slotPtr;
14989 if (temp.isObject()) {
14990 if (!slot.Init(&temp.toObject())) {
14991 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "ArrayBuffer");
14992 return false;
14993 }
14994 if (JS::IsSharedArrayBufferObject(slot.Obj())) {
14995 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Element of argument 1");
14996 return false;
14997 }
14998 if (JS::IsLargeArrayBufferMaybeShared(slot.Obj())) {
14999 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Element of argument 1");
15000 return false;
15001 }
15002 if (JS::IsResizableArrayBufferMaybeShared(slot.Obj())) {
15003 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Element of argument 1");
15004 return false;
15005 }
15006 } else {
15007 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
15008 return false;
15009 }
15010 }
15011 } else {
15012 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
15013 return false;
15014 }
15015 // NOTE: This assert does NOT call the function.
15016 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfArrayBuffers(Constify(arg0)))>, "Should be returning void here");
15017 MOZ_KnownLive(self)(self)->PassSequenceOfArrayBuffers(Constify(arg0));
15018 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15018); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15018; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15019 args.rval().setUndefined();
15020 return true;
15021}
15022
15023static const JSJitInfo passSequenceOfArrayBuffers_methodinfo = {
15024 { (JSJitGetterOp)passSequenceOfArrayBuffers },
15025 { prototypes::id::TestExampleInterface },
15026 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15027 JSJitInfo::Method,
15028 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15029 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15030 false, /* isInfallible. False in setters. */
15031 false, /* isMovable. Not relevant for setters. */
15032 false, /* isEliminatable. Not relevant for setters. */
15033 false, /* isAlwaysInSlot. Only relevant for getters. */
15034 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15035 false, /* isTypedMethod. Only relevant for methods. */
15036 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15037};
15038
15039MOZ_CAN_RUN_SCRIPT static bool
15040passSequenceOfNullableArrayBuffers(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15041{
15042 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfNullableArrayBuffers");
15043 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15046( cx, "TestExampleInterface"
, "passSequenceOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15044 "TestExampleInterface", "passSequenceOfNullableArrayBuffers", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15046( cx, "TestExampleInterface"
, "passSequenceOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15045 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15046( cx, "TestExampleInterface"
, "passSequenceOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15046 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15046( cx, "TestExampleInterface"
, "passSequenceOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15047
15048 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15049 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfNullableArrayBuffers", 1)) {
15050 return false;
15051 }
15052 binding_detail::AutoSequence<Nullable<ArrayBuffer>> arg0;
15053 SequenceRooter<Nullable<ArrayBuffer>> arg0_holder(cx, &arg0);
15054 if (args[0].isObject()) {
15055 JS::ForOfIterator iter(cx);
15056 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
15057 return false;
15058 }
15059 if (!iter.valueIsIterable()) {
15060 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
15061 return false;
15062 }
15063 binding_detail::AutoSequence<Nullable<ArrayBuffer>> &arr = arg0;
15064 JS::Rooted<JS::Value> temp(cx);
15065 while (true) {
15066 bool done;
15067 if (!iter.next(&temp, &done)) {
15068 return false;
15069 }
15070 if (done) {
15071 break;
15072 }
15073 Nullable<ArrayBuffer>* slotPtr = arr.AppendElement(mozilla::fallible);
15074 if (!slotPtr) {
15075 JS_ReportOutOfMemory(cx);
15076 return false;
15077 }
15078 Nullable<ArrayBuffer>& slot = *slotPtr;
15079 if (temp.isObject()) {
15080 if (!slot.SetValue().Init(&temp.toObject())) {
15081 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "ArrayBufferOrNull");
15082 return false;
15083 }
15084 if (JS::IsSharedArrayBufferObject(slot.SetValue().Obj())) {
15085 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Element of argument 1");
15086 return false;
15087 }
15088 if (JS::IsLargeArrayBufferMaybeShared(slot.SetValue().Obj())) {
15089 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Element of argument 1");
15090 return false;
15091 }
15092 if (JS::IsResizableArrayBufferMaybeShared(slot.SetValue().Obj())) {
15093 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Element of argument 1");
15094 return false;
15095 }
15096 } else if (temp.isNullOrUndefined()) {
15097 slot.SetNull();
15098 } else {
15099 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
15100 return false;
15101 }
15102 }
15103 } else {
15104 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
15105 return false;
15106 }
15107 // NOTE: This assert does NOT call the function.
15108 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableArrayBuffers(Constify(arg0)))>, "Should be returning void here");
15109 MOZ_KnownLive(self)(self)->PassSequenceOfNullableArrayBuffers(Constify(arg0));
15110 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15110); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15110; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15111 args.rval().setUndefined();
15112 return true;
15113}
15114
15115static const JSJitInfo passSequenceOfNullableArrayBuffers_methodinfo = {
15116 { (JSJitGetterOp)passSequenceOfNullableArrayBuffers },
15117 { prototypes::id::TestExampleInterface },
15118 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15119 JSJitInfo::Method,
15120 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15121 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15122 false, /* isInfallible. False in setters. */
15123 false, /* isMovable. Not relevant for setters. */
15124 false, /* isEliminatable. Not relevant for setters. */
15125 false, /* isAlwaysInSlot. Only relevant for getters. */
15126 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15127 false, /* isTypedMethod. Only relevant for methods. */
15128 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15129};
15130
15131MOZ_CAN_RUN_SCRIPT static bool
15132passRecordOfArrayBuffers(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15133{
15134 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfArrayBuffers");
15135 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15138( cx, "TestExampleInterface"
, "passRecordOfArrayBuffers", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15136 "TestExampleInterface", "passRecordOfArrayBuffers", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15138( cx, "TestExampleInterface"
, "passRecordOfArrayBuffers", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15137 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15138( cx, "TestExampleInterface"
, "passRecordOfArrayBuffers", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15138 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15138( cx, "TestExampleInterface"
, "passRecordOfArrayBuffers", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15139
15140 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15141 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfArrayBuffers", 1)) {
15142 return false;
15143 }
15144 Record<nsString, ArrayBuffer> arg0;
15145 RecordRooter<nsString, ArrayBuffer> arg0_holder(cx, &arg0);
15146 if (args[0].isObject()) {
15147 auto& recordEntries = arg0.Entries();
15148
15149 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
15150 JS::RootedVector<jsid> ids(cx);
15151 if (!js::GetPropertyKeys(cx, recordObj,
15152 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
15153 return false;
15154 }
15155 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
15156 JS_ReportOutOfMemory(cx);
15157 return false;
15158 }
15159 JS::Rooted<JS::Value> propNameValue(cx);
15160 JS::Rooted<JS::Value> temp(cx);
15161 JS::Rooted<jsid> curId(cx);
15162 JS::Rooted<JS::Value> idVal(cx);
15163 // Use a hashset to keep track of ids seen, to avoid
15164 // introducing nasty O(N^2) behavior scanning for them all the
15165 // time. Ideally we'd use a data structure with O(1) lookup
15166 // _and_ ordering for the MozMap, but we don't have one lying
15167 // around.
15168 nsTHashtable<nsStringHashKey> idsSeen;
15169 for (size_t i = 0; i < ids.length(); ++i) {
15170 curId = ids[i];
15171
15172 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
15173 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
15174 &desc)) {
15175 return false;
15176 }
15177
15178 if (desc.isNothing() || !desc->enumerable()) {
15179 continue;
15180 }
15181
15182 idVal = js::IdToValue(curId);
15183 nsString propName;
15184 // This will just throw if idVal is a Symbol, like the spec says
15185 // to do.
15186 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
15187 return false;
15188 }
15189
15190 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
15191 return false;
15192 }
15193
15194 Record<nsString, ArrayBuffer>::EntryType* entry;
15195 if (!idsSeen.EnsureInserted(propName)) {
15196 // Find the existing entry.
15197 auto idx = recordEntries.IndexOf(propName);
15198 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?" ")"
, "../TestExampleGenBinding.cpp", 15199); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 15199; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
15199 "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?" ")"
, "../TestExampleGenBinding.cpp", 15199); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 15199; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
15200 // Now blow it away to make it look like it was just added
15201 // to the array, because it's not obvious that it's
15202 // safe to write to its already-initialized mValue via our
15203 // normal codegen conversions. For example, the value
15204 // could be a union and this would change its type, but
15205 // codegen assumes we won't do that.
15206 entry = recordEntries.ReconstructElementAt(idx);
15207 } else {
15208 // Safe to do an infallible append here, because we did a
15209 // SetCapacity above to the right capacity.
15210 entry = recordEntries.AppendElement();
15211 }
15212 entry->mKey = propName;
15213 ArrayBuffer& slot = entry->mValue;
15214 if (temp.isObject()) {
15215 if (!slot.Init(&temp.toObject())) {
15216 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "ArrayBuffer");
15217 return false;
15218 }
15219 if (JS::IsSharedArrayBufferObject(slot.Obj())) {
15220 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Value in argument 1");
15221 return false;
15222 }
15223 if (JS::IsLargeArrayBufferMaybeShared(slot.Obj())) {
15224 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value in argument 1");
15225 return false;
15226 }
15227 if (JS::IsResizableArrayBufferMaybeShared(slot.Obj())) {
15228 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value in argument 1");
15229 return false;
15230 }
15231 } else {
15232 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
15233 return false;
15234 }
15235 }
15236 } else {
15237 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15238 return false;
15239 }
15240 // NOTE: This assert does NOT call the function.
15241 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfArrayBuffers(Constify(arg0)))>, "Should be returning void here");
15242 MOZ_KnownLive(self)(self)->PassRecordOfArrayBuffers(Constify(arg0));
15243 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15243); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15243; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15244 args.rval().setUndefined();
15245 return true;
15246}
15247
15248static const JSJitInfo passRecordOfArrayBuffers_methodinfo = {
15249 { (JSJitGetterOp)passRecordOfArrayBuffers },
15250 { prototypes::id::TestExampleInterface },
15251 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15252 JSJitInfo::Method,
15253 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15254 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15255 false, /* isInfallible. False in setters. */
15256 false, /* isMovable. Not relevant for setters. */
15257 false, /* isEliminatable. Not relevant for setters. */
15258 false, /* isAlwaysInSlot. Only relevant for getters. */
15259 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15260 false, /* isTypedMethod. Only relevant for methods. */
15261 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15262};
15263
15264MOZ_CAN_RUN_SCRIPT static bool
15265passRecordOfNullableArrayBuffers(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15266{
15267 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfNullableArrayBuffers");
15268 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15271( cx, "TestExampleInterface"
, "passRecordOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15269 "TestExampleInterface", "passRecordOfNullableArrayBuffers", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15271( cx, "TestExampleInterface"
, "passRecordOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15270 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15271( cx, "TestExampleInterface"
, "passRecordOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15271 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15271( cx, "TestExampleInterface"
, "passRecordOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15272
15273 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15274 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfNullableArrayBuffers", 1)) {
15275 return false;
15276 }
15277 Record<nsString, Nullable<ArrayBuffer>> arg0;
15278 RecordRooter<nsString, Nullable<ArrayBuffer>> arg0_holder(cx, &arg0);
15279 if (args[0].isObject()) {
15280 auto& recordEntries = arg0.Entries();
15281
15282 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
15283 JS::RootedVector<jsid> ids(cx);
15284 if (!js::GetPropertyKeys(cx, recordObj,
15285 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
15286 return false;
15287 }
15288 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
15289 JS_ReportOutOfMemory(cx);
15290 return false;
15291 }
15292 JS::Rooted<JS::Value> propNameValue(cx);
15293 JS::Rooted<JS::Value> temp(cx);
15294 JS::Rooted<jsid> curId(cx);
15295 JS::Rooted<JS::Value> idVal(cx);
15296 // Use a hashset to keep track of ids seen, to avoid
15297 // introducing nasty O(N^2) behavior scanning for them all the
15298 // time. Ideally we'd use a data structure with O(1) lookup
15299 // _and_ ordering for the MozMap, but we don't have one lying
15300 // around.
15301 nsTHashtable<nsStringHashKey> idsSeen;
15302 for (size_t i = 0; i < ids.length(); ++i) {
15303 curId = ids[i];
15304
15305 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
15306 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
15307 &desc)) {
15308 return false;
15309 }
15310
15311 if (desc.isNothing() || !desc->enumerable()) {
15312 continue;
15313 }
15314
15315 idVal = js::IdToValue(curId);
15316 nsString propName;
15317 // This will just throw if idVal is a Symbol, like the spec says
15318 // to do.
15319 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
15320 return false;
15321 }
15322
15323 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
15324 return false;
15325 }
15326
15327 Record<nsString, Nullable<ArrayBuffer>>::EntryType* entry;
15328 if (!idsSeen.EnsureInserted(propName)) {
15329 // Find the existing entry.
15330 auto idx = recordEntries.IndexOf(propName);
15331 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?" ")"
, "../TestExampleGenBinding.cpp", 15332); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 15332; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
15332 "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?" ")"
, "../TestExampleGenBinding.cpp", 15332); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 15332; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
15333 // Now blow it away to make it look like it was just added
15334 // to the array, because it's not obvious that it's
15335 // safe to write to its already-initialized mValue via our
15336 // normal codegen conversions. For example, the value
15337 // could be a union and this would change its type, but
15338 // codegen assumes we won't do that.
15339 entry = recordEntries.ReconstructElementAt(idx);
15340 } else {
15341 // Safe to do an infallible append here, because we did a
15342 // SetCapacity above to the right capacity.
15343 entry = recordEntries.AppendElement();
15344 }
15345 entry->mKey = propName;
15346 Nullable<ArrayBuffer>& slot = entry->mValue;
15347 if (temp.isObject()) {
15348 if (!slot.SetValue().Init(&temp.toObject())) {
15349 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "ArrayBufferOrNull");
15350 return false;
15351 }
15352 if (JS::IsSharedArrayBufferObject(slot.SetValue().Obj())) {
15353 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Value in argument 1");
15354 return false;
15355 }
15356 if (JS::IsLargeArrayBufferMaybeShared(slot.SetValue().Obj())) {
15357 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value in argument 1");
15358 return false;
15359 }
15360 if (JS::IsResizableArrayBufferMaybeShared(slot.SetValue().Obj())) {
15361 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value in argument 1");
15362 return false;
15363 }
15364 } else if (temp.isNullOrUndefined()) {
15365 slot.SetNull();
15366 } else {
15367 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
15368 return false;
15369 }
15370 }
15371 } else {
15372 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15373 return false;
15374 }
15375 // NOTE: This assert does NOT call the function.
15376 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfNullableArrayBuffers(Constify(arg0)))>, "Should be returning void here");
15377 MOZ_KnownLive(self)(self)->PassRecordOfNullableArrayBuffers(Constify(arg0));
15378 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15378); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15378; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15379 args.rval().setUndefined();
15380 return true;
15381}
15382
15383static const JSJitInfo passRecordOfNullableArrayBuffers_methodinfo = {
15384 { (JSJitGetterOp)passRecordOfNullableArrayBuffers },
15385 { prototypes::id::TestExampleInterface },
15386 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15387 JSJitInfo::Method,
15388 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15389 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15390 false, /* isInfallible. False in setters. */
15391 false, /* isMovable. Not relevant for setters. */
15392 false, /* isEliminatable. Not relevant for setters. */
15393 false, /* isAlwaysInSlot. Only relevant for getters. */
15394 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15395 false, /* isTypedMethod. Only relevant for methods. */
15396 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15397};
15398
15399MOZ_CAN_RUN_SCRIPT static bool
15400passVariadicTypedArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15401{
15402 BindingCallContext cx(cx_, "TestExampleInterface.passVariadicTypedArray");
15403 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15406( cx, "TestExampleInterface"
, "passVariadicTypedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15404 "TestExampleInterface", "passVariadicTypedArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15406( cx, "TestExampleInterface"
, "passVariadicTypedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15405 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15406( cx, "TestExampleInterface"
, "passVariadicTypedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15406 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15406( cx, "TestExampleInterface"
, "passVariadicTypedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15407
15408 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15409 AutoSequence<Float32Array> arg0;
15410 SequenceRooter<Float32Array> arg0_holder(cx, &arg0);
15411 if (args.length() > 0) {
15412 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
15413 JS_ReportOutOfMemory(cx);
15414 return false;
15415 }
15416 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
15417 // OK to do infallible append here, since we ensured capacity already.
15418 Float32Array& slot = *arg0.AppendElement();
15419 if (args[variadicArg].isObject()) {
15420 if (!slot.Init(&args[variadicArg].toObject())) {
15421 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Float32Array");
15422 return false;
15423 }
15424 if (JS::IsArrayBufferViewShared(slot.Obj())) {
15425 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15426 return false;
15427 }
15428 if (JS::IsLargeArrayBufferView(slot.Obj())) {
15429 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15430 return false;
15431 }
15432 if (JS::IsResizableArrayBufferView(slot.Obj())) {
15433 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15434 return false;
15435 }
15436 } else {
15437 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15438 return false;
15439 }
15440 }
15441 }
15442 // NOTE: This assert does NOT call the function.
15443 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicTypedArray(Constify(arg0)))>, "Should be returning void here");
15444 MOZ_KnownLive(self)(self)->PassVariadicTypedArray(Constify(arg0));
15445 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15445); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15445; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15446 args.rval().setUndefined();
15447 return true;
15448}
15449
15450static const JSJitInfo passVariadicTypedArray_methodinfo = {
15451 { (JSJitGetterOp)passVariadicTypedArray },
15452 { prototypes::id::TestExampleInterface },
15453 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15454 JSJitInfo::Method,
15455 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15456 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15457 false, /* isInfallible. False in setters. */
15458 false, /* isMovable. Not relevant for setters. */
15459 false, /* isEliminatable. Not relevant for setters. */
15460 false, /* isAlwaysInSlot. Only relevant for getters. */
15461 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15462 false, /* isTypedMethod. Only relevant for methods. */
15463 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15464};
15465
15466MOZ_CAN_RUN_SCRIPT static bool
15467passVariadicNullableTypedArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15468{
15469 BindingCallContext cx(cx_, "TestExampleInterface.passVariadicNullableTypedArray");
15470 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15473( cx, "TestExampleInterface"
, "passVariadicNullableTypedArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15471 "TestExampleInterface", "passVariadicNullableTypedArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15473( cx, "TestExampleInterface"
, "passVariadicNullableTypedArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15472 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15473( cx, "TestExampleInterface"
, "passVariadicNullableTypedArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15473 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15473( cx, "TestExampleInterface"
, "passVariadicNullableTypedArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15474
15475 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15476 AutoSequence<Nullable<Float32Array>> arg0;
15477 SequenceRooter<Nullable<Float32Array>> arg0_holder(cx, &arg0);
15478 if (args.length() > 0) {
15479 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
15480 JS_ReportOutOfMemory(cx);
15481 return false;
15482 }
15483 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
15484 // OK to do infallible append here, since we ensured capacity already.
15485 Nullable<Float32Array>& slot = *arg0.AppendElement();
15486 if (args[variadicArg].isObject()) {
15487 if (!slot.SetValue().Init(&args[variadicArg].toObject())) {
15488 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Float32ArrayOrNull");
15489 return false;
15490 }
15491 if (JS::IsArrayBufferViewShared(slot.SetValue().Obj())) {
15492 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15493 return false;
15494 }
15495 if (JS::IsLargeArrayBufferView(slot.SetValue().Obj())) {
15496 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15497 return false;
15498 }
15499 if (JS::IsResizableArrayBufferView(slot.SetValue().Obj())) {
15500 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15501 return false;
15502 }
15503 } else if (args[variadicArg].isNullOrUndefined()) {
15504 slot.SetNull();
15505 } else {
15506 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15507 return false;
15508 }
15509 }
15510 }
15511 // NOTE: This assert does NOT call the function.
15512 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicNullableTypedArray(Constify(arg0)))>, "Should be returning void here");
15513 MOZ_KnownLive(self)(self)->PassVariadicNullableTypedArray(Constify(arg0));
15514 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15514); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15514; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15515 args.rval().setUndefined();
15516 return true;
15517}
15518
15519static const JSJitInfo passVariadicNullableTypedArray_methodinfo = {
15520 { (JSJitGetterOp)passVariadicNullableTypedArray },
15521 { prototypes::id::TestExampleInterface },
15522 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15523 JSJitInfo::Method,
15524 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15525 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15526 false, /* isInfallible. False in setters. */
15527 false, /* isMovable. Not relevant for setters. */
15528 false, /* isEliminatable. Not relevant for setters. */
15529 false, /* isAlwaysInSlot. Only relevant for getters. */
15530 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15531 false, /* isTypedMethod. Only relevant for methods. */
15532 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15533};
15534
15535MOZ_CAN_RUN_SCRIPT static bool
15536receiveUint8Array(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15537{
15538 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15541( cx, "TestExampleInterface"
, "receiveUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15539 "TestExampleInterface", "receiveUint8Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15541( cx, "TestExampleInterface"
, "receiveUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15540 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15541( cx, "TestExampleInterface"
, "receiveUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15541 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15541( cx, "TestExampleInterface"
, "receiveUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15542
15543 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15544 JS::Rooted<JSObject*> result(cx);
15545 // NOTE: This assert does NOT call the function.
15546 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUint8Array(cx, &result))>, "Should be returning void here");
15547 MOZ_KnownLive(self)(self)->ReceiveUint8Array(cx, &result);
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)"
, "../TestExampleGenBinding.cpp", 15548); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15548; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15549 JS::ExposeObjectToActiveJS(result);
15550 args.rval().setObject(*result);
15551 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
15552 return false;
15553 }
15554 return true;
15555}
15556
15557static const JSJitInfo receiveUint8Array_methodinfo = {
15558 { (JSJitGetterOp)receiveUint8Array },
15559 { prototypes::id::TestExampleInterface },
15560 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15561 JSJitInfo::Method,
15562 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15563 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
15564 false, /* isInfallible. False in setters. */
15565 false, /* isMovable. Not relevant for setters. */
15566 false, /* isEliminatable. Not relevant for setters. */
15567 false, /* isAlwaysInSlot. Only relevant for getters. */
15568 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15569 false, /* isTypedMethod. Only relevant for methods. */
15570 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15571};
15572
15573MOZ_CAN_RUN_SCRIPT static bool
15574get_uint8ArrayAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
15575{
15576 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15579( cx, "TestExampleInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15577 "TestExampleInterface", "uint8ArrayAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15579( cx, "TestExampleInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15578 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject15579( cx, "TestExampleInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15579 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15579( cx, "TestExampleInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15580
15581 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15582 JS::Rooted<JSObject*> result(cx);
15583 // NOTE: This assert does NOT call the function.
15584 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetUint8ArrayAttr(cx, &result))>, "Should be returning void here");
15585 MOZ_KnownLive(self)(self)->GetUint8ArrayAttr(cx, &result);
15586 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15586); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15586; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15587 JS::ExposeObjectToActiveJS(result);
15588 args.rval().setObject(*result);
15589 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
15590 return false;
15591 }
15592 return true;
15593}
15594
15595MOZ_CAN_RUN_SCRIPT static bool
15596set_uint8ArrayAttr(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
15597{
15598 BindingCallContext cx(cx_, "TestExampleInterface.uint8ArrayAttr setter");
15599 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15602( cx, "TestExampleInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15600 "TestExampleInterface", "uint8ArrayAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15602( cx, "TestExampleInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15601 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject15602( cx, "TestExampleInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15602 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15602( cx, "TestExampleInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15603
15604 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15605 RootedSpiderMonkeyInterface<Uint8Array> arg0(cx);
15606 if (args[0].isObject()) {
15607 if (!arg0.Init(&args[0].toObject())) {
15608 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "Uint8Array");
15609 return false;
15610 }
15611 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
15612 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Value being assigned");
15613 return false;
15614 }
15615 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
15616 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
15617 return false;
15618 }
15619 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
15620 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
15621 return false;
15622 }
15623 } else {
15624 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
15625 return false;
15626 }
15627 // NOTE: This assert does NOT call the function.
15628 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetUint8ArrayAttr(Constify(arg0)))>, "Should be returning void here");
15629 MOZ_KnownLive(self)(self)->SetUint8ArrayAttr(Constify(arg0));
15630 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15630); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15630; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15631
15632 return true;
15633}
15634
15635static const JSJitInfo uint8ArrayAttr_getterinfo = {
15636 { get_uint8ArrayAttr },
15637 { prototypes::id::TestExampleInterface },
15638 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15639 JSJitInfo::Getter,
15640 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15641 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
15642 false, /* isInfallible. False in setters. */
15643 false, /* isMovable. Not relevant for setters. */
15644 false, /* isEliminatable. Not relevant for setters. */
15645 false, /* isAlwaysInSlot. Only relevant for getters. */
15646 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15647 false, /* isTypedMethod. Only relevant for methods. */
15648 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15649};
15650static const JSJitInfo uint8ArrayAttr_setterinfo = {
15651 { (JSJitGetterOp)set_uint8ArrayAttr },
15652 { prototypes::id::TestExampleInterface },
15653 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15654 JSJitInfo::Setter,
15655 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15656 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15657 false, /* isInfallible. False in setters. */
15658 false, /* isMovable. Not relevant for setters. */
15659 false, /* isEliminatable. Not relevant for setters. */
15660 false, /* isAlwaysInSlot. Only relevant for getters. */
15661 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15662 false, /* isTypedMethod. Only relevant for methods. */
15663 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15664};
15665
15666MOZ_CAN_RUN_SCRIPT static bool
15667passString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15668{
15669 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15672( cx, "TestExampleInterface"
, "passString", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15670 "TestExampleInterface", "passString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15672( cx, "TestExampleInterface"
, "passString", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15671 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15672( cx, "TestExampleInterface"
, "passString", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15672 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15672( cx, "TestExampleInterface"
, "passString", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15673
15674 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15675 if (!args.requireAtLeast(cx, "TestExampleInterface.passString", 1)) {
15676 return false;
15677 }
15678 binding_detail::FakeString<char16_t> arg0;
15679 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
15680 return false;
15681 }
15682 // NOTE: This assert does NOT call the function.
15683 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassString(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
15684 MOZ_KnownLive(self)(self)->PassString(NonNullHelper(Constify(arg0)));
15685 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15685); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15685; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15686 args.rval().setUndefined();
15687 return true;
15688}
15689
15690static const JSJitInfo passString_methodinfo = {
15691 { (JSJitGetterOp)passString },
15692 { prototypes::id::TestExampleInterface },
15693 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15694 JSJitInfo::Method,
15695 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15696 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15697 false, /* isInfallible. False in setters. */
15698 false, /* isMovable. Not relevant for setters. */
15699 false, /* isEliminatable. Not relevant for setters. */
15700 false, /* isAlwaysInSlot. Only relevant for getters. */
15701 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15702 false, /* isTypedMethod. Only relevant for methods. */
15703 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15704};
15705
15706MOZ_CAN_RUN_SCRIPT static bool
15707passNullableString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15708{
15709 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15712( cx, "TestExampleInterface"
, "passNullableString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15710 "TestExampleInterface", "passNullableString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15712( cx, "TestExampleInterface"
, "passNullableString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15711 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15712( cx, "TestExampleInterface"
, "passNullableString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15712 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15712( cx, "TestExampleInterface"
, "passNullableString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15713
15714 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15715 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableString", 1)) {
15716 return false;
15717 }
15718 binding_detail::FakeString<char16_t> arg0;
15719 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
15720 return false;
15721 }
15722 // NOTE: This assert does NOT call the function.
15723 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableString(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
15724 MOZ_KnownLive(self)(self)->PassNullableString(NonNullHelper(Constify(arg0)));
15725 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15725); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15725; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15726 args.rval().setUndefined();
15727 return true;
15728}
15729
15730static const JSJitInfo passNullableString_methodinfo = {
15731 { (JSJitGetterOp)passNullableString },
15732 { prototypes::id::TestExampleInterface },
15733 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15734 JSJitInfo::Method,
15735 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15736 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15737 false, /* isInfallible. False in setters. */
15738 false, /* isMovable. Not relevant for setters. */
15739 false, /* isEliminatable. Not relevant for setters. */
15740 false, /* isAlwaysInSlot. Only relevant for getters. */
15741 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15742 false, /* isTypedMethod. Only relevant for methods. */
15743 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15744};
15745
15746MOZ_CAN_RUN_SCRIPT static bool
15747passOptionalString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15748{
15749 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15752( cx, "TestExampleInterface"
, "passOptionalString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15750 "TestExampleInterface", "passOptionalString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15752( cx, "TestExampleInterface"
, "passOptionalString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15751 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15752( cx, "TestExampleInterface"
, "passOptionalString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15752 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15752( cx, "TestExampleInterface"
, "passOptionalString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15753
15754 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15755 Optional<nsAString> arg0;
15756 binding_detail::FakeString<char16_t> arg0_holder;
15757 if (args.hasDefined(0)) {
15758 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0_holder)) {
15759 return false;
15760 }
15761 arg0 = &arg0_holder;
15762 }
15763 // NOTE: This assert does NOT call the function.
15764 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalString(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
15765 MOZ_KnownLive(self)(self)->PassOptionalString(NonNullHelper(Constify(arg0)));
15766 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15766); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15766; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15767 args.rval().setUndefined();
15768 return true;
15769}
15770
15771static const JSJitInfo passOptionalString_methodinfo = {
15772 { (JSJitGetterOp)passOptionalString },
15773 { prototypes::id::TestExampleInterface },
15774 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15775 JSJitInfo::Method,
15776 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15777 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15778 false, /* isInfallible. False in setters. */
15779 false, /* isMovable. Not relevant for setters. */
15780 false, /* isEliminatable. Not relevant for setters. */
15781 false, /* isAlwaysInSlot. Only relevant for getters. */
15782 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15783 false, /* isTypedMethod. Only relevant for methods. */
15784 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15785};
15786
15787MOZ_CAN_RUN_SCRIPT static bool
15788passOptionalStringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15789{
15790 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15793( cx, "TestExampleInterface"
, "passOptionalStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15791 "TestExampleInterface", "passOptionalStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15793( cx, "TestExampleInterface"
, "passOptionalStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15792 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15793( cx, "TestExampleInterface"
, "passOptionalStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15793 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15793( cx, "TestExampleInterface"
, "passOptionalStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15794
15795 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15796 binding_detail::FakeString<char16_t> arg0;
15797 if (args.hasDefined(0)) {
15798 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
15799 return false;
15800 }
15801 } else {
15802 arg0.AssignLiteral(u"abc");
15803 }
15804 // NOTE: This assert does NOT call the function.
15805 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalStringWithDefaultValue(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
15806 MOZ_KnownLive(self)(self)->PassOptionalStringWithDefaultValue(NonNullHelper(Constify(arg0)));
15807 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15807); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15807; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15808 args.rval().setUndefined();
15809 return true;
15810}
15811
15812static const JSJitInfo passOptionalStringWithDefaultValue_methodinfo = {
15813 { (JSJitGetterOp)passOptionalStringWithDefaultValue },
15814 { prototypes::id::TestExampleInterface },
15815 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15816 JSJitInfo::Method,
15817 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15818 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15819 false, /* isInfallible. False in setters. */
15820 false, /* isMovable. Not relevant for setters. */
15821 false, /* isEliminatable. Not relevant for setters. */
15822 false, /* isAlwaysInSlot. Only relevant for getters. */
15823 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15824 false, /* isTypedMethod. Only relevant for methods. */
15825 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15826};
15827
15828MOZ_CAN_RUN_SCRIPT static bool
15829passOptionalNullableString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15830{
15831 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15834( cx, "TestExampleInterface"
, "passOptionalNullableString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15832 "TestExampleInterface", "passOptionalNullableString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15834( cx, "TestExampleInterface"
, "passOptionalNullableString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15833 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15834( cx, "TestExampleInterface"
, "passOptionalNullableString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15834 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15834( cx, "TestExampleInterface"
, "passOptionalNullableString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15835
15836 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15837 Optional<nsAString> arg0;
15838 binding_detail::FakeString<char16_t> arg0_holder;
15839 if (args.hasDefined(0)) {
15840 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0_holder)) {
15841 return false;
15842 }
15843 arg0 = &arg0_holder;
15844 }
15845 // NOTE: This assert does NOT call the function.
15846 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableString(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
15847 MOZ_KnownLive(self)(self)->PassOptionalNullableString(NonNullHelper(Constify(arg0)));
15848 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15848); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15848; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15849 args.rval().setUndefined();
15850 return true;
15851}
15852
15853static const JSJitInfo passOptionalNullableString_methodinfo = {
15854 { (JSJitGetterOp)passOptionalNullableString },
15855 { prototypes::id::TestExampleInterface },
15856 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15857 JSJitInfo::Method,
15858 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15859 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15860 false, /* isInfallible. False in setters. */
15861 false, /* isMovable. Not relevant for setters. */
15862 false, /* isEliminatable. Not relevant for setters. */
15863 false, /* isAlwaysInSlot. Only relevant for getters. */
15864 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15865 false, /* isTypedMethod. Only relevant for methods. */
15866 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15867};
15868
15869MOZ_CAN_RUN_SCRIPT static bool
15870passOptionalNullableStringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15871{
15872 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15875( cx, "TestExampleInterface"
, "passOptionalNullableStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15873 "TestExampleInterface", "passOptionalNullableStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15875( cx, "TestExampleInterface"
, "passOptionalNullableStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15874 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15875( cx, "TestExampleInterface"
, "passOptionalNullableStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15875 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15875( cx, "TestExampleInterface"
, "passOptionalNullableStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15876
15877 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15878 binding_detail::FakeString<char16_t> arg0;
15879 if (args.hasDefined(0)) {
15880 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
15881 return false;
15882 }
15883 } else {
15884 arg0.SetIsVoid(true);
15885 }
15886 // NOTE: This assert does NOT call the function.
15887 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableStringWithDefaultValue(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
15888 MOZ_KnownLive(self)(self)->PassOptionalNullableStringWithDefaultValue(NonNullHelper(Constify(arg0)));
15889 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15889); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15889; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15890 args.rval().setUndefined();
15891 return true;
15892}
15893
15894static const JSJitInfo passOptionalNullableStringWithDefaultValue_methodinfo = {
15895 { (JSJitGetterOp)passOptionalNullableStringWithDefaultValue },
15896 { prototypes::id::TestExampleInterface },
15897 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15898 JSJitInfo::Method,
15899 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15900 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15901 false, /* isInfallible. False in setters. */
15902 false, /* isMovable. Not relevant for setters. */
15903 false, /* isEliminatable. Not relevant for setters. */
15904 false, /* isAlwaysInSlot. Only relevant for getters. */
15905 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15906 false, /* isTypedMethod. Only relevant for methods. */
15907 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15908};
15909
15910MOZ_CAN_RUN_SCRIPT static bool
15911passVariadicString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15912{
15913 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15916( cx, "TestExampleInterface"
, "passVariadicString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15914 "TestExampleInterface", "passVariadicString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15916( cx, "TestExampleInterface"
, "passVariadicString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15915 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15916( cx, "TestExampleInterface"
, "passVariadicString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15916 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15916( cx, "TestExampleInterface"
, "passVariadicString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15917
15918 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15919 AutoSequence<nsString> arg0;
15920 if (args.length() > 0) {
15921 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
15922 JS_ReportOutOfMemory(cx);
15923 return false;
15924 }
15925 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
15926 // OK to do infallible append here, since we ensured capacity already.
15927 nsString& slot = *arg0.AppendElement();
15928 if (!ConvertJSValueToString(cx, args[variadicArg], eStringify, eStringify, slot)) {
15929 return false;
15930 }
15931 }
15932 }
15933 // NOTE: This assert does NOT call the function.
15934 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicString(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
15935 MOZ_KnownLive(self)(self)->PassVariadicString(NonNullHelper(Constify(arg0)));
15936 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15936); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15936; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15937 args.rval().setUndefined();
15938 return true;
15939}
15940
15941static const JSJitInfo passVariadicString_methodinfo = {
15942 { (JSJitGetterOp)passVariadicString },
15943 { prototypes::id::TestExampleInterface },
15944 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15945 JSJitInfo::Method,
15946 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15947 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15948 false, /* isInfallible. False in setters. */
15949 false, /* isMovable. Not relevant for setters. */
15950 false, /* isEliminatable. Not relevant for setters. */
15951 false, /* isAlwaysInSlot. Only relevant for getters. */
15952 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15953 false, /* isTypedMethod. Only relevant for methods. */
15954 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15955};
15956
15957MOZ_CAN_RUN_SCRIPT static bool
15958passByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15959{
15960 BindingCallContext cx(cx_, "TestExampleInterface.passByteString");
15961 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15964( cx, "TestExampleInterface"
, "passByteString", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15962 "TestExampleInterface", "passByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15964( cx, "TestExampleInterface"
, "passByteString", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15963 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15964( cx, "TestExampleInterface"
, "passByteString", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15964 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15964( cx, "TestExampleInterface"
, "passByteString", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15965
15966 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
15967 if (!args.requireAtLeast(cx, "TestExampleInterface.passByteString", 1)) {
15968 return false;
15969 }
15970 nsCString arg0;
15971 if (!ConvertJSValueToByteString(cx, args[0], false, "argument 1", arg0)) {
15972 return false;
15973 }
15974 // NOTE: This assert does NOT call the function.
15975 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassByteString(Constify(arg0)))>, "Should be returning void here");
15976 MOZ_KnownLive(self)(self)->PassByteString(Constify(arg0));
15977 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 15977); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15977; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15978 args.rval().setUndefined();
15979 return true;
15980}
15981
15982static const JSJitInfo passByteString_methodinfo = {
15983 { (JSJitGetterOp)passByteString },
15984 { prototypes::id::TestExampleInterface },
15985 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
15986 JSJitInfo::Method,
15987 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15988 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15989 false, /* isInfallible. False in setters. */
15990 false, /* isMovable. Not relevant for setters. */
15991 false, /* isEliminatable. Not relevant for setters. */
15992 false, /* isAlwaysInSlot. Only relevant for getters. */
15993 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15994 false, /* isTypedMethod. Only relevant for methods. */
15995 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15996};
15997
15998MOZ_CAN_RUN_SCRIPT static bool
15999passNullableByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16000{
16001 BindingCallContext cx(cx_, "TestExampleInterface.passNullableByteString");
16002 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16005( cx, "TestExampleInterface"
, "passNullableByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16003 "TestExampleInterface", "passNullableByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16005( cx, "TestExampleInterface"
, "passNullableByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16004 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16005( cx, "TestExampleInterface"
, "passNullableByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16005 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16005( cx, "TestExampleInterface"
, "passNullableByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16006
16007 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16008 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableByteString", 1)) {
16009 return false;
16010 }
16011 nsCString arg0;
16012 if (!ConvertJSValueToByteString(cx, args[0], true, "argument 1", arg0)) {
16013 return false;
16014 }
16015 // NOTE: This assert does NOT call the function.
16016 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableByteString(Constify(arg0)))>, "Should be returning void here");
16017 MOZ_KnownLive(self)(self)->PassNullableByteString(Constify(arg0));
16018 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16018); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16018; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16019 args.rval().setUndefined();
16020 return true;
16021}
16022
16023static const JSJitInfo passNullableByteString_methodinfo = {
16024 { (JSJitGetterOp)passNullableByteString },
16025 { prototypes::id::TestExampleInterface },
16026 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16027 JSJitInfo::Method,
16028 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16029 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16030 false, /* isInfallible. False in setters. */
16031 false, /* isMovable. Not relevant for setters. */
16032 false, /* isEliminatable. Not relevant for setters. */
16033 false, /* isAlwaysInSlot. Only relevant for getters. */
16034 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16035 false, /* isTypedMethod. Only relevant for methods. */
16036 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16037};
16038
16039MOZ_CAN_RUN_SCRIPT static bool
16040passOptionalByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16041{
16042 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalByteString");
16043 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16046( cx, "TestExampleInterface"
, "passOptionalByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16044 "TestExampleInterface", "passOptionalByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16046( cx, "TestExampleInterface"
, "passOptionalByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16045 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16046( cx, "TestExampleInterface"
, "passOptionalByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16046 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16046( cx, "TestExampleInterface"
, "passOptionalByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16047
16048 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16049 Optional<nsCString> arg0;
16050 if (args.hasDefined(0)) {
16051 arg0.Construct();
16052 if (!ConvertJSValueToByteString(cx, args[0], false, "argument 1", arg0.Value())) {
16053 return false;
16054 }
16055 }
16056 // NOTE: This assert does NOT call the function.
16057 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteString(Constify(arg0)))>, "Should be returning void here");
16058 MOZ_KnownLive(self)(self)->PassOptionalByteString(Constify(arg0));
16059 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16059); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16059; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16060 args.rval().setUndefined();
16061 return true;
16062}
16063
16064static const JSJitInfo passOptionalByteString_methodinfo = {
16065 { (JSJitGetterOp)passOptionalByteString },
16066 { prototypes::id::TestExampleInterface },
16067 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16068 JSJitInfo::Method,
16069 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16070 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16071 false, /* isInfallible. False in setters. */
16072 false, /* isMovable. Not relevant for setters. */
16073 false, /* isEliminatable. Not relevant for setters. */
16074 false, /* isAlwaysInSlot. Only relevant for getters. */
16075 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16076 false, /* isTypedMethod. Only relevant for methods. */
16077 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16078};
16079
16080MOZ_CAN_RUN_SCRIPT static bool
16081passOptionalByteStringWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16082{
16083 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalByteStringWithDefaultValue");
16084 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16087( cx, "TestExampleInterface"
, "passOptionalByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16085 "TestExampleInterface", "passOptionalByteStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16087( cx, "TestExampleInterface"
, "passOptionalByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16086 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16087( cx, "TestExampleInterface"
, "passOptionalByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16087 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16087( cx, "TestExampleInterface"
, "passOptionalByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16088
16089 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16090 nsCString arg0;
16091 if (args.hasDefined(0)) {
16092 if (!ConvertJSValueToByteString(cx, args[0], false, "argument 1", arg0)) {
16093 return false;
16094 }
16095 } else {
16096 arg0.AssignLiteral("abc");
16097 }
16098 // NOTE: This assert does NOT call the function.
16099 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteStringWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
16100 MOZ_KnownLive(self)(self)->PassOptionalByteStringWithDefaultValue(Constify(arg0));
16101 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16101); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16101; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16102 args.rval().setUndefined();
16103 return true;
16104}
16105
16106static const JSJitInfo passOptionalByteStringWithDefaultValue_methodinfo = {
16107 { (JSJitGetterOp)passOptionalByteStringWithDefaultValue },
16108 { prototypes::id::TestExampleInterface },
16109 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16110 JSJitInfo::Method,
16111 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16112 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16113 false, /* isInfallible. False in setters. */
16114 false, /* isMovable. Not relevant for setters. */
16115 false, /* isEliminatable. Not relevant for setters. */
16116 false, /* isAlwaysInSlot. Only relevant for getters. */
16117 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16118 false, /* isTypedMethod. Only relevant for methods. */
16119 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16120};
16121
16122MOZ_CAN_RUN_SCRIPT static bool
16123passOptionalNullableByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16124{
16125 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableByteString");
16126 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16129( cx, "TestExampleInterface"
, "passOptionalNullableByteString", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16127 "TestExampleInterface", "passOptionalNullableByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16129( cx, "TestExampleInterface"
, "passOptionalNullableByteString", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16128 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16129( cx, "TestExampleInterface"
, "passOptionalNullableByteString", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16129 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16129( cx, "TestExampleInterface"
, "passOptionalNullableByteString", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16130
16131 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16132 Optional<nsCString> arg0;
16133 if (args.hasDefined(0)) {
16134 arg0.Construct();
16135 if (!ConvertJSValueToByteString(cx, args[0], true, "argument 1", arg0.Value())) {
16136 return false;
16137 }
16138 }
16139 // NOTE: This assert does NOT call the function.
16140 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableByteString(Constify(arg0)))>, "Should be returning void here");
16141 MOZ_KnownLive(self)(self)->PassOptionalNullableByteString(Constify(arg0));
16142 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16142); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16142; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16143 args.rval().setUndefined();
16144 return true;
16145}
16146
16147static const JSJitInfo passOptionalNullableByteString_methodinfo = {
16148 { (JSJitGetterOp)passOptionalNullableByteString },
16149 { prototypes::id::TestExampleInterface },
16150 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16151 JSJitInfo::Method,
16152 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16153 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16154 false, /* isInfallible. False in setters. */
16155 false, /* isMovable. Not relevant for setters. */
16156 false, /* isEliminatable. Not relevant for setters. */
16157 false, /* isAlwaysInSlot. Only relevant for getters. */
16158 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16159 false, /* isTypedMethod. Only relevant for methods. */
16160 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16161};
16162
16163MOZ_CAN_RUN_SCRIPT static bool
16164passOptionalNullableByteStringWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16165{
16166 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableByteStringWithDefaultValue");
16167 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16170( cx, "TestExampleInterface"
, "passOptionalNullableByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16168 "TestExampleInterface", "passOptionalNullableByteStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16170( cx, "TestExampleInterface"
, "passOptionalNullableByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16169 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16170( cx, "TestExampleInterface"
, "passOptionalNullableByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16170 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16170( cx, "TestExampleInterface"
, "passOptionalNullableByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16171
16172 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16173 nsCString arg0;
16174 if (args.hasDefined(0)) {
16175 if (!ConvertJSValueToByteString(cx, args[0], true, "argument 1", arg0)) {
16176 return false;
16177 }
16178 } else {
16179 arg0.SetIsVoid(true);
16180 }
16181 // NOTE: This assert does NOT call the function.
16182 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableByteStringWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
16183 MOZ_KnownLive(self)(self)->PassOptionalNullableByteStringWithDefaultValue(Constify(arg0));
16184 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16184); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16184; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16185 args.rval().setUndefined();
16186 return true;
16187}
16188
16189static const JSJitInfo passOptionalNullableByteStringWithDefaultValue_methodinfo = {
16190 { (JSJitGetterOp)passOptionalNullableByteStringWithDefaultValue },
16191 { prototypes::id::TestExampleInterface },
16192 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16193 JSJitInfo::Method,
16194 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16195 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16196 false, /* isInfallible. False in setters. */
16197 false, /* isMovable. Not relevant for setters. */
16198 false, /* isEliminatable. Not relevant for setters. */
16199 false, /* isAlwaysInSlot. Only relevant for getters. */
16200 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16201 false, /* isTypedMethod. Only relevant for methods. */
16202 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16203};
16204
16205MOZ_CAN_RUN_SCRIPT static bool
16206passVariadicByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16207{
16208 BindingCallContext cx(cx_, "TestExampleInterface.passVariadicByteString");
16209 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16212( cx, "TestExampleInterface"
, "passVariadicByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16210 "TestExampleInterface", "passVariadicByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16212( cx, "TestExampleInterface"
, "passVariadicByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16211 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16212( cx, "TestExampleInterface"
, "passVariadicByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16212 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16212( cx, "TestExampleInterface"
, "passVariadicByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16213
16214 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16215 AutoSequence<nsCString> arg0;
16216 if (args.length() > 0) {
16217 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
16218 JS_ReportOutOfMemory(cx);
16219 return false;
16220 }
16221 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
16222 // OK to do infallible append here, since we ensured capacity already.
16223 nsCString& slot = *arg0.AppendElement();
16224 if (!ConvertJSValueToByteString(cx, args[variadicArg], false, "argument 1", slot)) {
16225 return false;
16226 }
16227 }
16228 }
16229 // NOTE: This assert does NOT call the function.
16230 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicByteString(Constify(arg0)))>, "Should be returning void here");
16231 MOZ_KnownLive(self)(self)->PassVariadicByteString(Constify(arg0));
16232 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16232); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16232; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16233 args.rval().setUndefined();
16234 return true;
16235}
16236
16237static const JSJitInfo passVariadicByteString_methodinfo = {
16238 { (JSJitGetterOp)passVariadicByteString },
16239 { prototypes::id::TestExampleInterface },
16240 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16241 JSJitInfo::Method,
16242 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16243 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16244 false, /* isInfallible. False in setters. */
16245 false, /* isMovable. Not relevant for setters. */
16246 false, /* isEliminatable. Not relevant for setters. */
16247 false, /* isAlwaysInSlot. Only relevant for getters. */
16248 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16249 false, /* isTypedMethod. Only relevant for methods. */
16250 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16251};
16252
16253MOZ_CAN_RUN_SCRIPT static bool
16254passUnionByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16255{
16256 BindingCallContext cx(cx_, "TestExampleInterface.passUnionByteString");
16257 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16260( cx, "TestExampleInterface"
, "passUnionByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16258 "TestExampleInterface", "passUnionByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16260( cx, "TestExampleInterface"
, "passUnionByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16259 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16260( cx, "TestExampleInterface"
, "passUnionByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16260 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16260( cx, "TestExampleInterface"
, "passUnionByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16261
16262 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16263 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionByteString", 1)) {
16264 return false;
16265 }
16266 ByteStringOrLong arg0;
16267 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
16268 return false;
16269 }
16270 // NOTE: This assert does NOT call the function.
16271 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionByteString(Constify(arg0)))>, "Should be returning void here");
16272 MOZ_KnownLive(self)(self)->PassUnionByteString(Constify(arg0));
16273 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16273); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16273; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16274 args.rval().setUndefined();
16275 return true;
16276}
16277
16278static const JSJitInfo passUnionByteString_methodinfo = {
16279 { (JSJitGetterOp)passUnionByteString },
16280 { prototypes::id::TestExampleInterface },
16281 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16282 JSJitInfo::Method,
16283 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16284 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16285 false, /* isInfallible. False in setters. */
16286 false, /* isMovable. Not relevant for setters. */
16287 false, /* isEliminatable. Not relevant for setters. */
16288 false, /* isAlwaysInSlot. Only relevant for getters. */
16289 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16290 false, /* isTypedMethod. Only relevant for methods. */
16291 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16292};
16293
16294MOZ_CAN_RUN_SCRIPT static bool
16295passOptionalUnionByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16296{
16297 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalUnionByteString");
16298 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16301( cx, "TestExampleInterface"
, "passOptionalUnionByteString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16299 "TestExampleInterface", "passOptionalUnionByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16301( cx, "TestExampleInterface"
, "passOptionalUnionByteString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16300 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16301( cx, "TestExampleInterface"
, "passOptionalUnionByteString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16301 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16301( cx, "TestExampleInterface"
, "passOptionalUnionByteString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16302
16303 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16304 Optional<ByteStringOrLong> arg0;
16305 if (args.hasDefined(0)) {
16306 arg0.Construct();
16307 if (!arg0.Value().Init(cx, args[0], "Argument 1", false)) {
16308 return false;
16309 }
16310 }
16311 // NOTE: This assert does NOT call the function.
16312 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnionByteString(Constify(arg0)))>, "Should be returning void here");
16313 MOZ_KnownLive(self)(self)->PassOptionalUnionByteString(Constify(arg0));
16314 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16314); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16314; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16315 args.rval().setUndefined();
16316 return true;
16317}
16318
16319static const JSJitInfo passOptionalUnionByteString_methodinfo = {
16320 { (JSJitGetterOp)passOptionalUnionByteString },
16321 { prototypes::id::TestExampleInterface },
16322 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16323 JSJitInfo::Method,
16324 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16325 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16326 false, /* isInfallible. False in setters. */
16327 false, /* isMovable. Not relevant for setters. */
16328 false, /* isEliminatable. Not relevant for setters. */
16329 false, /* isAlwaysInSlot. Only relevant for getters. */
16330 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16331 false, /* isTypedMethod. Only relevant for methods. */
16332 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16333};
16334
16335MOZ_CAN_RUN_SCRIPT static bool
16336passOptionalUnionByteStringWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16337{
16338 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalUnionByteStringWithDefaultValue");
16339 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16342( cx, "TestExampleInterface"
, "passOptionalUnionByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16340 "TestExampleInterface", "passOptionalUnionByteStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16342( cx, "TestExampleInterface"
, "passOptionalUnionByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16341 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16342( cx, "TestExampleInterface"
, "passOptionalUnionByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16342 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16342( cx, "TestExampleInterface"
, "passOptionalUnionByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16343
16344 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16345 ByteStringOrLong arg0;
16346 if (!(args.hasDefined(0))) {
16347 arg0.SetStringLiteral("abc");
16348 } else {
16349 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
16350 return false;
16351 }
16352 }
16353 // NOTE: This assert does NOT call the function.
16354 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnionByteStringWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
16355 MOZ_KnownLive(self)(self)->PassOptionalUnionByteStringWithDefaultValue(Constify(arg0));
16356 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16356); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16356; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16357 args.rval().setUndefined();
16358 return true;
16359}
16360
16361static const JSJitInfo passOptionalUnionByteStringWithDefaultValue_methodinfo = {
16362 { (JSJitGetterOp)passOptionalUnionByteStringWithDefaultValue },
16363 { prototypes::id::TestExampleInterface },
16364 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16365 JSJitInfo::Method,
16366 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16367 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16368 false, /* isInfallible. False in setters. */
16369 false, /* isMovable. Not relevant for setters. */
16370 false, /* isEliminatable. Not relevant for setters. */
16371 false, /* isAlwaysInSlot. Only relevant for getters. */
16372 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16373 false, /* isTypedMethod. Only relevant for methods. */
16374 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16375};
16376
16377MOZ_CAN_RUN_SCRIPT static bool
16378passUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16379{
16380 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16383( cx, "TestExampleInterface"
, "passUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16381 "TestExampleInterface", "passUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16383( cx, "TestExampleInterface"
, "passUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16382 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16383( cx, "TestExampleInterface"
, "passUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16383 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16383( cx, "TestExampleInterface"
, "passUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16384
16385 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16386 if (!args.requireAtLeast(cx, "TestExampleInterface.passUTF8String", 1)) {
16387 return false;
16388 }
16389 binding_detail::FakeString<char> arg0;
16390 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
16391 return false;
16392 }
16393 // NOTE: This assert does NOT call the function.
16394 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUTF8String(Constify(arg0)))>, "Should be returning void here");
16395 MOZ_KnownLive(self)(self)->PassUTF8String(Constify(arg0));
16396 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16396); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16396; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16397 args.rval().setUndefined();
16398 return true;
16399}
16400
16401static const JSJitInfo passUTF8String_methodinfo = {
16402 { (JSJitGetterOp)passUTF8String },
16403 { prototypes::id::TestExampleInterface },
16404 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16405 JSJitInfo::Method,
16406 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16407 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16408 false, /* isInfallible. False in setters. */
16409 false, /* isMovable. Not relevant for setters. */
16410 false, /* isEliminatable. Not relevant for setters. */
16411 false, /* isAlwaysInSlot. Only relevant for getters. */
16412 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16413 false, /* isTypedMethod. Only relevant for methods. */
16414 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16415};
16416
16417MOZ_CAN_RUN_SCRIPT static bool
16418passNullableUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16419{
16420 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16423( cx, "TestExampleInterface"
, "passNullableUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16421 "TestExampleInterface", "passNullableUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16423( cx, "TestExampleInterface"
, "passNullableUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16422 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16423( cx, "TestExampleInterface"
, "passNullableUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16423 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16423( cx, "TestExampleInterface"
, "passNullableUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16424
16425 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16426 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableUTF8String", 1)) {
16427 return false;
16428 }
16429 binding_detail::FakeString<char> arg0;
16430 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
16431 return false;
16432 }
16433 // NOTE: This assert does NOT call the function.
16434 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUTF8String(Constify(arg0)))>, "Should be returning void here");
16435 MOZ_KnownLive(self)(self)->PassNullableUTF8String(Constify(arg0));
16436 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16436); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16436; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16437 args.rval().setUndefined();
16438 return true;
16439}
16440
16441static const JSJitInfo passNullableUTF8String_methodinfo = {
16442 { (JSJitGetterOp)passNullableUTF8String },
16443 { prototypes::id::TestExampleInterface },
16444 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16445 JSJitInfo::Method,
16446 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16447 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16448 false, /* isInfallible. False in setters. */
16449 false, /* isMovable. Not relevant for setters. */
16450 false, /* isEliminatable. Not relevant for setters. */
16451 false, /* isAlwaysInSlot. Only relevant for getters. */
16452 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16453 false, /* isTypedMethod. Only relevant for methods. */
16454 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16455};
16456
16457MOZ_CAN_RUN_SCRIPT static bool
16458passOptionalUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16459{
16460 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16463( cx, "TestExampleInterface"
, "passOptionalUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16461 "TestExampleInterface", "passOptionalUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16463( cx, "TestExampleInterface"
, "passOptionalUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16462 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16463( cx, "TestExampleInterface"
, "passOptionalUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16463 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16463( cx, "TestExampleInterface"
, "passOptionalUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16464
16465 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16466 Optional<nsACString> arg0;
16467 binding_detail::FakeString<char> arg0_holder;
16468 if (args.hasDefined(0)) {
16469 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0_holder)) {
16470 return false;
16471 }
16472 arg0 = &arg0_holder;
16473 }
16474 // NOTE: This assert does NOT call the function.
16475 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUTF8String(Constify(arg0)))>, "Should be returning void here");
16476 MOZ_KnownLive(self)(self)->PassOptionalUTF8String(Constify(arg0));
16477 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16477); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16477; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16478 args.rval().setUndefined();
16479 return true;
16480}
16481
16482static const JSJitInfo passOptionalUTF8String_methodinfo = {
16483 { (JSJitGetterOp)passOptionalUTF8String },
16484 { prototypes::id::TestExampleInterface },
16485 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16486 JSJitInfo::Method,
16487 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16488 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16489 false, /* isInfallible. False in setters. */
16490 false, /* isMovable. Not relevant for setters. */
16491 false, /* isEliminatable. Not relevant for setters. */
16492 false, /* isAlwaysInSlot. Only relevant for getters. */
16493 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16494 false, /* isTypedMethod. Only relevant for methods. */
16495 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16496};
16497
16498MOZ_CAN_RUN_SCRIPT static bool
16499passOptionalUTF8StringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16500{
16501 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16504( cx, "TestExampleInterface"
, "passOptionalUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16502 "TestExampleInterface", "passOptionalUTF8StringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16504( cx, "TestExampleInterface"
, "passOptionalUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16503 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16504( cx, "TestExampleInterface"
, "passOptionalUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16504 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16504( cx, "TestExampleInterface"
, "passOptionalUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16505
16506 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16507 binding_detail::FakeString<char> arg0;
16508 if (args.hasDefined(0)) {
16509 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
16510 return false;
16511 }
16512 } else {
16513 arg0.AssignLiteral("abc");
16514 }
16515 // NOTE: This assert does NOT call the function.
16516 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUTF8StringWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
16517 MOZ_KnownLive(self)(self)->PassOptionalUTF8StringWithDefaultValue(Constify(arg0));
16518 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16518); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16518; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16519 args.rval().setUndefined();
16520 return true;
16521}
16522
16523static const JSJitInfo passOptionalUTF8StringWithDefaultValue_methodinfo = {
16524 { (JSJitGetterOp)passOptionalUTF8StringWithDefaultValue },
16525 { prototypes::id::TestExampleInterface },
16526 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16527 JSJitInfo::Method,
16528 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16529 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16530 false, /* isInfallible. False in setters. */
16531 false, /* isMovable. Not relevant for setters. */
16532 false, /* isEliminatable. Not relevant for setters. */
16533 false, /* isAlwaysInSlot. Only relevant for getters. */
16534 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16535 false, /* isTypedMethod. Only relevant for methods. */
16536 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16537};
16538
16539MOZ_CAN_RUN_SCRIPT static bool
16540passOptionalNullableUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16541{
16542 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16545( cx, "TestExampleInterface"
, "passOptionalNullableUTF8String", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16543 "TestExampleInterface", "passOptionalNullableUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16545( cx, "TestExampleInterface"
, "passOptionalNullableUTF8String", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16544 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16545( cx, "TestExampleInterface"
, "passOptionalNullableUTF8String", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16545 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16545( cx, "TestExampleInterface"
, "passOptionalNullableUTF8String", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16546
16547 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16548 Optional<nsACString> arg0;
16549 binding_detail::FakeString<char> arg0_holder;
16550 if (args.hasDefined(0)) {
16551 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0_holder)) {
16552 return false;
16553 }
16554 arg0 = &arg0_holder;
16555 }
16556 // NOTE: This assert does NOT call the function.
16557 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableUTF8String(Constify(arg0)))>, "Should be returning void here");
16558 MOZ_KnownLive(self)(self)->PassOptionalNullableUTF8String(Constify(arg0));
16559 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16559); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16559; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16560 args.rval().setUndefined();
16561 return true;
16562}
16563
16564static const JSJitInfo passOptionalNullableUTF8String_methodinfo = {
16565 { (JSJitGetterOp)passOptionalNullableUTF8String },
16566 { prototypes::id::TestExampleInterface },
16567 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16568 JSJitInfo::Method,
16569 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16570 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16571 false, /* isInfallible. False in setters. */
16572 false, /* isMovable. Not relevant for setters. */
16573 false, /* isEliminatable. Not relevant for setters. */
16574 false, /* isAlwaysInSlot. Only relevant for getters. */
16575 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16576 false, /* isTypedMethod. Only relevant for methods. */
16577 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16578};
16579
16580MOZ_CAN_RUN_SCRIPT static bool
16581passOptionalNullableUTF8StringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16582{
16583 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16586( cx, "TestExampleInterface"
, "passOptionalNullableUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16584 "TestExampleInterface", "passOptionalNullableUTF8StringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16586( cx, "TestExampleInterface"
, "passOptionalNullableUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16585 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16586( cx, "TestExampleInterface"
, "passOptionalNullableUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16586 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16586( cx, "TestExampleInterface"
, "passOptionalNullableUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16587
16588 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16589 binding_detail::FakeString<char> arg0;
16590 if (args.hasDefined(0)) {
16591 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
16592 return false;
16593 }
16594 } else {
16595 arg0.SetIsVoid(true);
16596 }
16597 // NOTE: This assert does NOT call the function.
16598 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableUTF8StringWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
16599 MOZ_KnownLive(self)(self)->PassOptionalNullableUTF8StringWithDefaultValue(Constify(arg0));
16600 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16600); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16600; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16601 args.rval().setUndefined();
16602 return true;
16603}
16604
16605static const JSJitInfo passOptionalNullableUTF8StringWithDefaultValue_methodinfo = {
16606 { (JSJitGetterOp)passOptionalNullableUTF8StringWithDefaultValue },
16607 { prototypes::id::TestExampleInterface },
16608 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16609 JSJitInfo::Method,
16610 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16611 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16612 false, /* isInfallible. False in setters. */
16613 false, /* isMovable. Not relevant for setters. */
16614 false, /* isEliminatable. Not relevant for setters. */
16615 false, /* isAlwaysInSlot. Only relevant for getters. */
16616 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16617 false, /* isTypedMethod. Only relevant for methods. */
16618 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16619};
16620
16621MOZ_CAN_RUN_SCRIPT static bool
16622passVariadicUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16623{
16624 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16627( cx, "TestExampleInterface"
, "passVariadicUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16625 "TestExampleInterface", "passVariadicUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16627( cx, "TestExampleInterface"
, "passVariadicUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16626 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16627( cx, "TestExampleInterface"
, "passVariadicUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16627 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16627( cx, "TestExampleInterface"
, "passVariadicUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16628
16629 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16630 AutoSequence<nsCString> arg0;
16631 if (args.length() > 0) {
16632 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
16633 JS_ReportOutOfMemory(cx);
16634 return false;
16635 }
16636 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
16637 // OK to do infallible append here, since we ensured capacity already.
16638 nsCString& slot = *arg0.AppendElement();
16639 if (!ConvertJSValueToString(cx, args[variadicArg], eStringify, eStringify, slot)) {
16640 return false;
16641 }
16642 }
16643 }
16644 // NOTE: This assert does NOT call the function.
16645 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicUTF8String(Constify(arg0)))>, "Should be returning void here");
16646 MOZ_KnownLive(self)(self)->PassVariadicUTF8String(Constify(arg0));
16647 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16647); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16647; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16648 args.rval().setUndefined();
16649 return true;
16650}
16651
16652static const JSJitInfo passVariadicUTF8String_methodinfo = {
16653 { (JSJitGetterOp)passVariadicUTF8String },
16654 { prototypes::id::TestExampleInterface },
16655 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16656 JSJitInfo::Method,
16657 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16658 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16659 false, /* isInfallible. False in setters. */
16660 false, /* isMovable. Not relevant for setters. */
16661 false, /* isEliminatable. Not relevant for setters. */
16662 false, /* isAlwaysInSlot. Only relevant for getters. */
16663 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16664 false, /* isTypedMethod. Only relevant for methods. */
16665 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16666};
16667
16668MOZ_CAN_RUN_SCRIPT static bool
16669passUnionUTF8String(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16670{
16671 BindingCallContext cx(cx_, "TestExampleInterface.passUnionUTF8String");
16672 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16675( cx, "TestExampleInterface"
, "passUnionUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16673 "TestExampleInterface", "passUnionUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16675( cx, "TestExampleInterface"
, "passUnionUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16674 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16675( cx, "TestExampleInterface"
, "passUnionUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16675 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16675( cx, "TestExampleInterface"
, "passUnionUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16676
16677 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16678 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionUTF8String", 1)) {
16679 return false;
16680 }
16681 UTF8StringOrLong arg0;
16682 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
16683 return false;
16684 }
16685 // NOTE: This assert does NOT call the function.
16686 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionUTF8String(Constify(arg0)))>, "Should be returning void here");
16687 MOZ_KnownLive(self)(self)->PassUnionUTF8String(Constify(arg0));
16688 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16688); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16688; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16689 args.rval().setUndefined();
16690 return true;
16691}
16692
16693static const JSJitInfo passUnionUTF8String_methodinfo = {
16694 { (JSJitGetterOp)passUnionUTF8String },
16695 { prototypes::id::TestExampleInterface },
16696 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16697 JSJitInfo::Method,
16698 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16699 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16700 false, /* isInfallible. False in setters. */
16701 false, /* isMovable. Not relevant for setters. */
16702 false, /* isEliminatable. Not relevant for setters. */
16703 false, /* isAlwaysInSlot. Only relevant for getters. */
16704 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16705 false, /* isTypedMethod. Only relevant for methods. */
16706 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16707};
16708
16709MOZ_CAN_RUN_SCRIPT static bool
16710passOptionalUnionUTF8String(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16711{
16712 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalUnionUTF8String");
16713 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16716( cx, "TestExampleInterface"
, "passOptionalUnionUTF8String", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16714 "TestExampleInterface", "passOptionalUnionUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16716( cx, "TestExampleInterface"
, "passOptionalUnionUTF8String", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16715 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16716( cx, "TestExampleInterface"
, "passOptionalUnionUTF8String", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16716 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16716( cx, "TestExampleInterface"
, "passOptionalUnionUTF8String", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16717
16718 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16719 Optional<UTF8StringOrLong> arg0;
16720 if (args.hasDefined(0)) {
16721 arg0.Construct();
16722 if (!arg0.Value().Init(cx, args[0], "Argument 1", false)) {
16723 return false;
16724 }
16725 }
16726 // NOTE: This assert does NOT call the function.
16727 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnionUTF8String(Constify(arg0)))>, "Should be returning void here");
16728 MOZ_KnownLive(self)(self)->PassOptionalUnionUTF8String(Constify(arg0));
16729 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16729); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16729; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16730 args.rval().setUndefined();
16731 return true;
16732}
16733
16734static const JSJitInfo passOptionalUnionUTF8String_methodinfo = {
16735 { (JSJitGetterOp)passOptionalUnionUTF8String },
16736 { prototypes::id::TestExampleInterface },
16737 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16738 JSJitInfo::Method,
16739 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16740 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16741 false, /* isInfallible. False in setters. */
16742 false, /* isMovable. Not relevant for setters. */
16743 false, /* isEliminatable. Not relevant for setters. */
16744 false, /* isAlwaysInSlot. Only relevant for getters. */
16745 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16746 false, /* isTypedMethod. Only relevant for methods. */
16747 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16748};
16749
16750MOZ_CAN_RUN_SCRIPT static bool
16751passOptionalUnionUTF8StringWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16752{
16753 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalUnionUTF8StringWithDefaultValue");
16754 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16757( cx, "TestExampleInterface"
, "passOptionalUnionUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16755 "TestExampleInterface", "passOptionalUnionUTF8StringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16757( cx, "TestExampleInterface"
, "passOptionalUnionUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16756 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16757( cx, "TestExampleInterface"
, "passOptionalUnionUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16757 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16757( cx, "TestExampleInterface"
, "passOptionalUnionUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16758
16759 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16760 UTF8StringOrLong arg0;
16761 if (!(args.hasDefined(0))) {
16762 arg0.SetStringLiteral("abc");
16763 } else {
16764 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
16765 return false;
16766 }
16767 }
16768 // NOTE: This assert does NOT call the function.
16769 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnionUTF8StringWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
16770 MOZ_KnownLive(self)(self)->PassOptionalUnionUTF8StringWithDefaultValue(Constify(arg0));
16771 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16771); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16771; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16772 args.rval().setUndefined();
16773 return true;
16774}
16775
16776static const JSJitInfo passOptionalUnionUTF8StringWithDefaultValue_methodinfo = {
16777 { (JSJitGetterOp)passOptionalUnionUTF8StringWithDefaultValue },
16778 { prototypes::id::TestExampleInterface },
16779 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16780 JSJitInfo::Method,
16781 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16782 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16783 false, /* isInfallible. False in setters. */
16784 false, /* isMovable. Not relevant for setters. */
16785 false, /* isEliminatable. Not relevant for setters. */
16786 false, /* isAlwaysInSlot. Only relevant for getters. */
16787 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16788 false, /* isTypedMethod. Only relevant for methods. */
16789 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16790};
16791
16792MOZ_CAN_RUN_SCRIPT static bool
16793passSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16794{
16795 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16798( cx, "TestExampleInterface"
, "passSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
16796 "TestExampleInterface", "passSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16798( cx, "TestExampleInterface"
, "passSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
16797 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16798( cx, "TestExampleInterface"
, "passSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
16798 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16798( cx, "TestExampleInterface"
, "passSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
16799
16800 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16801 if (!args.requireAtLeast(cx, "TestExampleInterface.passSVS", 1)) {
16802 return false;
16803 }
16804 binding_detail::FakeString<char16_t> arg0;
16805 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
16806 return false;
16807 }
16808 if (!NormalizeUSVString(arg0)) {
16809 JS_ReportOutOfMemory(cx);
16810 return false;
16811 }
16812 // NOTE: This assert does NOT call the function.
16813 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSVS(Constify(arg0)))>, "Should be returning void here");
16814 MOZ_KnownLive(self)(self)->PassSVS(Constify(arg0));
16815 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16815); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16815; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16816 args.rval().setUndefined();
16817 return true;
16818}
16819
16820static const JSJitInfo passSVS_methodinfo = {
16821 { (JSJitGetterOp)passSVS },
16822 { prototypes::id::TestExampleInterface },
16823 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16824 JSJitInfo::Method,
16825 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16826 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16827 false, /* isInfallible. False in setters. */
16828 false, /* isMovable. Not relevant for setters. */
16829 false, /* isEliminatable. Not relevant for setters. */
16830 false, /* isAlwaysInSlot. Only relevant for getters. */
16831 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16832 false, /* isTypedMethod. Only relevant for methods. */
16833 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16834};
16835
16836MOZ_CAN_RUN_SCRIPT static bool
16837passNullableSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16838{
16839 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16842( cx, "TestExampleInterface"
, "passNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16840 "TestExampleInterface", "passNullableSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16842( cx, "TestExampleInterface"
, "passNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16841 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16842( cx, "TestExampleInterface"
, "passNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16842 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16842( cx, "TestExampleInterface"
, "passNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16843
16844 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16845 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableSVS", 1)) {
16846 return false;
16847 }
16848 binding_detail::FakeString<char16_t> arg0;
16849 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
16850 return false;
16851 }
16852 if (!NormalizeUSVString(arg0)) {
16853 JS_ReportOutOfMemory(cx);
16854 return false;
16855 }
16856 // NOTE: This assert does NOT call the function.
16857 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSVS(Constify(arg0)))>, "Should be returning void here");
16858 MOZ_KnownLive(self)(self)->PassNullableSVS(Constify(arg0));
16859 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16859); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16859; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16860 args.rval().setUndefined();
16861 return true;
16862}
16863
16864static const JSJitInfo passNullableSVS_methodinfo = {
16865 { (JSJitGetterOp)passNullableSVS },
16866 { prototypes::id::TestExampleInterface },
16867 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16868 JSJitInfo::Method,
16869 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16870 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16871 false, /* isInfallible. False in setters. */
16872 false, /* isMovable. Not relevant for setters. */
16873 false, /* isEliminatable. Not relevant for setters. */
16874 false, /* isAlwaysInSlot. Only relevant for getters. */
16875 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16876 false, /* isTypedMethod. Only relevant for methods. */
16877 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16878};
16879
16880MOZ_CAN_RUN_SCRIPT static bool
16881passOptionalSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16882{
16883 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16886( cx, "TestExampleInterface"
, "passOptionalSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16884 "TestExampleInterface", "passOptionalSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16886( cx, "TestExampleInterface"
, "passOptionalSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16885 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16886( cx, "TestExampleInterface"
, "passOptionalSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16886 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16886( cx, "TestExampleInterface"
, "passOptionalSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16887
16888 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16889 Optional<nsAString> arg0;
16890 binding_detail::FakeString<char16_t> arg0_holder;
16891 if (args.hasDefined(0)) {
16892 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0_holder)) {
16893 return false;
16894 }
16895 if (!NormalizeUSVString(arg0_holder)) {
16896 JS_ReportOutOfMemory(cx);
16897 return false;
16898 }
16899 arg0 = &arg0_holder;
16900 }
16901 // NOTE: This assert does NOT call the function.
16902 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSVS(Constify(arg0)))>, "Should be returning void here");
16903 MOZ_KnownLive(self)(self)->PassOptionalSVS(Constify(arg0));
16904 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16904); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16904; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16905 args.rval().setUndefined();
16906 return true;
16907}
16908
16909static const JSJitInfo passOptionalSVS_methodinfo = {
16910 { (JSJitGetterOp)passOptionalSVS },
16911 { prototypes::id::TestExampleInterface },
16912 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16913 JSJitInfo::Method,
16914 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16915 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16916 false, /* isInfallible. False in setters. */
16917 false, /* isMovable. Not relevant for setters. */
16918 false, /* isEliminatable. Not relevant for setters. */
16919 false, /* isAlwaysInSlot. Only relevant for getters. */
16920 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16921 false, /* isTypedMethod. Only relevant for methods. */
16922 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16923};
16924
16925MOZ_CAN_RUN_SCRIPT static bool
16926passOptionalSVSWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16927{
16928 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16931( cx, "TestExampleInterface"
, "passOptionalSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16929 "TestExampleInterface", "passOptionalSVSWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16931( cx, "TestExampleInterface"
, "passOptionalSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16930 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16931( cx, "TestExampleInterface"
, "passOptionalSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16931 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16931( cx, "TestExampleInterface"
, "passOptionalSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16932
16933 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16934 binding_detail::FakeString<char16_t> arg0;
16935 if (args.hasDefined(0)) {
16936 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
16937 return false;
16938 }
16939 if (!NormalizeUSVString(arg0)) {
16940 JS_ReportOutOfMemory(cx);
16941 return false;
16942 }
16943 } else {
16944 arg0.AssignLiteral(u"abc");
16945 }
16946 // NOTE: This assert does NOT call the function.
16947 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSVSWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
16948 MOZ_KnownLive(self)(self)->PassOptionalSVSWithDefaultValue(Constify(arg0));
16949 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16949); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16949; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16950 args.rval().setUndefined();
16951 return true;
16952}
16953
16954static const JSJitInfo passOptionalSVSWithDefaultValue_methodinfo = {
16955 { (JSJitGetterOp)passOptionalSVSWithDefaultValue },
16956 { prototypes::id::TestExampleInterface },
16957 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
16958 JSJitInfo::Method,
16959 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16960 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16961 false, /* isInfallible. False in setters. */
16962 false, /* isMovable. Not relevant for setters. */
16963 false, /* isEliminatable. Not relevant for setters. */
16964 false, /* isAlwaysInSlot. Only relevant for getters. */
16965 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16966 false, /* isTypedMethod. Only relevant for methods. */
16967 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16968};
16969
16970MOZ_CAN_RUN_SCRIPT static bool
16971passOptionalNullableSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16972{
16973 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16976( cx, "TestExampleInterface"
, "passOptionalNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16974 "TestExampleInterface", "passOptionalNullableSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16976( cx, "TestExampleInterface"
, "passOptionalNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16975 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16976( cx, "TestExampleInterface"
, "passOptionalNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16976 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16976( cx, "TestExampleInterface"
, "passOptionalNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16977
16978 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
16979 Optional<nsAString> arg0;
16980 binding_detail::FakeString<char16_t> arg0_holder;
16981 if (args.hasDefined(0)) {
16982 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0_holder)) {
16983 return false;
16984 }
16985 if (!NormalizeUSVString(arg0_holder)) {
16986 JS_ReportOutOfMemory(cx);
16987 return false;
16988 }
16989 arg0 = &arg0_holder;
16990 }
16991 // NOTE: This assert does NOT call the function.
16992 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSVS(Constify(arg0)))>, "Should be returning void here");
16993 MOZ_KnownLive(self)(self)->PassOptionalNullableSVS(Constify(arg0));
16994 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 16994); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16994; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16995 args.rval().setUndefined();
16996 return true;
16997}
16998
16999static const JSJitInfo passOptionalNullableSVS_methodinfo = {
17000 { (JSJitGetterOp)passOptionalNullableSVS },
17001 { prototypes::id::TestExampleInterface },
17002 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17003 JSJitInfo::Method,
17004 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17005 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17006 false, /* isInfallible. False in setters. */
17007 false, /* isMovable. Not relevant for setters. */
17008 false, /* isEliminatable. Not relevant for setters. */
17009 false, /* isAlwaysInSlot. Only relevant for getters. */
17010 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17011 false, /* isTypedMethod. Only relevant for methods. */
17012 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17013};
17014
17015MOZ_CAN_RUN_SCRIPT static bool
17016passOptionalNullableSVSWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17017{
17018 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17021( cx, "TestExampleInterface"
, "passOptionalNullableSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17019 "TestExampleInterface", "passOptionalNullableSVSWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17021( cx, "TestExampleInterface"
, "passOptionalNullableSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17020 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17021( cx, "TestExampleInterface"
, "passOptionalNullableSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17021 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17021( cx, "TestExampleInterface"
, "passOptionalNullableSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17022
17023 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17024 binding_detail::FakeString<char16_t> arg0;
17025 if (args.hasDefined(0)) {
17026 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
17027 return false;
17028 }
17029 if (!NormalizeUSVString(arg0)) {
17030 JS_ReportOutOfMemory(cx);
17031 return false;
17032 }
17033 } else {
17034 arg0.SetIsVoid(true);
17035 }
17036 // NOTE: This assert does NOT call the function.
17037 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSVSWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
17038 MOZ_KnownLive(self)(self)->PassOptionalNullableSVSWithDefaultValue(Constify(arg0));
17039 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17039); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17039; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17040 args.rval().setUndefined();
17041 return true;
17042}
17043
17044static const JSJitInfo passOptionalNullableSVSWithDefaultValue_methodinfo = {
17045 { (JSJitGetterOp)passOptionalNullableSVSWithDefaultValue },
17046 { prototypes::id::TestExampleInterface },
17047 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17048 JSJitInfo::Method,
17049 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17050 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17051 false, /* isInfallible. False in setters. */
17052 false, /* isMovable. Not relevant for setters. */
17053 false, /* isEliminatable. Not relevant for setters. */
17054 false, /* isAlwaysInSlot. Only relevant for getters. */
17055 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17056 false, /* isTypedMethod. Only relevant for methods. */
17057 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17058};
17059
17060MOZ_CAN_RUN_SCRIPT static bool
17061passVariadicSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17062{
17063 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17066( cx, "TestExampleInterface"
, "passVariadicSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17064 "TestExampleInterface", "passVariadicSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17066( cx, "TestExampleInterface"
, "passVariadicSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17065 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17066( cx, "TestExampleInterface"
, "passVariadicSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17066 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17066( cx, "TestExampleInterface"
, "passVariadicSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17067
17068 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17069 AutoSequence<nsString> arg0;
17070 if (args.length() > 0) {
17071 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
17072 JS_ReportOutOfMemory(cx);
17073 return false;
17074 }
17075 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
17076 // OK to do infallible append here, since we ensured capacity already.
17077 nsString& slot = *arg0.AppendElement();
17078 if (!ConvertJSValueToString(cx, args[variadicArg], eStringify, eStringify, slot)) {
17079 return false;
17080 }
17081 if (!NormalizeUSVString(slot)) {
17082 JS_ReportOutOfMemory(cx);
17083 return false;
17084 }
17085 }
17086 }
17087 // NOTE: This assert does NOT call the function.
17088 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicSVS(Constify(arg0)))>, "Should be returning void here");
17089 MOZ_KnownLive(self)(self)->PassVariadicSVS(Constify(arg0));
17090 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17090); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17090; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17091 args.rval().setUndefined();
17092 return true;
17093}
17094
17095static const JSJitInfo passVariadicSVS_methodinfo = {
17096 { (JSJitGetterOp)passVariadicSVS },
17097 { prototypes::id::TestExampleInterface },
17098 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17099 JSJitInfo::Method,
17100 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17101 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17102 false, /* isInfallible. False in setters. */
17103 false, /* isMovable. Not relevant for setters. */
17104 false, /* isEliminatable. Not relevant for setters. */
17105 false, /* isAlwaysInSlot. Only relevant for getters. */
17106 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17107 false, /* isTypedMethod. Only relevant for methods. */
17108 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17109};
17110
17111MOZ_CAN_RUN_SCRIPT static bool
17112receiveSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17113{
17114 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17117( cx, "TestExampleInterface"
, "receiveSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17115 "TestExampleInterface", "receiveSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17117( cx, "TestExampleInterface"
, "receiveSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17116 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17117( cx, "TestExampleInterface"
, "receiveSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17117 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17117( cx, "TestExampleInterface"
, "receiveSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17118
17119 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17120 DOMString result;
17121 // NOTE: This assert does NOT call the function.
17122 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveSVS(result))>, "Should be returning void here");
17123 MOZ_KnownLive(self)(self)->ReceiveSVS(result);
17124 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17124); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17124; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17125 if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
17126 return false;
17127 }
17128 return true;
17129}
17130
17131static const JSJitInfo receiveSVS_methodinfo = {
17132 { (JSJitGetterOp)receiveSVS },
17133 { prototypes::id::TestExampleInterface },
17134 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17135 JSJitInfo::Method,
17136 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17137 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
17138 false, /* isInfallible. False in setters. */
17139 false, /* isMovable. Not relevant for setters. */
17140 false, /* isEliminatable. Not relevant for setters. */
17141 false, /* isAlwaysInSlot. Only relevant for getters. */
17142 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17143 false, /* isTypedMethod. Only relevant for methods. */
17144 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17145};
17146
17147MOZ_CAN_RUN_SCRIPT static bool
17148passJSString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17149{
17150 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17153( cx, "TestExampleInterface"
, "passJSString", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17151 "TestExampleInterface", "passJSString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17153( cx, "TestExampleInterface"
, "passJSString", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17152 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17153( cx, "TestExampleInterface"
, "passJSString", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17153 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17153( cx, "TestExampleInterface"
, "passJSString", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17154
17155 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17156 if (!args.requireAtLeast(cx, "TestExampleInterface.passJSString", 1)) {
17157 return false;
17158 }
17159 JS::Rooted<JSString*> arg0(cx);
17160 if (!(arg0 = ConvertJSValueToJSString(cx, args[0]))) {
17161 return false;
17162 }
17163 // NOTE: This assert does NOT call the function.
17164 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassJSString(cx, Constify(arg0)))>, "Should be returning void here");
17165 MOZ_KnownLive(self)(self)->PassJSString(cx, Constify(arg0));
17166 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17166); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17166; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17167 args.rval().setUndefined();
17168 return true;
17169}
17170
17171static const JSJitInfo passJSString_methodinfo = {
17172 { (JSJitGetterOp)passJSString },
17173 { prototypes::id::TestExampleInterface },
17174 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17175 JSJitInfo::Method,
17176 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17177 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17178 false, /* isInfallible. False in setters. */
17179 false, /* isMovable. Not relevant for setters. */
17180 false, /* isEliminatable. Not relevant for setters. */
17181 false, /* isAlwaysInSlot. Only relevant for getters. */
17182 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17183 false, /* isTypedMethod. Only relevant for methods. */
17184 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17185};
17186
17187MOZ_CAN_RUN_SCRIPT static bool
17188passOptionalJSStringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17189{
17190 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17193( cx, "TestExampleInterface"
, "passOptionalJSStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17191 "TestExampleInterface", "passOptionalJSStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17193( cx, "TestExampleInterface"
, "passOptionalJSStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17192 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17193( cx, "TestExampleInterface"
, "passOptionalJSStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17193 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17193( cx, "TestExampleInterface"
, "passOptionalJSStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17194
17195 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17196 JS::Rooted<JSString*> arg0(cx);
17197 if (args.hasDefined(0)) {
17198 if (!(arg0 = ConvertJSValueToJSString(cx, args[0]))) {
17199 return false;
17200 }
17201 } else {
17202 static const char data[] = { 'a', 'b', 'c', 0 };
17203 arg0 = JS_NewStringCopyN(cx, data, ArrayLength(data) - 1);
17204 if (!arg0) {
17205 return false;
17206 }
17207 }
17208 // NOTE: This assert does NOT call the function.
17209 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalJSStringWithDefaultValue(cx, Constify(arg0)))>, "Should be returning void here");
17210 MOZ_KnownLive(self)(self)->PassOptionalJSStringWithDefaultValue(cx, Constify(arg0));
17211 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17211); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17211; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17212 args.rval().setUndefined();
17213 return true;
17214}
17215
17216static const JSJitInfo passOptionalJSStringWithDefaultValue_methodinfo = {
17217 { (JSJitGetterOp)passOptionalJSStringWithDefaultValue },
17218 { prototypes::id::TestExampleInterface },
17219 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17220 JSJitInfo::Method,
17221 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17222 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17223 false, /* isInfallible. False in setters. */
17224 false, /* isMovable. Not relevant for setters. */
17225 false, /* isEliminatable. Not relevant for setters. */
17226 false, /* isAlwaysInSlot. Only relevant for getters. */
17227 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17228 false, /* isTypedMethod. Only relevant for methods. */
17229 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17230};
17231
17232MOZ_CAN_RUN_SCRIPT static bool
17233receiveJSString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17234{
17235 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17238( cx, "TestExampleInterface"
, "receiveJSString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17236 "TestExampleInterface", "receiveJSString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17238( cx, "TestExampleInterface"
, "receiveJSString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17237 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17238( cx, "TestExampleInterface"
, "receiveJSString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17238 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17238( cx, "TestExampleInterface"
, "receiveJSString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17239
17240 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17241 JS::Rooted<JSString*> result(cx);
17242 // NOTE: This assert does NOT call the function.
17243 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveJSString(cx, &result))>, "Should be returning void here");
17244 MOZ_KnownLive(self)(self)->ReceiveJSString(cx, &result);
17245 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17245); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17245; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17246 args.rval().setString(result);
17247 if (!MaybeWrapStringValue(cx, args.rval())) {
17248 return false;
17249 }
17250 return true;
17251}
17252
17253static const JSJitInfo receiveJSString_methodinfo = {
17254 { (JSJitGetterOp)receiveJSString },
17255 { prototypes::id::TestExampleInterface },
17256 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17257 JSJitInfo::Method,
17258 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17259 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
17260 false, /* isInfallible. False in setters. */
17261 false, /* isMovable. Not relevant for setters. */
17262 false, /* isEliminatable. Not relevant for setters. */
17263 false, /* isAlwaysInSlot. Only relevant for getters. */
17264 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17265 false, /* isTypedMethod. Only relevant for methods. */
17266 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17267};
17268
17269MOZ_CAN_RUN_SCRIPT static bool
17270get_readonlyJSStringAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
17271{
17272 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17275( cx, "TestExampleInterface"
, "readonlyJSStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17273 "TestExampleInterface", "readonlyJSStringAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17275( cx, "TestExampleInterface"
, "readonlyJSStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17274 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject17275( cx, "TestExampleInterface"
, "readonlyJSStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17275 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17275( cx, "TestExampleInterface"
, "readonlyJSStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17276
17277 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17278 JS::Rooted<JSString*> result(cx);
17279 // NOTE: This assert does NOT call the function.
17280 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlyJSStringAttr(cx, &result))>, "Should be returning void here");
17281 MOZ_KnownLive(self)(self)->GetReadonlyJSStringAttr(cx, &result);
17282 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17282); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17282; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17283 args.rval().setString(result);
17284 if (!MaybeWrapStringValue(cx, args.rval())) {
17285 return false;
17286 }
17287 return true;
17288}
17289
17290static const JSJitInfo readonlyJSStringAttr_getterinfo = {
17291 { get_readonlyJSStringAttr },
17292 { prototypes::id::TestExampleInterface },
17293 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17294 JSJitInfo::Getter,
17295 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17296 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
17297 false, /* isInfallible. False in setters. */
17298 false, /* isMovable. Not relevant for setters. */
17299 false, /* isEliminatable. Not relevant for setters. */
17300 false, /* isAlwaysInSlot. Only relevant for getters. */
17301 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17302 false, /* isTypedMethod. Only relevant for methods. */
17303 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17304};
17305
17306MOZ_CAN_RUN_SCRIPT static bool
17307get_jsStringAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
17308{
17309 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17312( cx, "TestExampleInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17310 "TestExampleInterface", "jsStringAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17312( cx, "TestExampleInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17311 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject17312( cx, "TestExampleInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17312 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17312( cx, "TestExampleInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17313
17314 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17315 JS::Rooted<JSString*> result(cx);
17316 // NOTE: This assert does NOT call the function.
17317 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetJsStringAttr(cx, &result))>, "Should be returning void here");
17318 MOZ_KnownLive(self)(self)->GetJsStringAttr(cx, &result);
17319 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17319); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17319; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17320 args.rval().setString(result);
17321 if (!MaybeWrapStringValue(cx, args.rval())) {
17322 return false;
17323 }
17324 return true;
17325}
17326
17327MOZ_CAN_RUN_SCRIPT static bool
17328set_jsStringAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
17329{
17330 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17333( cx, "TestExampleInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17331 "TestExampleInterface", "jsStringAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17333( cx, "TestExampleInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17332 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject17333( cx, "TestExampleInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17333 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17333( cx, "TestExampleInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17334
17335 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17336 JS::Rooted<JSString*> arg0(cx);
17337 if (!(arg0 = ConvertJSValueToJSString(cx, args[0]))) {
17338 return false;
17339 }
17340 // NOTE: This assert does NOT call the function.
17341 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetJsStringAttr(cx, Constify(arg0)))>, "Should be returning void here");
17342 MOZ_KnownLive(self)(self)->SetJsStringAttr(cx, Constify(arg0));
17343 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17343); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17343; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17344
17345 return true;
17346}
17347
17348static const JSJitInfo jsStringAttr_getterinfo = {
17349 { get_jsStringAttr },
17350 { prototypes::id::TestExampleInterface },
17351 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17352 JSJitInfo::Getter,
17353 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17354 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
17355 false, /* isInfallible. False in setters. */
17356 false, /* isMovable. Not relevant for setters. */
17357 false, /* isEliminatable. Not relevant for setters. */
17358 false, /* isAlwaysInSlot. Only relevant for getters. */
17359 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17360 false, /* isTypedMethod. Only relevant for methods. */
17361 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17362};
17363static const JSJitInfo jsStringAttr_setterinfo = {
17364 { (JSJitGetterOp)set_jsStringAttr },
17365 { prototypes::id::TestExampleInterface },
17366 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17367 JSJitInfo::Setter,
17368 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17369 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17370 false, /* isInfallible. False in setters. */
17371 false, /* isMovable. Not relevant for setters. */
17372 false, /* isEliminatable. Not relevant for setters. */
17373 false, /* isAlwaysInSlot. Only relevant for getters. */
17374 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17375 false, /* isTypedMethod. Only relevant for methods. */
17376 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17377};
17378
17379MOZ_CAN_RUN_SCRIPT static bool
17380passEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17381{
17382 BindingCallContext cx(cx_, "TestExampleInterface.passEnum");
17383 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17386( cx, "TestExampleInterface"
, "passEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
17384 "TestExampleInterface", "passEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17386( cx, "TestExampleInterface"
, "passEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
17385 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17386( cx, "TestExampleInterface"
, "passEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
17386 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17386( cx, "TestExampleInterface"
, "passEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
17387
17388 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17389 if (!args.requireAtLeast(cx, "TestExampleInterface.passEnum", 1)) {
17390 return false;
17391 }
17392 TestEnum arg0;
17393 {
17394 int index;
17395 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
17396 binding_detail::EnumStrings<TestEnum>::Values,
17397 "TestEnum", "argument 1",
17398 &index)) {
17399 return false;
17400 }
17401 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",
"../TestExampleGenBinding.cpp", 17401); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 17401; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
17402 arg0 = static_cast<TestEnum>(index);
17403 }
17404 // NOTE: This assert does NOT call the function.
17405 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassEnum(arg0))>, "Should be returning void here");
17406 MOZ_KnownLive(self)(self)->PassEnum(arg0);
17407 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17407); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17407; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17408 args.rval().setUndefined();
17409 return true;
17410}
17411
17412static const JSJitInfo passEnum_methodinfo = {
17413 { (JSJitGetterOp)passEnum },
17414 { prototypes::id::TestExampleInterface },
17415 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17416 JSJitInfo::Method,
17417 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17418 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17419 false, /* isInfallible. False in setters. */
17420 false, /* isMovable. Not relevant for setters. */
17421 false, /* isEliminatable. Not relevant for setters. */
17422 false, /* isAlwaysInSlot. Only relevant for getters. */
17423 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17424 false, /* isTypedMethod. Only relevant for methods. */
17425 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17426};
17427
17428MOZ_CAN_RUN_SCRIPT static bool
17429passNullableEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17430{
17431 BindingCallContext cx(cx_, "TestExampleInterface.passNullableEnum");
17432 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17435( cx, "TestExampleInterface"
, "passNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17433 "TestExampleInterface", "passNullableEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17435( cx, "TestExampleInterface"
, "passNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17434 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17435( cx, "TestExampleInterface"
, "passNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17435 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17435( cx, "TestExampleInterface"
, "passNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17436
17437 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17438 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableEnum", 1)) {
17439 return false;
17440 }
17441 Nullable<TestEnum> arg0;
17442 if (args[0].isNullOrUndefined()) {
17443 arg0.SetNull();
17444 } else {
17445 {
17446 int index;
17447 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
17448 binding_detail::EnumStrings<TestEnum>::Values,
17449 "TestEnum", "argument 1",
17450 &index)) {
17451 return false;
17452 }
17453 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",
"../TestExampleGenBinding.cpp", 17453); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 17453; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
17454 arg0.SetValue() = static_cast<TestEnum>(index);
17455 }
17456 }
17457 // NOTE: This assert does NOT call the function.
17458 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableEnum(Constify(arg0)))>, "Should be returning void here");
17459 MOZ_KnownLive(self)(self)->PassNullableEnum(Constify(arg0));
17460 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17460); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17460; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17461 args.rval().setUndefined();
17462 return true;
17463}
17464
17465static const JSJitInfo passNullableEnum_methodinfo = {
17466 { (JSJitGetterOp)passNullableEnum },
17467 { prototypes::id::TestExampleInterface },
17468 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17469 JSJitInfo::Method,
17470 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17471 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17472 false, /* isInfallible. False in setters. */
17473 false, /* isMovable. Not relevant for setters. */
17474 false, /* isEliminatable. Not relevant for setters. */
17475 false, /* isAlwaysInSlot. Only relevant for getters. */
17476 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17477 false, /* isTypedMethod. Only relevant for methods. */
17478 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17479};
17480
17481MOZ_CAN_RUN_SCRIPT static bool
17482passOptionalEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17483{
17484 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalEnum");
17485 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17488( cx, "TestExampleInterface"
, "passOptionalEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17486 "TestExampleInterface", "passOptionalEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17488( cx, "TestExampleInterface"
, "passOptionalEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17487 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17488( cx, "TestExampleInterface"
, "passOptionalEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17488 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17488( cx, "TestExampleInterface"
, "passOptionalEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17489
17490 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17491 Optional<TestEnum> arg0;
17492 if (args.hasDefined(0)) {
17493 arg0.Construct();
17494 {
17495 int index;
17496 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
17497 binding_detail::EnumStrings<TestEnum>::Values,
17498 "TestEnum", "argument 1",
17499 &index)) {
17500 return false;
17501 }
17502 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",
"../TestExampleGenBinding.cpp", 17502); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 17502; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
17503 arg0.Value() = static_cast<TestEnum>(index);
17504 }
17505 }
17506 // NOTE: This assert does NOT call the function.
17507 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalEnum(Constify(arg0)))>, "Should be returning void here");
17508 MOZ_KnownLive(self)(self)->PassOptionalEnum(Constify(arg0));
17509 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17509); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17509; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17510 args.rval().setUndefined();
17511 return true;
17512}
17513
17514static const JSJitInfo passOptionalEnum_methodinfo = {
17515 { (JSJitGetterOp)passOptionalEnum },
17516 { prototypes::id::TestExampleInterface },
17517 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17518 JSJitInfo::Method,
17519 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17520 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17521 false, /* isInfallible. False in setters. */
17522 false, /* isMovable. Not relevant for setters. */
17523 false, /* isEliminatable. Not relevant for setters. */
17524 false, /* isAlwaysInSlot. Only relevant for getters. */
17525 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17526 false, /* isTypedMethod. Only relevant for methods. */
17527 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17528};
17529
17530MOZ_CAN_RUN_SCRIPT static bool
17531passEnumWithDefault(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17532{
17533 BindingCallContext cx(cx_, "TestExampleInterface.passEnumWithDefault");
17534 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17537( cx, "TestExampleInterface"
, "passEnumWithDefault", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17535 "TestExampleInterface", "passEnumWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17537( cx, "TestExampleInterface"
, "passEnumWithDefault", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17536 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17537( cx, "TestExampleInterface"
, "passEnumWithDefault", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17537 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17537( cx, "TestExampleInterface"
, "passEnumWithDefault", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17538
17539 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17540 TestEnum arg0;
17541 if (args.hasDefined(0)) {
17542 {
17543 int index;
17544 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
17545 binding_detail::EnumStrings<TestEnum>::Values,
17546 "TestEnum", "argument 1",
17547 &index)) {
17548 return false;
17549 }
17550 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",
"../TestExampleGenBinding.cpp", 17550); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 17550; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
17551 arg0 = static_cast<TestEnum>(index);
17552 }
17553 } else {
17554 arg0 = TestEnum::A;
17555 }
17556 // NOTE: This assert does NOT call the function.
17557 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassEnumWithDefault(arg0))>, "Should be returning void here");
17558 MOZ_KnownLive(self)(self)->PassEnumWithDefault(arg0);
17559 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17559); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17559; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17560 args.rval().setUndefined();
17561 return true;
17562}
17563
17564static const JSJitInfo passEnumWithDefault_methodinfo = {
17565 { (JSJitGetterOp)passEnumWithDefault },
17566 { prototypes::id::TestExampleInterface },
17567 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17568 JSJitInfo::Method,
17569 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17570 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17571 false, /* isInfallible. False in setters. */
17572 false, /* isMovable. Not relevant for setters. */
17573 false, /* isEliminatable. Not relevant for setters. */
17574 false, /* isAlwaysInSlot. Only relevant for getters. */
17575 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17576 false, /* isTypedMethod. Only relevant for methods. */
17577 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17578};
17579
17580MOZ_CAN_RUN_SCRIPT static bool
17581passOptionalNullableEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17582{
17583 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableEnum");
17584 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17587( cx, "TestExampleInterface"
, "passOptionalNullableEnum", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17585 "TestExampleInterface", "passOptionalNullableEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17587( cx, "TestExampleInterface"
, "passOptionalNullableEnum", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17586 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17587( cx, "TestExampleInterface"
, "passOptionalNullableEnum", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17587 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17587( cx, "TestExampleInterface"
, "passOptionalNullableEnum", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17588
17589 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17590 Optional<Nullable<TestEnum>> arg0;
17591 if (args.hasDefined(0)) {
17592 arg0.Construct();
17593 if (args[0].isNullOrUndefined()) {
17594 arg0.Value().SetNull();
17595 } else {
17596 {
17597 int index;
17598 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
17599 binding_detail::EnumStrings<TestEnum>::Values,
17600 "TestEnum", "argument 1",
17601 &index)) {
17602 return false;
17603 }
17604 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",
"../TestExampleGenBinding.cpp", 17604); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 17604; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
17605 arg0.Value().SetValue() = static_cast<TestEnum>(index);
17606 }
17607 }
17608 }
17609 // NOTE: This assert does NOT call the function.
17610 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableEnum(Constify(arg0)))>, "Should be returning void here");
17611 MOZ_KnownLive(self)(self)->PassOptionalNullableEnum(Constify(arg0));
17612 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17612); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17612; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17613 args.rval().setUndefined();
17614 return true;
17615}
17616
17617static const JSJitInfo passOptionalNullableEnum_methodinfo = {
17618 { (JSJitGetterOp)passOptionalNullableEnum },
17619 { prototypes::id::TestExampleInterface },
17620 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17621 JSJitInfo::Method,
17622 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17623 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17624 false, /* isInfallible. False in setters. */
17625 false, /* isMovable. Not relevant for setters. */
17626 false, /* isEliminatable. Not relevant for setters. */
17627 false, /* isAlwaysInSlot. Only relevant for getters. */
17628 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17629 false, /* isTypedMethod. Only relevant for methods. */
17630 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17631};
17632
17633MOZ_CAN_RUN_SCRIPT static bool
17634passOptionalNullableEnumWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17635{
17636 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableEnumWithDefaultValue");
17637 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17640( cx, "TestExampleInterface"
, "passOptionalNullableEnumWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17638 "TestExampleInterface", "passOptionalNullableEnumWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17640( cx, "TestExampleInterface"
, "passOptionalNullableEnumWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17639 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17640( cx, "TestExampleInterface"
, "passOptionalNullableEnumWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17640 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17640( cx, "TestExampleInterface"
, "passOptionalNullableEnumWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17641
17642 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17643 Nullable<TestEnum> arg0;
17644 if (args.hasDefined(0)) {
17645 if (args[0].isNullOrUndefined()) {
17646 arg0.SetNull();
17647 } else {
17648 {
17649 int index;
17650 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
17651 binding_detail::EnumStrings<TestEnum>::Values,
17652 "TestEnum", "argument 1",
17653 &index)) {
17654 return false;
17655 }
17656 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",
"../TestExampleGenBinding.cpp", 17656); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 17656; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
17657 arg0.SetValue() = static_cast<TestEnum>(index);
17658 }
17659 }
17660 } else {
17661 arg0.SetNull();
17662 }
17663 // NOTE: This assert does NOT call the function.
17664 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableEnumWithDefaultValue(Constify(arg0)))>, "Should be returning void here");
17665 MOZ_KnownLive(self)(self)->PassOptionalNullableEnumWithDefaultValue(Constify(arg0));
17666 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17666); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17666; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17667 args.rval().setUndefined();
17668 return true;
17669}
17670
17671static const JSJitInfo passOptionalNullableEnumWithDefaultValue_methodinfo = {
17672 { (JSJitGetterOp)passOptionalNullableEnumWithDefaultValue },
17673 { prototypes::id::TestExampleInterface },
17674 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17675 JSJitInfo::Method,
17676 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17677 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17678 false, /* isInfallible. False in setters. */
17679 false, /* isMovable. Not relevant for setters. */
17680 false, /* isEliminatable. Not relevant for setters. */
17681 false, /* isAlwaysInSlot. Only relevant for getters. */
17682 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17683 false, /* isTypedMethod. Only relevant for methods. */
17684 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17685};
17686
17687MOZ_CAN_RUN_SCRIPT static bool
17688passOptionalNullableEnumWithDefaultValue2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17689{
17690 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableEnumWithDefaultValue2");
17691 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17694( cx, "TestExampleInterface"
, "passOptionalNullableEnumWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17692 "TestExampleInterface", "passOptionalNullableEnumWithDefaultValue2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17694( cx, "TestExampleInterface"
, "passOptionalNullableEnumWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17693 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17694( cx, "TestExampleInterface"
, "passOptionalNullableEnumWithDefaultValue2", 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::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17694( cx, "TestExampleInterface"
, "passOptionalNullableEnumWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17695
17696 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17697 Nullable<TestEnum> arg0;
17698 if (args.hasDefined(0)) {
17699 if (args[0].isNullOrUndefined()) {
17700 arg0.SetNull();
17701 } else {
17702 {
17703 int index;
17704 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
17705 binding_detail::EnumStrings<TestEnum>::Values,
17706 "TestEnum", "argument 1",
17707 &index)) {
17708 return false;
17709 }
17710 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",
"../TestExampleGenBinding.cpp", 17710); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 17710; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
17711 arg0.SetValue() = static_cast<TestEnum>(index);
17712 }
17713 }
17714 } else {
17715 arg0.SetValue() = TestEnum::A;
17716 }
17717 // NOTE: This assert does NOT call the function.
17718 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableEnumWithDefaultValue2(Constify(arg0)))>, "Should be returning void here");
17719 MOZ_KnownLive(self)(self)->PassOptionalNullableEnumWithDefaultValue2(Constify(arg0));
17720 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17720); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17720; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17721 args.rval().setUndefined();
17722 return true;
17723}
17724
17725static const JSJitInfo passOptionalNullableEnumWithDefaultValue2_methodinfo = {
17726 { (JSJitGetterOp)passOptionalNullableEnumWithDefaultValue2 },
17727 { prototypes::id::TestExampleInterface },
17728 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17729 JSJitInfo::Method,
17730 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17731 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17732 false, /* isInfallible. False in setters. */
17733 false, /* isMovable. Not relevant for setters. */
17734 false, /* isEliminatable. Not relevant for setters. */
17735 false, /* isAlwaysInSlot. Only relevant for getters. */
17736 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17737 false, /* isTypedMethod. Only relevant for methods. */
17738 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17739};
17740
17741MOZ_CAN_RUN_SCRIPT static bool
17742receiveEnum(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17743{
17744 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17747( cx, "TestExampleInterface"
, "receiveEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17745 "TestExampleInterface", "receiveEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17747( cx, "TestExampleInterface"
, "receiveEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17746 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17747( cx, "TestExampleInterface"
, "receiveEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17747 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17747( cx, "TestExampleInterface"
, "receiveEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17748
17749 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17750 TestEnum result(MOZ_KnownLive(self)(self)->ReceiveEnum());
17751 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17751); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17751; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17752 if (!ToJSValue(cx, result, args.rval())) {
17753 return false;
17754 }
17755 return true;
17756}
17757
17758static const JSJitInfo receiveEnum_methodinfo = {
17759 { (JSJitGetterOp)receiveEnum },
17760 { prototypes::id::TestExampleInterface },
17761 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17762 JSJitInfo::Method,
17763 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17764 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
17765 false, /* isInfallible. False in setters. */
17766 false, /* isMovable. Not relevant for setters. */
17767 false, /* isEliminatable. Not relevant for setters. */
17768 false, /* isAlwaysInSlot. Only relevant for getters. */
17769 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17770 false, /* isTypedMethod. Only relevant for methods. */
17771 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17772};
17773
17774MOZ_CAN_RUN_SCRIPT static bool
17775receiveNullableEnum(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17776{
17777 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17780( cx, "TestExampleInterface"
, "receiveNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17778 "TestExampleInterface", "receiveNullableEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17780( cx, "TestExampleInterface"
, "receiveNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17779 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17780( cx, "TestExampleInterface"
, "receiveNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17780 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17780( cx, "TestExampleInterface"
, "receiveNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17781
17782 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17783 Nullable<TestEnum> result(MOZ_KnownLive(self)(self)->ReceiveNullableEnum());
17784 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17784); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17784; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17785 if (result.IsNull()) {
17786 args.rval().setNull();
17787 return true;
17788 } else {
17789 if (!ToJSValue(cx, result.Value(), args.rval())) {
17790 return false;
17791 }
17792 return true;
17793 }
17794}
17795
17796static const JSJitInfo receiveNullableEnum_methodinfo = {
17797 { (JSJitGetterOp)receiveNullableEnum },
17798 { prototypes::id::TestExampleInterface },
17799 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17800 JSJitInfo::Method,
17801 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17802 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
17803 false, /* isInfallible. False in setters. */
17804 false, /* isMovable. Not relevant for setters. */
17805 false, /* isEliminatable. Not relevant for setters. */
17806 false, /* isAlwaysInSlot. Only relevant for getters. */
17807 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17808 false, /* isTypedMethod. Only relevant for methods. */
17809 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17810};
17811
17812MOZ_CAN_RUN_SCRIPT static bool
17813get_enumAttribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
17814{
17815 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17818( cx, "TestExampleInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17816 "TestExampleInterface", "enumAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17818( cx, "TestExampleInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17817 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject17818( cx, "TestExampleInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17818 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17818( cx, "TestExampleInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17819
17820 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17821 TestEnum result(MOZ_KnownLive(self)(self)->EnumAttribute());
17822 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17822); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17822; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17823 if (!ToJSValue(cx, result, args.rval())) {
17824 return false;
17825 }
17826 return true;
17827}
17828
17829MOZ_CAN_RUN_SCRIPT static bool
17830set_enumAttribute(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
17831{
17832 BindingCallContext cx(cx_, "TestExampleInterface.enumAttribute setter");
17833 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17836( cx, "TestExampleInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17834 "TestExampleInterface", "enumAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17836( cx, "TestExampleInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17835 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject17836( cx, "TestExampleInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17836 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17836( cx, "TestExampleInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17837
17838 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17839 TestEnum arg0;
17840 {
17841 int index;
17842 if (!binding_detail::FindEnumStringIndex<false>(cx, args[0],
17843 binding_detail::EnumStrings<TestEnum>::Values,
17844 "TestEnum", "value being assigned",
17845 &index)) {
17846 return false;
17847 }
17848 if (index < 0) {
17849 return true;
17850 }
17851 arg0 = static_cast<TestEnum>(index);
17852 }
17853 // NOTE: This assert does NOT call the function.
17854 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetEnumAttribute(arg0))>, "Should be returning void here");
17855 MOZ_KnownLive(self)(self)->SetEnumAttribute(arg0);
17856 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17856); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17856; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17857
17858 return true;
17859}
17860
17861static const JSJitInfo enumAttribute_getterinfo = {
17862 { get_enumAttribute },
17863 { prototypes::id::TestExampleInterface },
17864 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17865 JSJitInfo::Getter,
17866 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17867 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
17868 false, /* isInfallible. False in setters. */
17869 false, /* isMovable. Not relevant for setters. */
17870 false, /* isEliminatable. Not relevant for setters. */
17871 false, /* isAlwaysInSlot. Only relevant for getters. */
17872 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17873 false, /* isTypedMethod. Only relevant for methods. */
17874 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17875};
17876static const JSJitInfo enumAttribute_setterinfo = {
17877 { (JSJitGetterOp)set_enumAttribute },
17878 { prototypes::id::TestExampleInterface },
17879 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17880 JSJitInfo::Setter,
17881 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17882 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17883 false, /* isInfallible. False in setters. */
17884 false, /* isMovable. Not relevant for setters. */
17885 false, /* isEliminatable. Not relevant for setters. */
17886 false, /* isAlwaysInSlot. Only relevant for getters. */
17887 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17888 false, /* isTypedMethod. Only relevant for methods. */
17889 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17890};
17891
17892MOZ_CAN_RUN_SCRIPT static bool
17893get_readonlyEnumAttribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
17894{
17895 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17898( cx, "TestExampleInterface"
, "readonlyEnumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17896 "TestExampleInterface", "readonlyEnumAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17898( cx, "TestExampleInterface"
, "readonlyEnumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17897 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject17898( cx, "TestExampleInterface"
, "readonlyEnumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17898 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17898( cx, "TestExampleInterface"
, "readonlyEnumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17899
17900 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17901 TestEnum result(MOZ_KnownLive(self)(self)->ReadonlyEnumAttribute());
17902 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17902); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17902; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17903 if (!ToJSValue(cx, result, args.rval())) {
17904 return false;
17905 }
17906 return true;
17907}
17908
17909static const JSJitInfo readonlyEnumAttribute_getterinfo = {
17910 { get_readonlyEnumAttribute },
17911 { prototypes::id::TestExampleInterface },
17912 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17913 JSJitInfo::Getter,
17914 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17915 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
17916 false, /* isInfallible. False in setters. */
17917 false, /* isMovable. Not relevant for setters. */
17918 false, /* isEliminatable. Not relevant for setters. */
17919 false, /* isAlwaysInSlot. Only relevant for getters. */
17920 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17921 false, /* isTypedMethod. Only relevant for methods. */
17922 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17923};
17924
17925MOZ_CAN_RUN_SCRIPT static bool
17926passCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17927{
17928 BindingCallContext cx(cx_, "TestExampleInterface.passCallback");
17929 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17932( cx, "TestExampleInterface"
, "passCallback", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17930 "TestExampleInterface", "passCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17932( cx, "TestExampleInterface"
, "passCallback", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17931 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17932( cx, "TestExampleInterface"
, "passCallback", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17932 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17932( cx, "TestExampleInterface"
, "passCallback", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17933
17934 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17935 if (!args.requireAtLeast(cx, "TestExampleInterface.passCallback", 1)) {
17936 return false;
17937 }
17938 RootedCallback<OwningNonNull<binding_detail::FastTestCallback>> arg0(cx);
17939 if (args[0].isObject()) {
17940 if (JS::IsCallable(&args[0].toObject())) {
17941 { // scope for tempRoot and tempGlobalRoot if needed
17942 arg0 = new binding_detail::FastTestCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
17943 }
17944 } else {
17945 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
17946 return false;
17947 }
17948 } else {
17949 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
17950 return false;
17951 }
17952 // NOTE: This assert does NOT call the function.
17953 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCallback(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
17954 MOZ_KnownLive(self)(self)->PassCallback(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
17955 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 17955); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17955; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17956 args.rval().setUndefined();
17957 return true;
17958}
17959
17960static const JSJitInfo passCallback_methodinfo = {
17961 { (JSJitGetterOp)passCallback },
17962 { prototypes::id::TestExampleInterface },
17963 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
17964 JSJitInfo::Method,
17965 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17966 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17967 false, /* isInfallible. False in setters. */
17968 false, /* isMovable. Not relevant for setters. */
17969 false, /* isEliminatable. Not relevant for setters. */
17970 false, /* isAlwaysInSlot. Only relevant for getters. */
17971 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17972 false, /* isTypedMethod. Only relevant for methods. */
17973 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17974};
17975
17976MOZ_CAN_RUN_SCRIPT static bool
17977passNullableCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17978{
17979 BindingCallContext cx(cx_, "TestExampleInterface.passNullableCallback");
17980 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17983( cx, "TestExampleInterface"
, "passNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17981 "TestExampleInterface", "passNullableCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17983( cx, "TestExampleInterface"
, "passNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17982 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17983( cx, "TestExampleInterface"
, "passNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17983 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17983( cx, "TestExampleInterface"
, "passNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17984
17985 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
17986 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableCallback", 1)) {
17987 return false;
17988 }
17989 RootedCallback<RefPtr<binding_detail::FastTestCallback>> arg0(cx);
17990 if (args[0].isObject()) {
17991 if (JS::IsCallable(&args[0].toObject())) {
17992 { // scope for tempRoot and tempGlobalRoot if needed
17993 arg0 = new binding_detail::FastTestCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
17994 }
17995 } else {
17996 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
17997 return false;
17998 }
17999 } else if (args[0].isNullOrUndefined()) {
18000 arg0 = nullptr;
18001 } else {
18002 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
18003 return false;
18004 }
18005 // NOTE: This assert does NOT call the function.
18006 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
18007 MOZ_KnownLive(self)(self)->PassNullableCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
18008 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18008); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18008; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18009 args.rval().setUndefined();
18010 return true;
18011}
18012
18013static const JSJitInfo passNullableCallback_methodinfo = {
18014 { (JSJitGetterOp)passNullableCallback },
18015 { prototypes::id::TestExampleInterface },
18016 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18017 JSJitInfo::Method,
18018 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18019 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18020 false, /* isInfallible. False in setters. */
18021 false, /* isMovable. Not relevant for setters. */
18022 false, /* isEliminatable. Not relevant for setters. */
18023 false, /* isAlwaysInSlot. Only relevant for getters. */
18024 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18025 false, /* isTypedMethod. Only relevant for methods. */
18026 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18027};
18028
18029MOZ_CAN_RUN_SCRIPT static bool
18030passOptionalCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18031{
18032 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalCallback");
18033 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18036( cx, "TestExampleInterface"
, "passOptionalCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18034 "TestExampleInterface", "passOptionalCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18036( cx, "TestExampleInterface"
, "passOptionalCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18035 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18036( cx, "TestExampleInterface"
, "passOptionalCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18036 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18036( cx, "TestExampleInterface"
, "passOptionalCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18037
18038 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18039 Optional<OwningNonNull<TestCallback>> arg0;
18040 if (args.hasDefined(0)) {
18041 arg0.Construct();
18042 if (args[0].isObject()) {
18043 if (JS::IsCallable(&args[0].toObject())) {
18044 { // scope for tempRoot and tempGlobalRoot if needed
18045 JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
18046 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
18047 arg0.Value() = new TestCallback(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
18048 }
18049 } else {
18050 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
18051 return false;
18052 }
18053 } else {
18054 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
18055 return false;
18056 }
18057 }
18058 // NOTE: This assert does NOT call the function.
18059 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalCallback(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0)))))>, "Should be returning void here");
18060 MOZ_KnownLive(self)(self)->PassOptionalCallback(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))));
18061 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18061); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18061; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18062 args.rval().setUndefined();
18063 return true;
18064}
18065
18066static const JSJitInfo passOptionalCallback_methodinfo = {
18067 { (JSJitGetterOp)passOptionalCallback },
18068 { prototypes::id::TestExampleInterface },
18069 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18070 JSJitInfo::Method,
18071 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18072 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18073 false, /* isInfallible. False in setters. */
18074 false, /* isMovable. Not relevant for setters. */
18075 false, /* isEliminatable. Not relevant for setters. */
18076 false, /* isAlwaysInSlot. Only relevant for getters. */
18077 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18078 false, /* isTypedMethod. Only relevant for methods. */
18079 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18080};
18081
18082MOZ_CAN_RUN_SCRIPT static bool
18083passOptionalNullableCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18084{
18085 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableCallback");
18086 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18089( cx, "TestExampleInterface"
, "passOptionalNullableCallback", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18087 "TestExampleInterface", "passOptionalNullableCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18089( cx, "TestExampleInterface"
, "passOptionalNullableCallback", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18088 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18089( cx, "TestExampleInterface"
, "passOptionalNullableCallback", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18089 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18089( cx, "TestExampleInterface"
, "passOptionalNullableCallback", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18090
18091 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18092 Optional<RefPtr<TestCallback>> arg0;
18093 if (args.hasDefined(0)) {
18094 arg0.Construct();
18095 if (args[0].isObject()) {
18096 if (JS::IsCallable(&args[0].toObject())) {
18097 { // scope for tempRoot and tempGlobalRoot if needed
18098 JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
18099 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
18100 arg0.Value() = new TestCallback(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
18101 }
18102 } else {
18103 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
18104 return false;
18105 }
18106 } else if (args[0].isNullOrUndefined()) {
18107 arg0.Value() = nullptr;
18108 } else {
18109 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
18110 return false;
18111 }
18112 }
18113 // NOTE: This assert does NOT call the function.
18114 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
18115 MOZ_KnownLive(self)(self)->PassOptionalNullableCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
18116 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18116); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18116; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18117 args.rval().setUndefined();
18118 return true;
18119}
18120
18121static const JSJitInfo passOptionalNullableCallback_methodinfo = {
18122 { (JSJitGetterOp)passOptionalNullableCallback },
18123 { prototypes::id::TestExampleInterface },
18124 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18125 JSJitInfo::Method,
18126 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18127 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18128 false, /* isInfallible. False in setters. */
18129 false, /* isMovable. Not relevant for setters. */
18130 false, /* isEliminatable. Not relevant for setters. */
18131 false, /* isAlwaysInSlot. Only relevant for getters. */
18132 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18133 false, /* isTypedMethod. Only relevant for methods. */
18134 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18135};
18136
18137MOZ_CAN_RUN_SCRIPT static bool
18138passOptionalNullableCallbackWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18139{
18140 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableCallbackWithDefaultValue");
18141 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18144( cx, "TestExampleInterface"
, "passOptionalNullableCallbackWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18142 "TestExampleInterface", "passOptionalNullableCallbackWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18144( cx, "TestExampleInterface"
, "passOptionalNullableCallbackWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18143 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18144( cx, "TestExampleInterface"
, "passOptionalNullableCallbackWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18144 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18144( cx, "TestExampleInterface"
, "passOptionalNullableCallbackWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18145
18146 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18147 RootedCallback<RefPtr<binding_detail::FastTestCallback>> arg0(cx);
18148 if (args.hasDefined(0)) {
18149 if (args[0].isObject()) {
18150 if (JS::IsCallable(&args[0].toObject())) {
18151 { // scope for tempRoot and tempGlobalRoot if needed
18152 arg0 = new binding_detail::FastTestCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
18153 }
18154 } else {
18155 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
18156 return false;
18157 }
18158 } else if (args[0].isNullOrUndefined()) {
18159 arg0 = nullptr;
18160 } else {
18161 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
18162 return false;
18163 }
18164 } else {
18165 arg0 = nullptr;
18166 }
18167 // NOTE: This assert does NOT call the function.
18168 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableCallbackWithDefaultValue(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
18169 MOZ_KnownLive(self)(self)->PassOptionalNullableCallbackWithDefaultValue(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
18170 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18170); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18170; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18171 args.rval().setUndefined();
18172 return true;
18173}
18174
18175static const JSJitInfo passOptionalNullableCallbackWithDefaultValue_methodinfo = {
18176 { (JSJitGetterOp)passOptionalNullableCallbackWithDefaultValue },
18177 { prototypes::id::TestExampleInterface },
18178 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18179 JSJitInfo::Method,
18180 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18181 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18182 false, /* isInfallible. False in setters. */
18183 false, /* isMovable. Not relevant for setters. */
18184 false, /* isEliminatable. Not relevant for setters. */
18185 false, /* isAlwaysInSlot. Only relevant for getters. */
18186 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18187 false, /* isTypedMethod. Only relevant for methods. */
18188 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18189};
18190
18191MOZ_CAN_RUN_SCRIPT static bool
18192receiveCallback(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18193{
18194 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18197( cx, "TestExampleInterface"
, "receiveCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18195 "TestExampleInterface", "receiveCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18197( cx, "TestExampleInterface"
, "receiveCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18196 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18197( cx, "TestExampleInterface"
, "receiveCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18197 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18197( cx, "TestExampleInterface"
, "receiveCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18198
18199 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18200 RefPtr<TestCallback> result(MOZ_KnownLive(self)(self)->ReceiveCallback());
18201 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18201); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18201; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18202 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
18203 if (!MaybeWrapObjectValue(cx, args.rval())) {
18204 return false;
18205 }
18206 return true;
18207}
18208
18209static const JSJitInfo receiveCallback_methodinfo = {
18210 { (JSJitGetterOp)receiveCallback },
18211 { prototypes::id::TestExampleInterface },
18212 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18213 JSJitInfo::Method,
18214 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18215 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
18216 false, /* isInfallible. False in setters. */
18217 false, /* isMovable. Not relevant for setters. */
18218 false, /* isEliminatable. Not relevant for setters. */
18219 false, /* isAlwaysInSlot. Only relevant for getters. */
18220 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18221 false, /* isTypedMethod. Only relevant for methods. */
18222 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18223};
18224
18225MOZ_CAN_RUN_SCRIPT static bool
18226receiveNullableCallback(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18227{
18228 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18231( cx, "TestExampleInterface"
, "receiveNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18229 "TestExampleInterface", "receiveNullableCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18231( cx, "TestExampleInterface"
, "receiveNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18230 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18231( cx, "TestExampleInterface"
, "receiveNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18231 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18231( cx, "TestExampleInterface"
, "receiveNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18232
18233 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18234 RefPtr<TestCallback> result(MOZ_KnownLive(self)(self)->ReceiveNullableCallback());
18235 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18235); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18235; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18236 if (result) {
18237 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
18238 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
18239 return false;
18240 }
18241 return true;
18242 } else {
18243 args.rval().setNull();
18244 return true;
18245 }
18246}
18247
18248static const JSJitInfo receiveNullableCallback_methodinfo = {
18249 { (JSJitGetterOp)receiveNullableCallback },
18250 { prototypes::id::TestExampleInterface },
18251 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18252 JSJitInfo::Method,
18253 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18254 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
18255 false, /* isInfallible. False in setters. */
18256 false, /* isMovable. Not relevant for setters. */
18257 false, /* isEliminatable. Not relevant for setters. */
18258 false, /* isAlwaysInSlot. Only relevant for getters. */
18259 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18260 false, /* isTypedMethod. Only relevant for methods. */
18261 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18262};
18263
18264MOZ_CAN_RUN_SCRIPT static bool
18265passNullableTreatAsNullCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18266{
18267 BindingCallContext cx(cx_, "TestExampleInterface.passNullableTreatAsNullCallback");
18268 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18271( cx, "TestExampleInterface"
, "passNullableTreatAsNullCallback", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18269 "TestExampleInterface", "passNullableTreatAsNullCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18271( cx, "TestExampleInterface"
, "passNullableTreatAsNullCallback", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18270 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18271( cx, "TestExampleInterface"
, "passNullableTreatAsNullCallback", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18271 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18271( cx, "TestExampleInterface"
, "passNullableTreatAsNullCallback", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18272
18273 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18274 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableTreatAsNullCallback", 1)) {
18275 return false;
18276 }
18277 RootedCallback<RefPtr<binding_detail::FastTestTreatAsNullCallback>> arg0(cx);
18278 if (args[0].isObject()) {
18279 if (JS::IsCallable(&args[0].toObject())) {
18280 { // scope for tempRoot and tempGlobalRoot if needed
18281 arg0 = new binding_detail::FastTestTreatAsNullCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
18282 }
18283 } else {
18284 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
18285 return false;
18286 }
18287 } else if (args[0].isNullOrUndefined()) {
18288 arg0 = nullptr;
18289 } else {
18290 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
18291 return false;
18292 }
18293 // NOTE: This assert does NOT call the function.
18294 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableTreatAsNullCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
18295 MOZ_KnownLive(self)(self)->PassNullableTreatAsNullCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
18296 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18296); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18296; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18297 args.rval().setUndefined();
18298 return true;
18299}
18300
18301static const JSJitInfo passNullableTreatAsNullCallback_methodinfo = {
18302 { (JSJitGetterOp)passNullableTreatAsNullCallback },
18303 { prototypes::id::TestExampleInterface },
18304 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18305 JSJitInfo::Method,
18306 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18307 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18308 false, /* isInfallible. False in setters. */
18309 false, /* isMovable. Not relevant for setters. */
18310 false, /* isEliminatable. Not relevant for setters. */
18311 false, /* isAlwaysInSlot. Only relevant for getters. */
18312 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18313 false, /* isTypedMethod. Only relevant for methods. */
18314 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18315};
18316
18317MOZ_CAN_RUN_SCRIPT static bool
18318passOptionalNullableTreatAsNullCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18319{
18320 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableTreatAsNullCallback");
18321 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18324( cx, "TestExampleInterface"
, "passOptionalNullableTreatAsNullCallback", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18322 "TestExampleInterface", "passOptionalNullableTreatAsNullCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18324( cx, "TestExampleInterface"
, "passOptionalNullableTreatAsNullCallback", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18323 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18324( cx, "TestExampleInterface"
, "passOptionalNullableTreatAsNullCallback", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18324 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18324( cx, "TestExampleInterface"
, "passOptionalNullableTreatAsNullCallback", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18325
18326 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18327 Optional<RefPtr<TestTreatAsNullCallback>> arg0;
18328 if (args.hasDefined(0)) {
18329 arg0.Construct();
18330 if (args[0].isObject()) {
18331 if (JS::IsCallable(&args[0].toObject())) {
18332 { // scope for tempRoot and tempGlobalRoot if needed
18333 JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
18334 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
18335 arg0.Value() = new TestTreatAsNullCallback(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
18336 }
18337 } else {
18338 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
18339 return false;
18340 }
18341 } else if (args[0].isNullOrUndefined()) {
18342 arg0.Value() = nullptr;
18343 } else {
18344 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
18345 return false;
18346 }
18347 }
18348 // NOTE: This assert does NOT call the function.
18349 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableTreatAsNullCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
18350 MOZ_KnownLive(self)(self)->PassOptionalNullableTreatAsNullCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
18351 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18351); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18351; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18352 args.rval().setUndefined();
18353 return true;
18354}
18355
18356static const JSJitInfo passOptionalNullableTreatAsNullCallback_methodinfo = {
18357 { (JSJitGetterOp)passOptionalNullableTreatAsNullCallback },
18358 { prototypes::id::TestExampleInterface },
18359 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18360 JSJitInfo::Method,
18361 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18362 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18363 false, /* isInfallible. False in setters. */
18364 false, /* isMovable. Not relevant for setters. */
18365 false, /* isEliminatable. Not relevant for setters. */
18366 false, /* isAlwaysInSlot. Only relevant for getters. */
18367 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18368 false, /* isTypedMethod. Only relevant for methods. */
18369 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18370};
18371
18372MOZ_CAN_RUN_SCRIPT static bool
18373passOptionalNullableTreatAsNullCallbackWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18374{
18375 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableTreatAsNullCallbackWithDefaultValue");
18376 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18379( cx, "TestExampleInterface"
, "passOptionalNullableTreatAsNullCallbackWithDefaultValue", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
18377 "TestExampleInterface", "passOptionalNullableTreatAsNullCallbackWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18379( cx, "TestExampleInterface"
, "passOptionalNullableTreatAsNullCallbackWithDefaultValue", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
18378 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18379( cx, "TestExampleInterface"
, "passOptionalNullableTreatAsNullCallbackWithDefaultValue", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
18379 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18379( cx, "TestExampleInterface"
, "passOptionalNullableTreatAsNullCallbackWithDefaultValue", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
18380
18381 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18382 RootedCallback<RefPtr<binding_detail::FastTestTreatAsNullCallback>> arg0(cx);
18383 if (args.hasDefined(0)) {
18384 if (args[0].isObject()) {
18385 if (JS::IsCallable(&args[0].toObject())) {
18386 { // scope for tempRoot and tempGlobalRoot if needed
18387 arg0 = new binding_detail::FastTestTreatAsNullCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
18388 }
18389 } else {
18390 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
18391 return false;
18392 }
18393 } else if (args[0].isNullOrUndefined()) {
18394 arg0 = nullptr;
18395 } else {
18396 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
18397 return false;
18398 }
18399 } else {
18400 arg0 = nullptr;
18401 }
18402 // NOTE: This assert does NOT call the function.
18403 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableTreatAsNullCallbackWithDefaultValue(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
18404 MOZ_KnownLive(self)(self)->PassOptionalNullableTreatAsNullCallbackWithDefaultValue(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
18405 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18405); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18405; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18406 args.rval().setUndefined();
18407 return true;
18408}
18409
18410static const JSJitInfo passOptionalNullableTreatAsNullCallbackWithDefaultValue_methodinfo = {
18411 { (JSJitGetterOp)passOptionalNullableTreatAsNullCallbackWithDefaultValue },
18412 { prototypes::id::TestExampleInterface },
18413 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18414 JSJitInfo::Method,
18415 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18416 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18417 false, /* isInfallible. False in setters. */
18418 false, /* isMovable. Not relevant for setters. */
18419 false, /* isEliminatable. Not relevant for setters. */
18420 false, /* isAlwaysInSlot. Only relevant for getters. */
18421 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18422 false, /* isTypedMethod. Only relevant for methods. */
18423 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18424};
18425
18426MOZ_CAN_RUN_SCRIPT static bool
18427passAny(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18428{
18429 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18432( cx, "TestExampleInterface"
, "passAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
18430 "TestExampleInterface", "passAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18432( cx, "TestExampleInterface"
, "passAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
18431 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18432( cx, "TestExampleInterface"
, "passAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
18432 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18432( cx, "TestExampleInterface"
, "passAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
18433
18434 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18435 if (!args.requireAtLeast(cx, "TestExampleInterface.passAny", 1)) {
18436 return false;
18437 }
18438 JS::Rooted<JS::Value> arg0(cx);
18439 arg0 = args[0];
18440 // NOTE: This assert does NOT call the function.
18441 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAny(cx, arg0))>, "Should be returning void here");
18442 MOZ_KnownLive(self)(self)->PassAny(cx, arg0);
18443 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18443); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18443; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18444 args.rval().setUndefined();
18445 return true;
18446}
18447
18448static const JSJitInfo passAny_methodinfo = {
18449 { (JSJitGetterOp)passAny },
18450 { prototypes::id::TestExampleInterface },
18451 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18452 JSJitInfo::Method,
18453 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18454 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18455 false, /* isInfallible. False in setters. */
18456 false, /* isMovable. Not relevant for setters. */
18457 false, /* isEliminatable. Not relevant for setters. */
18458 false, /* isAlwaysInSlot. Only relevant for getters. */
18459 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18460 false, /* isTypedMethod. Only relevant for methods. */
18461 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18462};
18463
18464MOZ_CAN_RUN_SCRIPT static bool
18465passVariadicAny(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18466{
18467 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18470( cx, "TestExampleInterface"
, "passVariadicAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18468 "TestExampleInterface", "passVariadicAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18470( cx, "TestExampleInterface"
, "passVariadicAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18469 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18470( cx, "TestExampleInterface"
, "passVariadicAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18470 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18470( cx, "TestExampleInterface"
, "passVariadicAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18471
18472 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18473 AutoSequence<JS::Value> arg0;
18474 SequenceRooter<JS::Value> arg0_holder(cx, &arg0);
18475 if (args.length() > 0) {
18476 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
18477 JS_ReportOutOfMemory(cx);
18478 return false;
18479 }
18480 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
18481 // OK to do infallible append here, since we ensured capacity already.
18482 JS::Value& slot = *arg0.AppendElement();
18483 slot = args[variadicArg];
18484 }
18485 }
18486 // NOTE: This assert does NOT call the function.
18487 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicAny(cx, Constify(arg0)))>, "Should be returning void here");
18488 MOZ_KnownLive(self)(self)->PassVariadicAny(cx, Constify(arg0));
18489 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18489); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18489; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18490 args.rval().setUndefined();
18491 return true;
18492}
18493
18494static const JSJitInfo passVariadicAny_methodinfo = {
18495 { (JSJitGetterOp)passVariadicAny },
18496 { prototypes::id::TestExampleInterface },
18497 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18498 JSJitInfo::Method,
18499 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18500 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18501 false, /* isInfallible. False in setters. */
18502 false, /* isMovable. Not relevant for setters. */
18503 false, /* isEliminatable. Not relevant for setters. */
18504 false, /* isAlwaysInSlot. Only relevant for getters. */
18505 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18506 false, /* isTypedMethod. Only relevant for methods. */
18507 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18508};
18509
18510MOZ_CAN_RUN_SCRIPT static bool
18511passOptionalAny(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18512{
18513 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18516( cx, "TestExampleInterface"
, "passOptionalAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18514 "TestExampleInterface", "passOptionalAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18516( cx, "TestExampleInterface"
, "passOptionalAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18515 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18516( cx, "TestExampleInterface"
, "passOptionalAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18516 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18516( cx, "TestExampleInterface"
, "passOptionalAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18517
18518 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18519 JS::Rooted<JS::Value> arg0(cx);
18520 if (args.hasDefined(0)) {
18521 arg0 = args[0];
18522 } else {
18523 arg0 = JS::UndefinedValue();
18524 }
18525 // NOTE: This assert does NOT call the function.
18526 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalAny(cx, arg0))>, "Should be returning void here");
18527 MOZ_KnownLive(self)(self)->PassOptionalAny(cx, arg0);
18528 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18528); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18528; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18529 args.rval().setUndefined();
18530 return true;
18531}
18532
18533static const JSJitInfo passOptionalAny_methodinfo = {
18534 { (JSJitGetterOp)passOptionalAny },
18535 { prototypes::id::TestExampleInterface },
18536 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18537 JSJitInfo::Method,
18538 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18539 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18540 false, /* isInfallible. False in setters. */
18541 false, /* isMovable. Not relevant for setters. */
18542 false, /* isEliminatable. Not relevant for setters. */
18543 false, /* isAlwaysInSlot. Only relevant for getters. */
18544 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18545 false, /* isTypedMethod. Only relevant for methods. */
18546 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18547};
18548
18549MOZ_CAN_RUN_SCRIPT static bool
18550passAnyDefaultNull(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18551{
18552 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18555( cx, "TestExampleInterface"
, "passAnyDefaultNull", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18553 "TestExampleInterface", "passAnyDefaultNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18555( cx, "TestExampleInterface"
, "passAnyDefaultNull", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18554 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18555( cx, "TestExampleInterface"
, "passAnyDefaultNull", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18555 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18555( cx, "TestExampleInterface"
, "passAnyDefaultNull", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18556
18557 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18558 JS::Rooted<JS::Value> arg0(cx);
18559 if (args.hasDefined(0)) {
18560 arg0 = args[0];
18561 } else {
18562 arg0 = JS::NullValue();
18563 }
18564 // NOTE: This assert does NOT call the function.
18565 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAnyDefaultNull(cx, arg0))>, "Should be returning void here");
18566 MOZ_KnownLive(self)(self)->PassAnyDefaultNull(cx, arg0);
18567 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18567); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18567; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18568 args.rval().setUndefined();
18569 return true;
18570}
18571
18572static const JSJitInfo passAnyDefaultNull_methodinfo = {
18573 { (JSJitGetterOp)passAnyDefaultNull },
18574 { prototypes::id::TestExampleInterface },
18575 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18576 JSJitInfo::Method,
18577 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18578 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18579 false, /* isInfallible. False in setters. */
18580 false, /* isMovable. Not relevant for setters. */
18581 false, /* isEliminatable. Not relevant for setters. */
18582 false, /* isAlwaysInSlot. Only relevant for getters. */
18583 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18584 false, /* isTypedMethod. Only relevant for methods. */
18585 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18586};
18587
18588MOZ_CAN_RUN_SCRIPT static bool
18589passSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18590{
18591 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfAny");
18592 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18595( cx, "TestExampleInterface"
, "passSequenceOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18593 "TestExampleInterface", "passSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18595( cx, "TestExampleInterface"
, "passSequenceOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18594 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18595( cx, "TestExampleInterface"
, "passSequenceOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18595 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18595( cx, "TestExampleInterface"
, "passSequenceOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18596
18597 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18598 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfAny", 1)) {
18599 return false;
18600 }
18601 binding_detail::AutoSequence<JS::Value> arg0;
18602 SequenceRooter<JS::Value> arg0_holder(cx, &arg0);
18603 if (args[0].isObject()) {
18604 JS::ForOfIterator iter(cx);
18605 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
18606 return false;
18607 }
18608 if (!iter.valueIsIterable()) {
18609 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18610 return false;
18611 }
18612 binding_detail::AutoSequence<JS::Value> &arr = arg0;
18613 JS::Rooted<JS::Value> temp(cx);
18614 while (true) {
18615 bool done;
18616 if (!iter.next(&temp, &done)) {
18617 return false;
18618 }
18619 if (done) {
18620 break;
18621 }
18622 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
18623 if (!slotPtr) {
18624 JS_ReportOutOfMemory(cx);
18625 return false;
18626 }
18627 JS::Value& slot = *slotPtr;
18628 slot = temp;
18629 }
18630 } else {
18631 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18632 return false;
18633 }
18634 // NOTE: This assert does NOT call the function.
18635 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfAny(cx, Constify(arg0)))>, "Should be returning void here");
18636 MOZ_KnownLive(self)(self)->PassSequenceOfAny(cx, Constify(arg0));
18637 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18637); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18637; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18638 args.rval().setUndefined();
18639 return true;
18640}
18641
18642static const JSJitInfo passSequenceOfAny_methodinfo = {
18643 { (JSJitGetterOp)passSequenceOfAny },
18644 { prototypes::id::TestExampleInterface },
18645 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18646 JSJitInfo::Method,
18647 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18648 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18649 false, /* isInfallible. False in setters. */
18650 false, /* isMovable. Not relevant for setters. */
18651 false, /* isEliminatable. Not relevant for setters. */
18652 false, /* isAlwaysInSlot. Only relevant for getters. */
18653 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18654 false, /* isTypedMethod. Only relevant for methods. */
18655 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18656};
18657
18658MOZ_CAN_RUN_SCRIPT static bool
18659passNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18660{
18661 BindingCallContext cx(cx_, "TestExampleInterface.passNullableSequenceOfAny");
18662 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18665( cx, "TestExampleInterface"
, "passNullableSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18663 "TestExampleInterface", "passNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18665( cx, "TestExampleInterface"
, "passNullableSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18664 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18665( cx, "TestExampleInterface"
, "passNullableSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18665 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18665( cx, "TestExampleInterface"
, "passNullableSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18666
18667 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18668 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableSequenceOfAny", 1)) {
18669 return false;
18670 }
18671 Nullable<Sequence<JS::Value>> arg0;
18672 SequenceRooter<JS::Value> arg0_holder(cx, &arg0.SetValue());
18673 if (args[0].isObject()) {
18674 JS::ForOfIterator iter(cx);
18675 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
18676 return false;
18677 }
18678 if (!iter.valueIsIterable()) {
18679 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18680 return false;
18681 }
18682 Sequence<JS::Value> &arr = arg0.SetValue();
18683 JS::Rooted<JS::Value> temp(cx);
18684 while (true) {
18685 bool done;
18686 if (!iter.next(&temp, &done)) {
18687 return false;
18688 }
18689 if (done) {
18690 break;
18691 }
18692 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
18693 if (!slotPtr) {
18694 JS_ReportOutOfMemory(cx);
18695 return false;
18696 }
18697 JS::Value& slot = *slotPtr;
18698 slot = temp;
18699 }
18700 } else if (args[0].isNullOrUndefined()) {
18701 arg0.SetNull();
18702 } else {
18703 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18704 return false;
18705 }
18706 // NOTE: This assert does NOT call the function.
18707 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSequenceOfAny(cx, Constify(arg0)))>, "Should be returning void here");
18708 MOZ_KnownLive(self)(self)->PassNullableSequenceOfAny(cx, Constify(arg0));
18709 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18709); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18709; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18710 args.rval().setUndefined();
18711 return true;
18712}
18713
18714static const JSJitInfo passNullableSequenceOfAny_methodinfo = {
18715 { (JSJitGetterOp)passNullableSequenceOfAny },
18716 { prototypes::id::TestExampleInterface },
18717 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18718 JSJitInfo::Method,
18719 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18720 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18721 false, /* isInfallible. False in setters. */
18722 false, /* isMovable. Not relevant for setters. */
18723 false, /* isEliminatable. Not relevant for setters. */
18724 false, /* isAlwaysInSlot. Only relevant for getters. */
18725 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18726 false, /* isTypedMethod. Only relevant for methods. */
18727 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18728};
18729
18730MOZ_CAN_RUN_SCRIPT static bool
18731passOptionalSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18732{
18733 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalSequenceOfAny");
18734 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18737( cx, "TestExampleInterface"
, "passOptionalSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18735 "TestExampleInterface", "passOptionalSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18737( cx, "TestExampleInterface"
, "passOptionalSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18736 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18737( cx, "TestExampleInterface"
, "passOptionalSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18737 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18737( cx, "TestExampleInterface"
, "passOptionalSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18738
18739 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18740 Optional<Sequence<JS::Value>> arg0;
18741 Maybe<SequenceRooter<JS::Value>> arg0_holder;
18742 if (args.hasDefined(0)) {
18743 arg0.Construct();
18744 arg0_holder.emplace(cx, &arg0.Value());
18745 if (args[0].isObject()) {
18746 JS::ForOfIterator iter(cx);
18747 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
18748 return false;
18749 }
18750 if (!iter.valueIsIterable()) {
18751 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18752 return false;
18753 }
18754 Sequence<JS::Value> &arr = arg0.Value();
18755 JS::Rooted<JS::Value> temp(cx);
18756 while (true) {
18757 bool done;
18758 if (!iter.next(&temp, &done)) {
18759 return false;
18760 }
18761 if (done) {
18762 break;
18763 }
18764 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
18765 if (!slotPtr) {
18766 JS_ReportOutOfMemory(cx);
18767 return false;
18768 }
18769 JS::Value& slot = *slotPtr;
18770 slot = temp;
18771 }
18772 } else {
18773 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18774 return false;
18775 }
18776 }
18777 // NOTE: This assert does NOT call the function.
18778 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequenceOfAny(cx, Constify(arg0)))>, "Should be returning void here");
18779 MOZ_KnownLive(self)(self)->PassOptionalSequenceOfAny(cx, Constify(arg0));
18780 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18780); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18780; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18781 args.rval().setUndefined();
18782 return true;
18783}
18784
18785static const JSJitInfo passOptionalSequenceOfAny_methodinfo = {
18786 { (JSJitGetterOp)passOptionalSequenceOfAny },
18787 { prototypes::id::TestExampleInterface },
18788 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18789 JSJitInfo::Method,
18790 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18791 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18792 false, /* isInfallible. False in setters. */
18793 false, /* isMovable. Not relevant for setters. */
18794 false, /* isEliminatable. Not relevant for setters. */
18795 false, /* isAlwaysInSlot. Only relevant for getters. */
18796 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18797 false, /* isTypedMethod. Only relevant for methods. */
18798 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18799};
18800
18801MOZ_CAN_RUN_SCRIPT static bool
18802passOptionalNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18803{
18804 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableSequenceOfAny");
18805 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18808( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18806 "TestExampleInterface", "passOptionalNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18808( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18807 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18808( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18808 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18808( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18809
18810 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18811 Optional<Nullable<Sequence<JS::Value>>> arg0;
18812 Maybe<SequenceRooter<JS::Value>> arg0_holder;
18813 if (args.hasDefined(0)) {
18814 arg0.Construct();
18815 arg0_holder.emplace(cx, &arg0.Value().SetValue());
18816 if (args[0].isObject()) {
18817 JS::ForOfIterator iter(cx);
18818 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
18819 return false;
18820 }
18821 if (!iter.valueIsIterable()) {
18822 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18823 return false;
18824 }
18825 Sequence<JS::Value> &arr = arg0.Value().SetValue();
18826 JS::Rooted<JS::Value> temp(cx);
18827 while (true) {
18828 bool done;
18829 if (!iter.next(&temp, &done)) {
18830 return false;
18831 }
18832 if (done) {
18833 break;
18834 }
18835 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
18836 if (!slotPtr) {
18837 JS_ReportOutOfMemory(cx);
18838 return false;
18839 }
18840 JS::Value& slot = *slotPtr;
18841 slot = temp;
18842 }
18843 } else if (args[0].isNullOrUndefined()) {
18844 arg0.Value().SetNull();
18845 } else {
18846 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18847 return false;
18848 }
18849 }
18850 // NOTE: This assert does NOT call the function.
18851 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfAny(cx, Constify(arg0)))>, "Should be returning void here");
18852 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfAny(cx, Constify(arg0));
18853 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18853); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18853; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18854 args.rval().setUndefined();
18855 return true;
18856}
18857
18858static const JSJitInfo passOptionalNullableSequenceOfAny_methodinfo = {
18859 { (JSJitGetterOp)passOptionalNullableSequenceOfAny },
18860 { prototypes::id::TestExampleInterface },
18861 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18862 JSJitInfo::Method,
18863 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18864 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18865 false, /* isInfallible. False in setters. */
18866 false, /* isMovable. Not relevant for setters. */
18867 false, /* isEliminatable. Not relevant for setters. */
18868 false, /* isAlwaysInSlot. Only relevant for getters. */
18869 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18870 false, /* isTypedMethod. Only relevant for methods. */
18871 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18872};
18873
18874MOZ_CAN_RUN_SCRIPT static bool
18875passOptionalSequenceOfAnyWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18876{
18877 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalSequenceOfAnyWithDefaultValue");
18878 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18881( cx, "TestExampleInterface"
, "passOptionalSequenceOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18879 "TestExampleInterface", "passOptionalSequenceOfAnyWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18881( cx, "TestExampleInterface"
, "passOptionalSequenceOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18880 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18881( cx, "TestExampleInterface"
, "passOptionalSequenceOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18881 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18881( cx, "TestExampleInterface"
, "passOptionalSequenceOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18882
18883 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18884 Nullable<Sequence<JS::Value>> arg0;
18885 SequenceRooter<JS::Value> arg0_holder(cx, &arg0.SetValue());
18886 if (args.hasDefined(0)) {
18887 if (args[0].isObject()) {
18888 JS::ForOfIterator iter(cx);
18889 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
18890 return false;
18891 }
18892 if (!iter.valueIsIterable()) {
18893 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18894 return false;
18895 }
18896 Sequence<JS::Value> &arr = arg0.SetValue();
18897 JS::Rooted<JS::Value> temp(cx);
18898 while (true) {
18899 bool done;
18900 if (!iter.next(&temp, &done)) {
18901 return false;
18902 }
18903 if (done) {
18904 break;
18905 }
18906 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
18907 if (!slotPtr) {
18908 JS_ReportOutOfMemory(cx);
18909 return false;
18910 }
18911 JS::Value& slot = *slotPtr;
18912 slot = temp;
18913 }
18914 } else if (args[0].isNullOrUndefined()) {
18915 arg0.SetNull();
18916 } else {
18917 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18918 return false;
18919 }
18920 } else {
18921 arg0.SetNull();
18922 }
18923 // NOTE: This assert does NOT call the function.
18924 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequenceOfAnyWithDefaultValue(cx, Constify(arg0)))>, "Should be returning void here");
18925 MOZ_KnownLive(self)(self)->PassOptionalSequenceOfAnyWithDefaultValue(cx, Constify(arg0));
18926 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 18926); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18926; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18927 args.rval().setUndefined();
18928 return true;
18929}
18930
18931static const JSJitInfo passOptionalSequenceOfAnyWithDefaultValue_methodinfo = {
18932 { (JSJitGetterOp)passOptionalSequenceOfAnyWithDefaultValue },
18933 { prototypes::id::TestExampleInterface },
18934 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
18935 JSJitInfo::Method,
18936 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18937 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18938 false, /* isInfallible. False in setters. */
18939 false, /* isMovable. Not relevant for setters. */
18940 false, /* isEliminatable. Not relevant for setters. */
18941 false, /* isAlwaysInSlot. Only relevant for getters. */
18942 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18943 false, /* isTypedMethod. Only relevant for methods. */
18944 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18945};
18946
18947MOZ_CAN_RUN_SCRIPT static bool
18948passSequenceOfSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18949{
18950 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfSequenceOfAny");
18951 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18954( cx, "TestExampleInterface"
, "passSequenceOfSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18952 "TestExampleInterface", "passSequenceOfSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18954( cx, "TestExampleInterface"
, "passSequenceOfSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18953 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18954( cx, "TestExampleInterface"
, "passSequenceOfSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18954 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18954( cx, "TestExampleInterface"
, "passSequenceOfSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18955
18956 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
18957 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfSequenceOfAny", 1)) {
18958 return false;
18959 }
18960 binding_detail::AutoSequence<Sequence<JS::Value>> arg0;
18961 SequenceRooter<Sequence<JS::Value>> arg0_holder(cx, &arg0);
18962 if (args[0].isObject()) {
18963 JS::ForOfIterator iter(cx);
18964 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
18965 return false;
18966 }
18967 if (!iter.valueIsIterable()) {
18968 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
18969 return false;
18970 }
18971 binding_detail::AutoSequence<Sequence<JS::Value>> &arr = arg0;
18972 JS::Rooted<JS::Value> temp(cx);
18973 while (true) {
18974 bool done;
18975 if (!iter.next(&temp, &done)) {
18976 return false;
18977 }
18978 if (done) {
18979 break;
18980 }
18981 Sequence<JS::Value>* slotPtr = arr.AppendElement(mozilla::fallible);
18982 if (!slotPtr) {
18983 JS_ReportOutOfMemory(cx);
18984 return false;
18985 }
18986 Sequence<JS::Value>& slot = *slotPtr;
18987 if (temp.isObject()) {
18988 JS::ForOfIterator iter1(cx);
18989 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
18990 return false;
18991 }
18992 if (!iter1.valueIsIterable()) {
18993 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
18994 return false;
18995 }
18996 Sequence<JS::Value> &arr1 = slot;
18997 JS::Rooted<JS::Value> temp1(cx);
18998 while (true) {
18999 bool done1;
19000 if (!iter1.next(&temp1, &done1)) {
19001 return false;
19002 }
19003 if (done1) {
19004 break;
19005 }
19006 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
19007 if (!slotPtr1) {
19008 JS_ReportOutOfMemory(cx);
19009 return false;
19010 }
19011 JS::Value& slot1 = *slotPtr1;
19012 slot1 = temp1;
19013 }
19014 } else {
19015 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
19016 return false;
19017 }
19018 }
19019 } else {
19020 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
19021 return false;
19022 }
19023 // NOTE: This assert does NOT call the function.
19024 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfSequenceOfAny(cx, Constify(arg0)))>, "Should be returning void here");
19025 MOZ_KnownLive(self)(self)->PassSequenceOfSequenceOfAny(cx, Constify(arg0));
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)"
, "../TestExampleGenBinding.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 passSequenceOfSequenceOfAny_methodinfo = {
19032 { (JSJitGetterOp)passSequenceOfSequenceOfAny },
19033 { prototypes::id::TestExampleInterface },
19034 { PrototypeTraits<prototypes::id::TestExampleInterface>::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
19048passSequenceOfNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19049{
19050 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfNullableSequenceOfAny");
19051 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19054( cx, "TestExampleInterface"
, "passSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19052 "TestExampleInterface", "passSequenceOfNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19054( cx, "TestExampleInterface"
, "passSequenceOfNullableSequenceOfAny", 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::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19054( cx, "TestExampleInterface"
, "passSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19054 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19054( cx, "TestExampleInterface"
, "passSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
19055
19056 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
19057 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfNullableSequenceOfAny", 1)) {
19058 return false;
19059 }
19060 binding_detail::AutoSequence<Nullable<Sequence<JS::Value>>> arg0;
19061 SequenceRooter<Nullable<Sequence<JS::Value>>> arg0_holder(cx, &arg0);
19062 if (args[0].isObject()) {
19063 JS::ForOfIterator iter(cx);
19064 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
19065 return false;
19066 }
19067 if (!iter.valueIsIterable()) {
19068 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
19069 return false;
19070 }
19071 binding_detail::AutoSequence<Nullable<Sequence<JS::Value>>> &arr = arg0;
19072 JS::Rooted<JS::Value> temp(cx);
19073 while (true) {
19074 bool done;
19075 if (!iter.next(&temp, &done)) {
19076 return false;
19077 }
19078 if (done) {
19079 break;
19080 }
19081 Nullable<Sequence<JS::Value>>* slotPtr = arr.AppendElement(mozilla::fallible);
19082 if (!slotPtr) {
19083 JS_ReportOutOfMemory(cx);
19084 return false;
19085 }
19086 Nullable<Sequence<JS::Value>>& slot = *slotPtr;
19087 if (temp.isObject()) {
19088 JS::ForOfIterator iter1(cx);
19089 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
19090 return false;
19091 }
19092 if (!iter1.valueIsIterable()) {
19093 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
19094 return false;
19095 }
19096 Sequence<JS::Value> &arr1 = slot.SetValue();
19097 JS::Rooted<JS::Value> temp1(cx);
19098 while (true) {
19099 bool done1;
19100 if (!iter1.next(&temp1, &done1)) {
19101 return false;
19102 }
19103 if (done1) {
19104 break;
19105 }
19106 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
19107 if (!slotPtr1) {
19108 JS_ReportOutOfMemory(cx);
19109 return false;
19110 }
19111 JS::Value& slot1 = *slotPtr1;
19112 slot1 = temp1;
19113 }
19114 } else if (temp.isNullOrUndefined()) {
19115 slot.SetNull();
19116 } else {
19117 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
19118 return false;
19119 }
19120 }
19121 } else {
19122 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
19123 return false;
19124 }
19125 // NOTE: This assert does NOT call the function.
19126 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableSequenceOfAny(cx, Constify(arg0)))>, "Should be returning void here");
19127 MOZ_KnownLive(self)(self)->PassSequenceOfNullableSequenceOfAny(cx, Constify(arg0));
19128 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 19128); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19128; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19129 args.rval().setUndefined();
19130 return true;
19131}
19132
19133static const JSJitInfo passSequenceOfNullableSequenceOfAny_methodinfo = {
19134 { (JSJitGetterOp)passSequenceOfNullableSequenceOfAny },
19135 { prototypes::id::TestExampleInterface },
19136 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
19137 JSJitInfo::Method,
19138 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19139 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19140 false, /* isInfallible. False in setters. */
19141 false, /* isMovable. Not relevant for setters. */
19142 false, /* isEliminatable. Not relevant for setters. */
19143 false, /* isAlwaysInSlot. Only relevant for getters. */
19144 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19145 false, /* isTypedMethod. Only relevant for methods. */
19146 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19147};
19148
19149MOZ_CAN_RUN_SCRIPT static bool
19150passNullableSequenceOfNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19151{
19152 BindingCallContext cx(cx_, "TestExampleInterface.passNullableSequenceOfNullableSequenceOfAny");
19153 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19156( cx, "TestExampleInterface"
, "passNullableSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19154 "TestExampleInterface", "passNullableSequenceOfNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19156( cx, "TestExampleInterface"
, "passNullableSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19155 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19156( cx, "TestExampleInterface"
, "passNullableSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19156 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19156( cx, "TestExampleInterface"
, "passNullableSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
19157
19158 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
19159 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableSequenceOfNullableSequenceOfAny", 1)) {
19160 return false;
19161 }
19162 Nullable<Sequence<Nullable<Sequence<JS::Value>>>> arg0;
19163 SequenceRooter<Nullable<Sequence<JS::Value>>> arg0_holder(cx, &arg0.SetValue());
19164 if (args[0].isObject()) {
19165 JS::ForOfIterator iter(cx);
19166 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
19167 return false;
19168 }
19169 if (!iter.valueIsIterable()) {
19170 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
19171 return false;
19172 }
19173 Sequence<Nullable<Sequence<JS::Value>>> &arr = arg0.SetValue();
19174 JS::Rooted<JS::Value> temp(cx);
19175 while (true) {
19176 bool done;
19177 if (!iter.next(&temp, &done)) {
19178 return false;
19179 }
19180 if (done) {
19181 break;
19182 }
19183 Nullable<Sequence<JS::Value>>* slotPtr = arr.AppendElement(mozilla::fallible);
19184 if (!slotPtr) {
19185 JS_ReportOutOfMemory(cx);
19186 return false;
19187 }
19188 Nullable<Sequence<JS::Value>>& slot = *slotPtr;
19189 if (temp.isObject()) {
19190 JS::ForOfIterator iter1(cx);
19191 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
19192 return false;
19193 }
19194 if (!iter1.valueIsIterable()) {
19195 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
19196 return false;
19197 }
19198 Sequence<JS::Value> &arr1 = slot.SetValue();
19199 JS::Rooted<JS::Value> temp1(cx);
19200 while (true) {
19201 bool done1;
19202 if (!iter1.next(&temp1, &done1)) {
19203 return false;
19204 }
19205 if (done1) {
19206 break;
19207 }
19208 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
19209 if (!slotPtr1) {
19210 JS_ReportOutOfMemory(cx);
19211 return false;
19212 }
19213 JS::Value& slot1 = *slotPtr1;
19214 slot1 = temp1;
19215 }
19216 } else if (temp.isNullOrUndefined()) {
19217 slot.SetNull();
19218 } else {
19219 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
19220 return false;
19221 }
19222 }
19223 } else if (args[0].isNullOrUndefined()) {
19224 arg0.SetNull();
19225 } else {
19226 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
19227 return false;
19228 }
19229 // NOTE: This assert does NOT call the function.
19230 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSequenceOfNullableSequenceOfAny(cx, Constify(arg0)))>, "Should be returning void here");
19231 MOZ_KnownLive(self)(self)->PassNullableSequenceOfNullableSequenceOfAny(cx, Constify(arg0));
19232 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 19232); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19232; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19233 args.rval().setUndefined();
19234 return true;
19235}
19236
19237static const JSJitInfo passNullableSequenceOfNullableSequenceOfAny_methodinfo = {
19238 { (JSJitGetterOp)passNullableSequenceOfNullableSequenceOfAny },
19239 { prototypes::id::TestExampleInterface },
19240 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
19241 JSJitInfo::Method,
19242 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19243 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19244 false, /* isInfallible. False in setters. */
19245 false, /* isMovable. Not relevant for setters. */
19246 false, /* isEliminatable. Not relevant for setters. */
19247 false, /* isAlwaysInSlot. Only relevant for getters. */
19248 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19249 false, /* isTypedMethod. Only relevant for methods. */
19250 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19251};
19252
19253MOZ_CAN_RUN_SCRIPT static bool
19254passOptionalNullableSequenceOfNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19255{
19256 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableSequenceOfNullableSequenceOfAny");
19257 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19260( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfAny", JS::
ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame::
Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
19258 "TestExampleInterface", "passOptionalNullableSequenceOfNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19260( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfAny", JS::
ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame::
Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
19259 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19260( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfAny", JS::
ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame::
Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
19260 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19260( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfAny", JS::
ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame::
Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
19261
19262 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
19263 Optional<Nullable<Sequence<Nullable<Sequence<JS::Value>>>>> arg0;
19264 Maybe<SequenceRooter<Nullable<Sequence<JS::Value>>>> arg0_holder;
19265 if (args.hasDefined(0)) {
19266 arg0.Construct();
19267 arg0_holder.emplace(cx, &arg0.Value().SetValue());
19268 if (args[0].isObject()) {
19269 JS::ForOfIterator iter(cx);
19270 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
19271 return false;
19272 }
19273 if (!iter.valueIsIterable()) {
19274 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
19275 return false;
19276 }
19277 Sequence<Nullable<Sequence<JS::Value>>> &arr = arg0.Value().SetValue();
19278 JS::Rooted<JS::Value> temp(cx);
19279 while (true) {
19280 bool done;
19281 if (!iter.next(&temp, &done)) {
19282 return false;
19283 }
19284 if (done) {
19285 break;
19286 }
19287 Nullable<Sequence<JS::Value>>* slotPtr = arr.AppendElement(mozilla::fallible);
19288 if (!slotPtr) {
19289 JS_ReportOutOfMemory(cx);
19290 return false;
19291 }
19292 Nullable<Sequence<JS::Value>>& slot = *slotPtr;
19293 if (temp.isObject()) {
19294 JS::ForOfIterator iter1(cx);
19295 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
19296 return false;
19297 }
19298 if (!iter1.valueIsIterable()) {
19299 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
19300 return false;
19301 }
19302 Sequence<JS::Value> &arr1 = slot.SetValue();
19303 JS::Rooted<JS::Value> temp1(cx);
19304 while (true) {
19305 bool done1;
19306 if (!iter1.next(&temp1, &done1)) {
19307 return false;
19308 }
19309 if (done1) {
19310 break;
19311 }
19312 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
19313 if (!slotPtr1) {
19314 JS_ReportOutOfMemory(cx);
19315 return false;
19316 }
19317 JS::Value& slot1 = *slotPtr1;
19318 slot1 = temp1;
19319 }
19320 } else if (temp.isNullOrUndefined()) {
19321 slot.SetNull();
19322 } else {
19323 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
19324 return false;
19325 }
19326 }
19327 } else if (args[0].isNullOrUndefined()) {
19328 arg0.Value().SetNull();
19329 } else {
19330 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
19331 return false;
19332 }
19333 }
19334 // NOTE: This assert does NOT call the function.
19335 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfAny(cx, Constify(arg0)))>, "Should be returning void here");
19336 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfAny(cx, Constify(arg0));
19337 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 19337); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19337; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19338 args.rval().setUndefined();
19339 return true;
19340}
19341
19342static const JSJitInfo passOptionalNullableSequenceOfNullableSequenceOfAny_methodinfo = {
19343 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableSequenceOfAny },
19344 { prototypes::id::TestExampleInterface },
19345 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
19346 JSJitInfo::Method,
19347 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19348 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19349 false, /* isInfallible. False in setters. */
19350 false, /* isMovable. Not relevant for setters. */
19351 false, /* isEliminatable. Not relevant for setters. */
19352 false, /* isAlwaysInSlot. Only relevant for getters. */
19353 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19354 false, /* isTypedMethod. Only relevant for methods. */
19355 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19356};
19357
19358MOZ_CAN_RUN_SCRIPT static bool
19359passRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19360{
19361 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfAny");
19362 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19365( cx, "TestExampleInterface"
, "passRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19363 "TestExampleInterface", "passRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19365( cx, "TestExampleInterface"
, "passRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19364 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19365( cx, "TestExampleInterface"
, "passRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19365 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19365( cx, "TestExampleInterface"
, "passRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19366
19367 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
19368 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfAny", 1)) {
19369 return false;
19370 }
19371 Record<nsString, JS::Value> arg0;
19372 RecordRooter<nsString, JS::Value> arg0_holder(cx, &arg0);
19373 if (args[0].isObject()) {
19374 auto& recordEntries = arg0.Entries();
19375
19376 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
19377 JS::RootedVector<jsid> ids(cx);
19378 if (!js::GetPropertyKeys(cx, recordObj,
19379 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
19380 return false;
19381 }
19382 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
19383 JS_ReportOutOfMemory(cx);
19384 return false;
19385 }
19386 JS::Rooted<JS::Value> propNameValue(cx);
19387 JS::Rooted<JS::Value> temp(cx);
19388 JS::Rooted<jsid> curId(cx);
19389 JS::Rooted<JS::Value> idVal(cx);
19390 // Use a hashset to keep track of ids seen, to avoid
19391 // introducing nasty O(N^2) behavior scanning for them all the
19392 // time. Ideally we'd use a data structure with O(1) lookup
19393 // _and_ ordering for the MozMap, but we don't have one lying
19394 // around.
19395 nsTHashtable<nsStringHashKey> idsSeen;
19396 for (size_t i = 0; i < ids.length(); ++i) {
19397 curId = ids[i];
19398
19399 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
19400 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
19401 &desc)) {
19402 return false;
19403 }
19404
19405 if (desc.isNothing() || !desc->enumerable()) {
19406 continue;
19407 }
19408
19409 idVal = js::IdToValue(curId);
19410 nsString propName;
19411 // This will just throw if idVal is a Symbol, like the spec says
19412 // to do.
19413 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
19414 return false;
19415 }
19416
19417 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
19418 return false;
19419 }
19420
19421 Record<nsString, JS::Value>::EntryType* entry;
19422 if (!idsSeen.EnsureInserted(propName)) {
19423 // Find the existing entry.
19424 auto idx = recordEntries.IndexOf(propName);
19425 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?" ")"
, "../TestExampleGenBinding.cpp", 19426); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19426; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
19426 "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?" ")"
, "../TestExampleGenBinding.cpp", 19426); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19426; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
19427 // Now blow it away to make it look like it was just added
19428 // to the array, because it's not obvious that it's
19429 // safe to write to its already-initialized mValue via our
19430 // normal codegen conversions. For example, the value
19431 // could be a union and this would change its type, but
19432 // codegen assumes we won't do that.
19433 entry = recordEntries.ReconstructElementAt(idx);
19434 } else {
19435 // Safe to do an infallible append here, because we did a
19436 // SetCapacity above to the right capacity.
19437 entry = recordEntries.AppendElement();
19438 }
19439 entry->mKey = propName;
19440 JS::Value& slot = entry->mValue;
19441 slot = temp;
19442 }
19443 } else {
19444 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
19445 return false;
19446 }
19447 // NOTE: This assert does NOT call the function.
19448 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfAny(cx, Constify(arg0)))>, "Should be returning void here");
19449 MOZ_KnownLive(self)(self)->PassRecordOfAny(cx, Constify(arg0));
19450 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 19450); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19450; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19451 args.rval().setUndefined();
19452 return true;
19453}
19454
19455static const JSJitInfo passRecordOfAny_methodinfo = {
19456 { (JSJitGetterOp)passRecordOfAny },
19457 { prototypes::id::TestExampleInterface },
19458 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
19459 JSJitInfo::Method,
19460 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19461 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19462 false, /* isInfallible. False in setters. */
19463 false, /* isMovable. Not relevant for setters. */
19464 false, /* isEliminatable. Not relevant for setters. */
19465 false, /* isAlwaysInSlot. Only relevant for getters. */
19466 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19467 false, /* isTypedMethod. Only relevant for methods. */
19468 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19469};
19470
19471MOZ_CAN_RUN_SCRIPT static bool
19472passNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19473{
19474 BindingCallContext cx(cx_, "TestExampleInterface.passNullableRecordOfAny");
19475 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19478( cx, "TestExampleInterface"
, "passNullableRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19476 "TestExampleInterface", "passNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19478( cx, "TestExampleInterface"
, "passNullableRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19477 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19478( cx, "TestExampleInterface"
, "passNullableRecordOfAny", 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::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19478( cx, "TestExampleInterface"
, "passNullableRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19479
19480 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
19481 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableRecordOfAny", 1)) {
19482 return false;
19483 }
19484 Nullable<Record<nsString, JS::Value>> arg0;
19485 RecordRooter<nsString, JS::Value> arg0_holder(cx, &arg0.SetValue());
19486 if (args[0].isObject()) {
19487 auto& recordEntries = arg0.SetValue().Entries();
19488
19489 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
19490 JS::RootedVector<jsid> ids(cx);
19491 if (!js::GetPropertyKeys(cx, recordObj,
19492 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
19493 return false;
19494 }
19495 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
19496 JS_ReportOutOfMemory(cx);
19497 return false;
19498 }
19499 JS::Rooted<JS::Value> propNameValue(cx);
19500 JS::Rooted<JS::Value> temp(cx);
19501 JS::Rooted<jsid> curId(cx);
19502 JS::Rooted<JS::Value> idVal(cx);
19503 // Use a hashset to keep track of ids seen, to avoid
19504 // introducing nasty O(N^2) behavior scanning for them all the
19505 // time. Ideally we'd use a data structure with O(1) lookup
19506 // _and_ ordering for the MozMap, but we don't have one lying
19507 // around.
19508 nsTHashtable<nsStringHashKey> idsSeen;
19509 for (size_t i = 0; i < ids.length(); ++i) {
19510 curId = ids[i];
19511
19512 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
19513 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
19514 &desc)) {
19515 return false;
19516 }
19517
19518 if (desc.isNothing() || !desc->enumerable()) {
19519 continue;
19520 }
19521
19522 idVal = js::IdToValue(curId);
19523 nsString propName;
19524 // This will just throw if idVal is a Symbol, like the spec says
19525 // to do.
19526 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
19527 return false;
19528 }
19529
19530 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
19531 return false;
19532 }
19533
19534 Record<nsString, JS::Value>::EntryType* entry;
19535 if (!idsSeen.EnsureInserted(propName)) {
19536 // Find the existing entry.
19537 auto idx = recordEntries.IndexOf(propName);
19538 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?" ")"
, "../TestExampleGenBinding.cpp", 19539); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19539; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
19539 "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?" ")"
, "../TestExampleGenBinding.cpp", 19539); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19539; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
19540 // Now blow it away to make it look like it was just added
19541 // to the array, because it's not obvious that it's
19542 // safe to write to its already-initialized mValue via our
19543 // normal codegen conversions. For example, the value
19544 // could be a union and this would change its type, but
19545 // codegen assumes we won't do that.
19546 entry = recordEntries.ReconstructElementAt(idx);
19547 } else {
19548 // Safe to do an infallible append here, because we did a
19549 // SetCapacity above to the right capacity.
19550 entry = recordEntries.AppendElement();
19551 }
19552 entry->mKey = propName;
19553 JS::Value& slot = entry->mValue;
19554 slot = temp;
19555 }
19556 } else if (args[0].isNullOrUndefined()) {
19557 arg0.SetNull();
19558 } else {
19559 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
19560 return false;
19561 }
19562 // NOTE: This assert does NOT call the function.
19563 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableRecordOfAny(cx, Constify(arg0)))>, "Should be returning void here");
19564 MOZ_KnownLive(self)(self)->PassNullableRecordOfAny(cx, Constify(arg0));
19565 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 19565); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19565; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19566 args.rval().setUndefined();
19567 return true;
19568}
19569
19570static const JSJitInfo passNullableRecordOfAny_methodinfo = {
19571 { (JSJitGetterOp)passNullableRecordOfAny },
19572 { prototypes::id::TestExampleInterface },
19573 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
19574 JSJitInfo::Method,
19575 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19576 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19577 false, /* isInfallible. False in setters. */
19578 false, /* isMovable. Not relevant for setters. */
19579 false, /* isEliminatable. Not relevant for setters. */
19580 false, /* isAlwaysInSlot. Only relevant for getters. */
19581 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19582 false, /* isTypedMethod. Only relevant for methods. */
19583 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19584};
19585
19586MOZ_CAN_RUN_SCRIPT static bool
19587passOptionalRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19588{
19589 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalRecordOfAny");
19590 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19593( cx, "TestExampleInterface"
, "passOptionalRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19591 "TestExampleInterface", "passOptionalRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19593( cx, "TestExampleInterface"
, "passOptionalRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19592 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19593( cx, "TestExampleInterface"
, "passOptionalRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19593 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19593( cx, "TestExampleInterface"
, "passOptionalRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19594
19595 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
19596 Optional<Record<nsString, JS::Value>> arg0;
19597 Maybe<RecordRooter<nsString, JS::Value>> arg0_holder;
19598 if (args.hasDefined(0)) {
19599 arg0.Construct();
19600 arg0_holder.emplace(cx, &arg0.Value());
19601 if (args[0].isObject()) {
19602 auto& recordEntries = arg0.Value().Entries();
19603
19604 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
19605 JS::RootedVector<jsid> ids(cx);
19606 if (!js::GetPropertyKeys(cx, recordObj,
19607 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
19608 return false;
19609 }
19610 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
19611 JS_ReportOutOfMemory(cx);
19612 return false;
19613 }
19614 JS::Rooted<JS::Value> propNameValue(cx);
19615 JS::Rooted<JS::Value> temp(cx);
19616 JS::Rooted<jsid> curId(cx);
19617 JS::Rooted<JS::Value> idVal(cx);
19618 // Use a hashset to keep track of ids seen, to avoid
19619 // introducing nasty O(N^2) behavior scanning for them all the
19620 // time. Ideally we'd use a data structure with O(1) lookup
19621 // _and_ ordering for the MozMap, but we don't have one lying
19622 // around.
19623 nsTHashtable<nsStringHashKey> idsSeen;
19624 for (size_t i = 0; i < ids.length(); ++i) {
19625 curId = ids[i];
19626
19627 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
19628 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
19629 &desc)) {
19630 return false;
19631 }
19632
19633 if (desc.isNothing() || !desc->enumerable()) {
19634 continue;
19635 }
19636
19637 idVal = js::IdToValue(curId);
19638 nsString propName;
19639 // This will just throw if idVal is a Symbol, like the spec says
19640 // to do.
19641 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
19642 return false;
19643 }
19644
19645 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
19646 return false;
19647 }
19648
19649 Record<nsString, JS::Value>::EntryType* entry;
19650 if (!idsSeen.EnsureInserted(propName)) {
19651 // Find the existing entry.
19652 auto idx = recordEntries.IndexOf(propName);
19653 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?" ")"
, "../TestExampleGenBinding.cpp", 19654); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19654; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
19654 "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?" ")"
, "../TestExampleGenBinding.cpp", 19654); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19654; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
19655 // Now blow it away to make it look like it was just added
19656 // to the array, because it's not obvious that it's
19657 // safe to write to its already-initialized mValue via our
19658 // normal codegen conversions. For example, the value
19659 // could be a union and this would change its type, but
19660 // codegen assumes we won't do that.
19661 entry = recordEntries.ReconstructElementAt(idx);
19662 } else {
19663 // Safe to do an infallible append here, because we did a
19664 // SetCapacity above to the right capacity.
19665 entry = recordEntries.AppendElement();
19666 }
19667 entry->mKey = propName;
19668 JS::Value& slot = entry->mValue;
19669 slot = temp;
19670 }
19671 } else {
19672 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
19673 return false;
19674 }
19675 }
19676 // NOTE: This assert does NOT call the function.
19677 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalRecordOfAny(cx, Constify(arg0)))>, "Should be returning void here");
19678 MOZ_KnownLive(self)(self)->PassOptionalRecordOfAny(cx, Constify(arg0));
19679 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 19679); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19679; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19680 args.rval().setUndefined();
19681 return true;
19682}
19683
19684static const JSJitInfo passOptionalRecordOfAny_methodinfo = {
19685 { (JSJitGetterOp)passOptionalRecordOfAny },
19686 { prototypes::id::TestExampleInterface },
19687 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
19688 JSJitInfo::Method,
19689 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19690 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19691 false, /* isInfallible. False in setters. */
19692 false, /* isMovable. Not relevant for setters. */
19693 false, /* isEliminatable. Not relevant for setters. */
19694 false, /* isAlwaysInSlot. Only relevant for getters. */
19695 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19696 false, /* isTypedMethod. Only relevant for methods. */
19697 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19698};
19699
19700MOZ_CAN_RUN_SCRIPT static bool
19701passOptionalNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19702{
19703 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableRecordOfAny");
19704 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19707( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19705 "TestExampleInterface", "passOptionalNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19707( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19706 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19707( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19707 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19707( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
19708
19709 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
19710 Optional<Nullable<Record<nsString, JS::Value>>> arg0;
19711 Maybe<RecordRooter<nsString, JS::Value>> arg0_holder;
19712 if (args.hasDefined(0)) {
19713 arg0.Construct();
19714 arg0_holder.emplace(cx, &arg0.Value().SetValue());
19715 if (args[0].isObject()) {
19716 auto& recordEntries = arg0.Value().SetValue().Entries();
19717
19718 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
19719 JS::RootedVector<jsid> ids(cx);
19720 if (!js::GetPropertyKeys(cx, recordObj,
19721 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
19722 return false;
19723 }
19724 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
19725 JS_ReportOutOfMemory(cx);
19726 return false;
19727 }
19728 JS::Rooted<JS::Value> propNameValue(cx);
19729 JS::Rooted<JS::Value> temp(cx);
19730 JS::Rooted<jsid> curId(cx);
19731 JS::Rooted<JS::Value> idVal(cx);
19732 // Use a hashset to keep track of ids seen, to avoid
19733 // introducing nasty O(N^2) behavior scanning for them all the
19734 // time. Ideally we'd use a data structure with O(1) lookup
19735 // _and_ ordering for the MozMap, but we don't have one lying
19736 // around.
19737 nsTHashtable<nsStringHashKey> idsSeen;
19738 for (size_t i = 0; i < ids.length(); ++i) {
19739 curId = ids[i];
19740
19741 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
19742 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
19743 &desc)) {
19744 return false;
19745 }
19746
19747 if (desc.isNothing() || !desc->enumerable()) {
19748 continue;
19749 }
19750
19751 idVal = js::IdToValue(curId);
19752 nsString propName;
19753 // This will just throw if idVal is a Symbol, like the spec says
19754 // to do.
19755 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
19756 return false;
19757 }
19758
19759 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
19760 return false;
19761 }
19762
19763 Record<nsString, JS::Value>::EntryType* entry;
19764 if (!idsSeen.EnsureInserted(propName)) {
19765 // Find the existing entry.
19766 auto idx = recordEntries.IndexOf(propName);
19767 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?" ")"
, "../TestExampleGenBinding.cpp", 19768); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19768; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
19768 "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?" ")"
, "../TestExampleGenBinding.cpp", 19768); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19768; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
19769 // Now blow it away to make it look like it was just added
19770 // to the array, because it's not obvious that it's
19771 // safe to write to its already-initialized mValue via our
19772 // normal codegen conversions. For example, the value
19773 // could be a union and this would change its type, but
19774 // codegen assumes we won't do that.
19775 entry = recordEntries.ReconstructElementAt(idx);
19776 } else {
19777 // Safe to do an infallible append here, because we did a
19778 // SetCapacity above to the right capacity.
19779 entry = recordEntries.AppendElement();
19780 }
19781 entry->mKey = propName;
19782 JS::Value& slot = entry->mValue;
19783 slot = temp;
19784 }
19785 } else if (args[0].isNullOrUndefined()) {
19786 arg0.Value().SetNull();
19787 } else {
19788 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
19789 return false;
19790 }
19791 }
19792 // NOTE: This assert does NOT call the function.
19793 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfAny(cx, Constify(arg0)))>, "Should be returning void here");
19794 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfAny(cx, Constify(arg0));
19795 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 19795); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19795; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19796 args.rval().setUndefined();
19797 return true;
19798}
19799
19800static const JSJitInfo passOptionalNullableRecordOfAny_methodinfo = {
19801 { (JSJitGetterOp)passOptionalNullableRecordOfAny },
19802 { prototypes::id::TestExampleInterface },
19803 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
19804 JSJitInfo::Method,
19805 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19806 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19807 false, /* isInfallible. False in setters. */
19808 false, /* isMovable. Not relevant for setters. */
19809 false, /* isEliminatable. Not relevant for setters. */
19810 false, /* isAlwaysInSlot. Only relevant for getters. */
19811 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19812 false, /* isTypedMethod. Only relevant for methods. */
19813 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19814};
19815
19816MOZ_CAN_RUN_SCRIPT static bool
19817passOptionalRecordOfAnyWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19818{
19819 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalRecordOfAnyWithDefaultValue");
19820 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19823( cx, "TestExampleInterface"
, "passOptionalRecordOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19821 "TestExampleInterface", "passOptionalRecordOfAnyWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19823( cx, "TestExampleInterface"
, "passOptionalRecordOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19822 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19823( cx, "TestExampleInterface"
, "passOptionalRecordOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19823 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19823( cx, "TestExampleInterface"
, "passOptionalRecordOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
19824
19825 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
19826 Nullable<Record<nsString, JS::Value>> arg0;
19827 RecordRooter<nsString, JS::Value> arg0_holder(cx, &arg0.SetValue());
19828 if (args.hasDefined(0)) {
19829 if (args[0].isObject()) {
19830 auto& recordEntries = arg0.SetValue().Entries();
19831
19832 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
19833 JS::RootedVector<jsid> ids(cx);
19834 if (!js::GetPropertyKeys(cx, recordObj,
19835 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
19836 return false;
19837 }
19838 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
19839 JS_ReportOutOfMemory(cx);
19840 return false;
19841 }
19842 JS::Rooted<JS::Value> propNameValue(cx);
19843 JS::Rooted<JS::Value> temp(cx);
19844 JS::Rooted<jsid> curId(cx);
19845 JS::Rooted<JS::Value> idVal(cx);
19846 // Use a hashset to keep track of ids seen, to avoid
19847 // introducing nasty O(N^2) behavior scanning for them all the
19848 // time. Ideally we'd use a data structure with O(1) lookup
19849 // _and_ ordering for the MozMap, but we don't have one lying
19850 // around.
19851 nsTHashtable<nsStringHashKey> idsSeen;
19852 for (size_t i = 0; i < ids.length(); ++i) {
19853 curId = ids[i];
19854
19855 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
19856 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
19857 &desc)) {
19858 return false;
19859 }
19860
19861 if (desc.isNothing() || !desc->enumerable()) {
19862 continue;
19863 }
19864
19865 idVal = js::IdToValue(curId);
19866 nsString propName;
19867 // This will just throw if idVal is a Symbol, like the spec says
19868 // to do.
19869 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
19870 return false;
19871 }
19872
19873 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
19874 return false;
19875 }
19876
19877 Record<nsString, JS::Value>::EntryType* entry;
19878 if (!idsSeen.EnsureInserted(propName)) {
19879 // Find the existing entry.
19880 auto idx = recordEntries.IndexOf(propName);
19881 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?" ")"
, "../TestExampleGenBinding.cpp", 19882); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19882; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
19882 "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?" ")"
, "../TestExampleGenBinding.cpp", 19882); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 19882; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
19883 // Now blow it away to make it look like it was just added
19884 // to the array, because it's not obvious that it's
19885 // safe to write to its already-initialized mValue via our
19886 // normal codegen conversions. For example, the value
19887 // could be a union and this would change its type, but
19888 // codegen assumes we won't do that.
19889 entry = recordEntries.ReconstructElementAt(idx);
19890 } else {
19891 // Safe to do an infallible append here, because we did a
19892 // SetCapacity above to the right capacity.
19893 entry = recordEntries.AppendElement();
19894 }
19895 entry->mKey = propName;
19896 JS::Value& slot = entry->mValue;
19897 slot = temp;
19898 }
19899 } else if (args[0].isNullOrUndefined()) {
19900 arg0.SetNull();
19901 } else {
19902 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
19903 return false;
19904 }
19905 } else {
19906 arg0.SetNull();
19907 }
19908 // NOTE: This assert does NOT call the function.
19909 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalRecordOfAnyWithDefaultValue(cx, Constify(arg0)))>, "Should be returning void here");
19910 MOZ_KnownLive(self)(self)->PassOptionalRecordOfAnyWithDefaultValue(cx, Constify(arg0));
19911 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 19911); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19911; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19912 args.rval().setUndefined();
19913 return true;
19914}
19915
19916static const JSJitInfo passOptionalRecordOfAnyWithDefaultValue_methodinfo = {
19917 { (JSJitGetterOp)passOptionalRecordOfAnyWithDefaultValue },
19918 { prototypes::id::TestExampleInterface },
19919 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
19920 JSJitInfo::Method,
19921 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19922 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19923 false, /* isInfallible. False in setters. */
19924 false, /* isMovable. Not relevant for setters. */
19925 false, /* isEliminatable. Not relevant for setters. */
19926 false, /* isAlwaysInSlot. Only relevant for getters. */
19927 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19928 false, /* isTypedMethod. Only relevant for methods. */
19929 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19930};
19931
19932MOZ_CAN_RUN_SCRIPT static bool
19933passRecordOfRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19934{
19935 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfRecordOfAny");
19936 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19939( cx, "TestExampleInterface"
, "passRecordOfRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19937 "TestExampleInterface", "passRecordOfRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19939( cx, "TestExampleInterface"
, "passRecordOfRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19938 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19939( cx, "TestExampleInterface"
, "passRecordOfRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19939 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19939( cx, "TestExampleInterface"
, "passRecordOfRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19940
19941 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
19942 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfRecordOfAny", 1)) {
19943 return false;
19944 }
19945 Record<nsString, Record<nsString, JS::Value>> arg0;
19946 RecordRooter<nsString, Record<nsString, JS::Value>> arg0_holder(cx, &arg0);
19947 if (args[0].isObject()) {
19948 auto& recordEntries = arg0.Entries();
19949
19950 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
19951 JS::RootedVector<jsid> ids(cx);
19952 if (!js::GetPropertyKeys(cx, recordObj,
19953 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
19954 return false;
19955 }
19956 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
19957 JS_ReportOutOfMemory(cx);
19958 return false;
19959 }
19960 JS::Rooted<JS::Value> propNameValue(cx);
19961 JS::Rooted<JS::Value> temp(cx);
19962 JS::Rooted<jsid> curId(cx);
19963 JS::Rooted<JS::Value> idVal(cx);
19964 // Use a hashset to keep track of ids seen, to avoid
19965 // introducing nasty O(N^2) behavior scanning for them all the
19966 // time. Ideally we'd use a data structure with O(1) lookup
19967 // _and_ ordering for the MozMap, but we don't have one lying
19968 // around.
19969 nsTHashtable<nsStringHashKey> idsSeen;
19970 for (size_t i = 0; i < ids.length(); ++i) {
19971 curId = ids[i];
19972
19973 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
19974 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
19975 &desc)) {
19976 return false;
19977 }
19978
19979 if (desc.isNothing() || !desc->enumerable()) {
19980 continue;
19981 }
19982
19983 idVal = js::IdToValue(curId);
19984 nsString propName;
19985 // This will just throw if idVal is a Symbol, like the spec says
19986 // to do.
19987 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
19988 return false;
19989 }
19990
19991 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
19992 return false;
19993 }
19994
19995 Record<nsString, Record<nsString, JS::Value>>::EntryType* entry;
19996 if (!idsSeen.EnsureInserted(propName)) {
19997 // Find the existing entry.
19998 auto idx = recordEntries.IndexOf(propName);
19999 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?" ")"
, "../TestExampleGenBinding.cpp", 20000); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20000; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20000 "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?" ")"
, "../TestExampleGenBinding.cpp", 20000); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20000; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20001 // Now blow it away to make it look like it was just added
20002 // to the array, because it's not obvious that it's
20003 // safe to write to its already-initialized mValue via our
20004 // normal codegen conversions. For example, the value
20005 // could be a union and this would change its type, but
20006 // codegen assumes we won't do that.
20007 entry = recordEntries.ReconstructElementAt(idx);
20008 } else {
20009 // Safe to do an infallible append here, because we did a
20010 // SetCapacity above to the right capacity.
20011 entry = recordEntries.AppendElement();
20012 }
20013 entry->mKey = propName;
20014 Record<nsString, JS::Value>& slot = entry->mValue;
20015 if (temp.isObject()) {
20016 auto& recordEntries = slot.Entries();
20017
20018 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
20019 JS::RootedVector<jsid> ids(cx);
20020 if (!js::GetPropertyKeys(cx, recordObj,
20021 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
20022 return false;
20023 }
20024 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
20025 JS_ReportOutOfMemory(cx);
20026 return false;
20027 }
20028 JS::Rooted<JS::Value> propNameValue(cx);
20029 JS::Rooted<JS::Value> temp(cx);
20030 JS::Rooted<jsid> curId(cx);
20031 JS::Rooted<JS::Value> idVal(cx);
20032 // Use a hashset to keep track of ids seen, to avoid
20033 // introducing nasty O(N^2) behavior scanning for them all the
20034 // time. Ideally we'd use a data structure with O(1) lookup
20035 // _and_ ordering for the MozMap, but we don't have one lying
20036 // around.
20037 nsTHashtable<nsStringHashKey> idsSeen;
20038 for (size_t i = 0; i < ids.length(); ++i) {
20039 curId = ids[i];
20040
20041 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
20042 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
20043 &desc)) {
20044 return false;
20045 }
20046
20047 if (desc.isNothing() || !desc->enumerable()) {
20048 continue;
20049 }
20050
20051 idVal = js::IdToValue(curId);
20052 nsString propName;
20053 // This will just throw if idVal is a Symbol, like the spec says
20054 // to do.
20055 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
20056 return false;
20057 }
20058
20059 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
20060 return false;
20061 }
20062
20063 Record<nsString, JS::Value>::EntryType* entry;
20064 if (!idsSeen.EnsureInserted(propName)) {
20065 // Find the existing entry.
20066 auto idx = recordEntries.IndexOf(propName);
20067 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?" ")"
, "../TestExampleGenBinding.cpp", 20068); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20068; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20068 "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?" ")"
, "../TestExampleGenBinding.cpp", 20068); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20068; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20069 // Now blow it away to make it look like it was just added
20070 // to the array, because it's not obvious that it's
20071 // safe to write to its already-initialized mValue via our
20072 // normal codegen conversions. For example, the value
20073 // could be a union and this would change its type, but
20074 // codegen assumes we won't do that.
20075 entry = recordEntries.ReconstructElementAt(idx);
20076 } else {
20077 // Safe to do an infallible append here, because we did a
20078 // SetCapacity above to the right capacity.
20079 entry = recordEntries.AppendElement();
20080 }
20081 entry->mKey = propName;
20082 JS::Value& slot = entry->mValue;
20083 slot = temp;
20084 }
20085 } else {
20086 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
20087 return false;
20088 }
20089 }
20090 } else {
20091 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20092 return false;
20093 }
20094 // NOTE: This assert does NOT call the function.
20095 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfRecordOfAny(cx, Constify(arg0)))>, "Should be returning void here");
20096 MOZ_KnownLive(self)(self)->PassRecordOfRecordOfAny(cx, Constify(arg0));
20097 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 20097); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20097; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20098 args.rval().setUndefined();
20099 return true;
20100}
20101
20102static const JSJitInfo passRecordOfRecordOfAny_methodinfo = {
20103 { (JSJitGetterOp)passRecordOfRecordOfAny },
20104 { prototypes::id::TestExampleInterface },
20105 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
20106 JSJitInfo::Method,
20107 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20108 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20109 false, /* isInfallible. False in setters. */
20110 false, /* isMovable. Not relevant for setters. */
20111 false, /* isEliminatable. Not relevant for setters. */
20112 false, /* isAlwaysInSlot. Only relevant for getters. */
20113 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20114 false, /* isTypedMethod. Only relevant for methods. */
20115 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20116};
20117
20118MOZ_CAN_RUN_SCRIPT static bool
20119passRecordOfNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20120{
20121 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfNullableRecordOfAny");
20122 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20125( cx, "TestExampleInterface"
, "passRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20123 "TestExampleInterface", "passRecordOfNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20125( cx, "TestExampleInterface"
, "passRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20124 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20125( cx, "TestExampleInterface"
, "passRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20125 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20125( cx, "TestExampleInterface"
, "passRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
20126
20127 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
20128 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfNullableRecordOfAny", 1)) {
20129 return false;
20130 }
20131 Record<nsString, Nullable<Record<nsString, JS::Value>>> arg0;
20132 RecordRooter<nsString, Nullable<Record<nsString, JS::Value>>> arg0_holder(cx, &arg0);
20133 if (args[0].isObject()) {
20134 auto& recordEntries = arg0.Entries();
20135
20136 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
20137 JS::RootedVector<jsid> ids(cx);
20138 if (!js::GetPropertyKeys(cx, recordObj,
20139 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
20140 return false;
20141 }
20142 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
20143 JS_ReportOutOfMemory(cx);
20144 return false;
20145 }
20146 JS::Rooted<JS::Value> propNameValue(cx);
20147 JS::Rooted<JS::Value> temp(cx);
20148 JS::Rooted<jsid> curId(cx);
20149 JS::Rooted<JS::Value> idVal(cx);
20150 // Use a hashset to keep track of ids seen, to avoid
20151 // introducing nasty O(N^2) behavior scanning for them all the
20152 // time. Ideally we'd use a data structure with O(1) lookup
20153 // _and_ ordering for the MozMap, but we don't have one lying
20154 // around.
20155 nsTHashtable<nsStringHashKey> idsSeen;
20156 for (size_t i = 0; i < ids.length(); ++i) {
20157 curId = ids[i];
20158
20159 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
20160 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
20161 &desc)) {
20162 return false;
20163 }
20164
20165 if (desc.isNothing() || !desc->enumerable()) {
20166 continue;
20167 }
20168
20169 idVal = js::IdToValue(curId);
20170 nsString propName;
20171 // This will just throw if idVal is a Symbol, like the spec says
20172 // to do.
20173 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
20174 return false;
20175 }
20176
20177 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
20178 return false;
20179 }
20180
20181 Record<nsString, Nullable<Record<nsString, JS::Value>>>::EntryType* entry;
20182 if (!idsSeen.EnsureInserted(propName)) {
20183 // Find the existing entry.
20184 auto idx = recordEntries.IndexOf(propName);
20185 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?" ")"
, "../TestExampleGenBinding.cpp", 20186); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20186; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20186 "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?" ")"
, "../TestExampleGenBinding.cpp", 20186); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20186; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20187 // Now blow it away to make it look like it was just added
20188 // to the array, because it's not obvious that it's
20189 // safe to write to its already-initialized mValue via our
20190 // normal codegen conversions. For example, the value
20191 // could be a union and this would change its type, but
20192 // codegen assumes we won't do that.
20193 entry = recordEntries.ReconstructElementAt(idx);
20194 } else {
20195 // Safe to do an infallible append here, because we did a
20196 // SetCapacity above to the right capacity.
20197 entry = recordEntries.AppendElement();
20198 }
20199 entry->mKey = propName;
20200 Nullable<Record<nsString, JS::Value>>& slot = entry->mValue;
20201 if (temp.isObject()) {
20202 auto& recordEntries = slot.SetValue().Entries();
20203
20204 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
20205 JS::RootedVector<jsid> ids(cx);
20206 if (!js::GetPropertyKeys(cx, recordObj,
20207 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
20208 return false;
20209 }
20210 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
20211 JS_ReportOutOfMemory(cx);
20212 return false;
20213 }
20214 JS::Rooted<JS::Value> propNameValue(cx);
20215 JS::Rooted<JS::Value> temp(cx);
20216 JS::Rooted<jsid> curId(cx);
20217 JS::Rooted<JS::Value> idVal(cx);
20218 // Use a hashset to keep track of ids seen, to avoid
20219 // introducing nasty O(N^2) behavior scanning for them all the
20220 // time. Ideally we'd use a data structure with O(1) lookup
20221 // _and_ ordering for the MozMap, but we don't have one lying
20222 // around.
20223 nsTHashtable<nsStringHashKey> idsSeen;
20224 for (size_t i = 0; i < ids.length(); ++i) {
20225 curId = ids[i];
20226
20227 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
20228 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
20229 &desc)) {
20230 return false;
20231 }
20232
20233 if (desc.isNothing() || !desc->enumerable()) {
20234 continue;
20235 }
20236
20237 idVal = js::IdToValue(curId);
20238 nsString propName;
20239 // This will just throw if idVal is a Symbol, like the spec says
20240 // to do.
20241 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
20242 return false;
20243 }
20244
20245 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
20246 return false;
20247 }
20248
20249 Record<nsString, JS::Value>::EntryType* entry;
20250 if (!idsSeen.EnsureInserted(propName)) {
20251 // Find the existing entry.
20252 auto idx = recordEntries.IndexOf(propName);
20253 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?" ")"
, "../TestExampleGenBinding.cpp", 20254); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20254; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20254 "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?" ")"
, "../TestExampleGenBinding.cpp", 20254); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20254; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20255 // Now blow it away to make it look like it was just added
20256 // to the array, because it's not obvious that it's
20257 // safe to write to its already-initialized mValue via our
20258 // normal codegen conversions. For example, the value
20259 // could be a union and this would change its type, but
20260 // codegen assumes we won't do that.
20261 entry = recordEntries.ReconstructElementAt(idx);
20262 } else {
20263 // Safe to do an infallible append here, because we did a
20264 // SetCapacity above to the right capacity.
20265 entry = recordEntries.AppendElement();
20266 }
20267 entry->mKey = propName;
20268 JS::Value& slot = entry->mValue;
20269 slot = temp;
20270 }
20271 } else if (temp.isNullOrUndefined()) {
20272 slot.SetNull();
20273 } else {
20274 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
20275 return false;
20276 }
20277 }
20278 } else {
20279 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20280 return false;
20281 }
20282 // NOTE: This assert does NOT call the function.
20283 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfNullableRecordOfAny(cx, Constify(arg0)))>, "Should be returning void here");
20284 MOZ_KnownLive(self)(self)->PassRecordOfNullableRecordOfAny(cx, Constify(arg0));
20285 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 20285); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20285; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20286 args.rval().setUndefined();
20287 return true;
20288}
20289
20290static const JSJitInfo passRecordOfNullableRecordOfAny_methodinfo = {
20291 { (JSJitGetterOp)passRecordOfNullableRecordOfAny },
20292 { prototypes::id::TestExampleInterface },
20293 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
20294 JSJitInfo::Method,
20295 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20296 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20297 false, /* isInfallible. False in setters. */
20298 false, /* isMovable. Not relevant for setters. */
20299 false, /* isEliminatable. Not relevant for setters. */
20300 false, /* isAlwaysInSlot. Only relevant for getters. */
20301 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20302 false, /* isTypedMethod. Only relevant for methods. */
20303 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20304};
20305
20306MOZ_CAN_RUN_SCRIPT static bool
20307passNullableRecordOfNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20308{
20309 BindingCallContext cx(cx_, "TestExampleInterface.passNullableRecordOfNullableRecordOfAny");
20310 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20313( cx, "TestExampleInterface"
, "passNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20311 "TestExampleInterface", "passNullableRecordOfNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20313( cx, "TestExampleInterface"
, "passNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20312 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20313( cx, "TestExampleInterface"
, "passNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20313 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20313( cx, "TestExampleInterface"
, "passNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
20314
20315 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
20316 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableRecordOfNullableRecordOfAny", 1)) {
20317 return false;
20318 }
20319 Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>> arg0;
20320 RecordRooter<nsString, Nullable<Record<nsString, JS::Value>>> arg0_holder(cx, &arg0.SetValue());
20321 if (args[0].isObject()) {
20322 auto& recordEntries = arg0.SetValue().Entries();
20323
20324 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
20325 JS::RootedVector<jsid> ids(cx);
20326 if (!js::GetPropertyKeys(cx, recordObj,
20327 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
20328 return false;
20329 }
20330 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
20331 JS_ReportOutOfMemory(cx);
20332 return false;
20333 }
20334 JS::Rooted<JS::Value> propNameValue(cx);
20335 JS::Rooted<JS::Value> temp(cx);
20336 JS::Rooted<jsid> curId(cx);
20337 JS::Rooted<JS::Value> idVal(cx);
20338 // Use a hashset to keep track of ids seen, to avoid
20339 // introducing nasty O(N^2) behavior scanning for them all the
20340 // time. Ideally we'd use a data structure with O(1) lookup
20341 // _and_ ordering for the MozMap, but we don't have one lying
20342 // around.
20343 nsTHashtable<nsStringHashKey> idsSeen;
20344 for (size_t i = 0; i < ids.length(); ++i) {
20345 curId = ids[i];
20346
20347 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
20348 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
20349 &desc)) {
20350 return false;
20351 }
20352
20353 if (desc.isNothing() || !desc->enumerable()) {
20354 continue;
20355 }
20356
20357 idVal = js::IdToValue(curId);
20358 nsString propName;
20359 // This will just throw if idVal is a Symbol, like the spec says
20360 // to do.
20361 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
20362 return false;
20363 }
20364
20365 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
20366 return false;
20367 }
20368
20369 Record<nsString, Nullable<Record<nsString, JS::Value>>>::EntryType* entry;
20370 if (!idsSeen.EnsureInserted(propName)) {
20371 // Find the existing entry.
20372 auto idx = recordEntries.IndexOf(propName);
20373 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?" ")"
, "../TestExampleGenBinding.cpp", 20374); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20374; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20374 "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?" ")"
, "../TestExampleGenBinding.cpp", 20374); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20374; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20375 // Now blow it away to make it look like it was just added
20376 // to the array, because it's not obvious that it's
20377 // safe to write to its already-initialized mValue via our
20378 // normal codegen conversions. For example, the value
20379 // could be a union and this would change its type, but
20380 // codegen assumes we won't do that.
20381 entry = recordEntries.ReconstructElementAt(idx);
20382 } else {
20383 // Safe to do an infallible append here, because we did a
20384 // SetCapacity above to the right capacity.
20385 entry = recordEntries.AppendElement();
20386 }
20387 entry->mKey = propName;
20388 Nullable<Record<nsString, JS::Value>>& slot = entry->mValue;
20389 if (temp.isObject()) {
20390 auto& recordEntries = slot.SetValue().Entries();
20391
20392 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
20393 JS::RootedVector<jsid> ids(cx);
20394 if (!js::GetPropertyKeys(cx, recordObj,
20395 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
20396 return false;
20397 }
20398 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
20399 JS_ReportOutOfMemory(cx);
20400 return false;
20401 }
20402 JS::Rooted<JS::Value> propNameValue(cx);
20403 JS::Rooted<JS::Value> temp(cx);
20404 JS::Rooted<jsid> curId(cx);
20405 JS::Rooted<JS::Value> idVal(cx);
20406 // Use a hashset to keep track of ids seen, to avoid
20407 // introducing nasty O(N^2) behavior scanning for them all the
20408 // time. Ideally we'd use a data structure with O(1) lookup
20409 // _and_ ordering for the MozMap, but we don't have one lying
20410 // around.
20411 nsTHashtable<nsStringHashKey> idsSeen;
20412 for (size_t i = 0; i < ids.length(); ++i) {
20413 curId = ids[i];
20414
20415 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
20416 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
20417 &desc)) {
20418 return false;
20419 }
20420
20421 if (desc.isNothing() || !desc->enumerable()) {
20422 continue;
20423 }
20424
20425 idVal = js::IdToValue(curId);
20426 nsString propName;
20427 // This will just throw if idVal is a Symbol, like the spec says
20428 // to do.
20429 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
20430 return false;
20431 }
20432
20433 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
20434 return false;
20435 }
20436
20437 Record<nsString, JS::Value>::EntryType* entry;
20438 if (!idsSeen.EnsureInserted(propName)) {
20439 // Find the existing entry.
20440 auto idx = recordEntries.IndexOf(propName);
20441 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?" ")"
, "../TestExampleGenBinding.cpp", 20442); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20442; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20442 "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?" ")"
, "../TestExampleGenBinding.cpp", 20442); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20442; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20443 // Now blow it away to make it look like it was just added
20444 // to the array, because it's not obvious that it's
20445 // safe to write to its already-initialized mValue via our
20446 // normal codegen conversions. For example, the value
20447 // could be a union and this would change its type, but
20448 // codegen assumes we won't do that.
20449 entry = recordEntries.ReconstructElementAt(idx);
20450 } else {
20451 // Safe to do an infallible append here, because we did a
20452 // SetCapacity above to the right capacity.
20453 entry = recordEntries.AppendElement();
20454 }
20455 entry->mKey = propName;
20456 JS::Value& slot = entry->mValue;
20457 slot = temp;
20458 }
20459 } else if (temp.isNullOrUndefined()) {
20460 slot.SetNull();
20461 } else {
20462 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
20463 return false;
20464 }
20465 }
20466 } else if (args[0].isNullOrUndefined()) {
20467 arg0.SetNull();
20468 } else {
20469 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20470 return false;
20471 }
20472 // NOTE: This assert does NOT call the function.
20473 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableRecordOfNullableRecordOfAny(cx, Constify(arg0)))>, "Should be returning void here");
20474 MOZ_KnownLive(self)(self)->PassNullableRecordOfNullableRecordOfAny(cx, Constify(arg0));
20475 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 20475); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20475; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20476 args.rval().setUndefined();
20477 return true;
20478}
20479
20480static const JSJitInfo passNullableRecordOfNullableRecordOfAny_methodinfo = {
20481 { (JSJitGetterOp)passNullableRecordOfNullableRecordOfAny },
20482 { prototypes::id::TestExampleInterface },
20483 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
20484 JSJitInfo::Method,
20485 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20486 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20487 false, /* isInfallible. False in setters. */
20488 false, /* isMovable. Not relevant for setters. */
20489 false, /* isEliminatable. Not relevant for setters. */
20490 false, /* isAlwaysInSlot. Only relevant for getters. */
20491 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20492 false, /* isTypedMethod. Only relevant for methods. */
20493 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20494};
20495
20496MOZ_CAN_RUN_SCRIPT static bool
20497passOptionalNullableRecordOfNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20498{
20499 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableRecordOfNullableRecordOfAny");
20500 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20503( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20501 "TestExampleInterface", "passOptionalNullableRecordOfNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20503( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20502 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20503( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20503 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20503( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
20504
20505 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
20506 Optional<Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>>> arg0;
20507 Maybe<RecordRooter<nsString, Nullable<Record<nsString, JS::Value>>>> arg0_holder;
20508 if (args.hasDefined(0)) {
20509 arg0.Construct();
20510 arg0_holder.emplace(cx, &arg0.Value().SetValue());
20511 if (args[0].isObject()) {
20512 auto& recordEntries = arg0.Value().SetValue().Entries();
20513
20514 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
20515 JS::RootedVector<jsid> ids(cx);
20516 if (!js::GetPropertyKeys(cx, recordObj,
20517 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
20518 return false;
20519 }
20520 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
20521 JS_ReportOutOfMemory(cx);
20522 return false;
20523 }
20524 JS::Rooted<JS::Value> propNameValue(cx);
20525 JS::Rooted<JS::Value> temp(cx);
20526 JS::Rooted<jsid> curId(cx);
20527 JS::Rooted<JS::Value> idVal(cx);
20528 // Use a hashset to keep track of ids seen, to avoid
20529 // introducing nasty O(N^2) behavior scanning for them all the
20530 // time. Ideally we'd use a data structure with O(1) lookup
20531 // _and_ ordering for the MozMap, but we don't have one lying
20532 // around.
20533 nsTHashtable<nsStringHashKey> idsSeen;
20534 for (size_t i = 0; i < ids.length(); ++i) {
20535 curId = ids[i];
20536
20537 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
20538 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
20539 &desc)) {
20540 return false;
20541 }
20542
20543 if (desc.isNothing() || !desc->enumerable()) {
20544 continue;
20545 }
20546
20547 idVal = js::IdToValue(curId);
20548 nsString propName;
20549 // This will just throw if idVal is a Symbol, like the spec says
20550 // to do.
20551 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
20552 return false;
20553 }
20554
20555 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
20556 return false;
20557 }
20558
20559 Record<nsString, Nullable<Record<nsString, JS::Value>>>::EntryType* entry;
20560 if (!idsSeen.EnsureInserted(propName)) {
20561 // Find the existing entry.
20562 auto idx = recordEntries.IndexOf(propName);
20563 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?" ")"
, "../TestExampleGenBinding.cpp", 20564); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20564; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20564 "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?" ")"
, "../TestExampleGenBinding.cpp", 20564); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20564; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20565 // Now blow it away to make it look like it was just added
20566 // to the array, because it's not obvious that it's
20567 // safe to write to its already-initialized mValue via our
20568 // normal codegen conversions. For example, the value
20569 // could be a union and this would change its type, but
20570 // codegen assumes we won't do that.
20571 entry = recordEntries.ReconstructElementAt(idx);
20572 } else {
20573 // Safe to do an infallible append here, because we did a
20574 // SetCapacity above to the right capacity.
20575 entry = recordEntries.AppendElement();
20576 }
20577 entry->mKey = propName;
20578 Nullable<Record<nsString, JS::Value>>& slot = entry->mValue;
20579 if (temp.isObject()) {
20580 auto& recordEntries = slot.SetValue().Entries();
20581
20582 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
20583 JS::RootedVector<jsid> ids(cx);
20584 if (!js::GetPropertyKeys(cx, recordObj,
20585 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
20586 return false;
20587 }
20588 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
20589 JS_ReportOutOfMemory(cx);
20590 return false;
20591 }
20592 JS::Rooted<JS::Value> propNameValue(cx);
20593 JS::Rooted<JS::Value> temp(cx);
20594 JS::Rooted<jsid> curId(cx);
20595 JS::Rooted<JS::Value> idVal(cx);
20596 // Use a hashset to keep track of ids seen, to avoid
20597 // introducing nasty O(N^2) behavior scanning for them all the
20598 // time. Ideally we'd use a data structure with O(1) lookup
20599 // _and_ ordering for the MozMap, but we don't have one lying
20600 // around.
20601 nsTHashtable<nsStringHashKey> idsSeen;
20602 for (size_t i = 0; i < ids.length(); ++i) {
20603 curId = ids[i];
20604
20605 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
20606 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
20607 &desc)) {
20608 return false;
20609 }
20610
20611 if (desc.isNothing() || !desc->enumerable()) {
20612 continue;
20613 }
20614
20615 idVal = js::IdToValue(curId);
20616 nsString propName;
20617 // This will just throw if idVal is a Symbol, like the spec says
20618 // to do.
20619 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
20620 return false;
20621 }
20622
20623 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
20624 return false;
20625 }
20626
20627 Record<nsString, JS::Value>::EntryType* entry;
20628 if (!idsSeen.EnsureInserted(propName)) {
20629 // Find the existing entry.
20630 auto idx = recordEntries.IndexOf(propName);
20631 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?" ")"
, "../TestExampleGenBinding.cpp", 20632); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20632; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20632 "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?" ")"
, "../TestExampleGenBinding.cpp", 20632); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20632; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20633 // Now blow it away to make it look like it was just added
20634 // to the array, because it's not obvious that it's
20635 // safe to write to its already-initialized mValue via our
20636 // normal codegen conversions. For example, the value
20637 // could be a union and this would change its type, but
20638 // codegen assumes we won't do that.
20639 entry = recordEntries.ReconstructElementAt(idx);
20640 } else {
20641 // Safe to do an infallible append here, because we did a
20642 // SetCapacity above to the right capacity.
20643 entry = recordEntries.AppendElement();
20644 }
20645 entry->mKey = propName;
20646 JS::Value& slot = entry->mValue;
20647 slot = temp;
20648 }
20649 } else if (temp.isNullOrUndefined()) {
20650 slot.SetNull();
20651 } else {
20652 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
20653 return false;
20654 }
20655 }
20656 } else if (args[0].isNullOrUndefined()) {
20657 arg0.Value().SetNull();
20658 } else {
20659 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20660 return false;
20661 }
20662 }
20663 // NOTE: This assert does NOT call the function.
20664 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableRecordOfAny(cx, Constify(arg0)))>, "Should be returning void here");
20665 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableRecordOfAny(cx, Constify(arg0));
20666 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 20666); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20666; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20667 args.rval().setUndefined();
20668 return true;
20669}
20670
20671static const JSJitInfo passOptionalNullableRecordOfNullableRecordOfAny_methodinfo = {
20672 { (JSJitGetterOp)passOptionalNullableRecordOfNullableRecordOfAny },
20673 { prototypes::id::TestExampleInterface },
20674 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
20675 JSJitInfo::Method,
20676 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20677 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20678 false, /* isInfallible. False in setters. */
20679 false, /* isMovable. Not relevant for setters. */
20680 false, /* isEliminatable. Not relevant for setters. */
20681 false, /* isAlwaysInSlot. Only relevant for getters. */
20682 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20683 false, /* isTypedMethod. Only relevant for methods. */
20684 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20685};
20686
20687MOZ_CAN_RUN_SCRIPT static bool
20688passOptionalNullableRecordOfNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20689{
20690 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableRecordOfNullableSequenceOfAny");
20691 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20694( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20692 "TestExampleInterface", "passOptionalNullableRecordOfNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20694( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20693 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20694( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20694 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20694( cx, "TestExampleInterface"
, "passOptionalNullableRecordOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
20695
20696 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
20697 Optional<Nullable<Record<nsString, Nullable<Sequence<JS::Value>>>>> arg0;
20698 Maybe<RecordRooter<nsString, Nullable<Sequence<JS::Value>>>> arg0_holder;
20699 if (args.hasDefined(0)) {
20700 arg0.Construct();
20701 arg0_holder.emplace(cx, &arg0.Value().SetValue());
20702 if (args[0].isObject()) {
20703 auto& recordEntries = arg0.Value().SetValue().Entries();
20704
20705 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
20706 JS::RootedVector<jsid> ids(cx);
20707 if (!js::GetPropertyKeys(cx, recordObj,
20708 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
20709 return false;
20710 }
20711 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
20712 JS_ReportOutOfMemory(cx);
20713 return false;
20714 }
20715 JS::Rooted<JS::Value> propNameValue(cx);
20716 JS::Rooted<JS::Value> temp(cx);
20717 JS::Rooted<jsid> curId(cx);
20718 JS::Rooted<JS::Value> idVal(cx);
20719 // Use a hashset to keep track of ids seen, to avoid
20720 // introducing nasty O(N^2) behavior scanning for them all the
20721 // time. Ideally we'd use a data structure with O(1) lookup
20722 // _and_ ordering for the MozMap, but we don't have one lying
20723 // around.
20724 nsTHashtable<nsStringHashKey> idsSeen;
20725 for (size_t i = 0; i < ids.length(); ++i) {
20726 curId = ids[i];
20727
20728 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
20729 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
20730 &desc)) {
20731 return false;
20732 }
20733
20734 if (desc.isNothing() || !desc->enumerable()) {
20735 continue;
20736 }
20737
20738 idVal = js::IdToValue(curId);
20739 nsString propName;
20740 // This will just throw if idVal is a Symbol, like the spec says
20741 // to do.
20742 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
20743 return false;
20744 }
20745
20746 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
20747 return false;
20748 }
20749
20750 Record<nsString, Nullable<Sequence<JS::Value>>>::EntryType* entry;
20751 if (!idsSeen.EnsureInserted(propName)) {
20752 // Find the existing entry.
20753 auto idx = recordEntries.IndexOf(propName);
20754 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?" ")"
, "../TestExampleGenBinding.cpp", 20755); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20755; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20755 "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?" ")"
, "../TestExampleGenBinding.cpp", 20755); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20755; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20756 // Now blow it away to make it look like it was just added
20757 // to the array, because it's not obvious that it's
20758 // safe to write to its already-initialized mValue via our
20759 // normal codegen conversions. For example, the value
20760 // could be a union and this would change its type, but
20761 // codegen assumes we won't do that.
20762 entry = recordEntries.ReconstructElementAt(idx);
20763 } else {
20764 // Safe to do an infallible append here, because we did a
20765 // SetCapacity above to the right capacity.
20766 entry = recordEntries.AppendElement();
20767 }
20768 entry->mKey = propName;
20769 Nullable<Sequence<JS::Value>>& slot = entry->mValue;
20770 if (temp.isObject()) {
20771 JS::ForOfIterator iter1(cx);
20772 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
20773 return false;
20774 }
20775 if (!iter1.valueIsIterable()) {
20776 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value in argument 1", "sequence");
20777 return false;
20778 }
20779 Sequence<JS::Value> &arr1 = slot.SetValue();
20780 JS::Rooted<JS::Value> temp1(cx);
20781 while (true) {
20782 bool done1;
20783 if (!iter1.next(&temp1, &done1)) {
20784 return false;
20785 }
20786 if (done1) {
20787 break;
20788 }
20789 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
20790 if (!slotPtr1) {
20791 JS_ReportOutOfMemory(cx);
20792 return false;
20793 }
20794 JS::Value& slot1 = *slotPtr1;
20795 slot1 = temp1;
20796 }
20797 } else if (temp.isNullOrUndefined()) {
20798 slot.SetNull();
20799 } else {
20800 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value in argument 1", "sequence");
20801 return false;
20802 }
20803 }
20804 } else if (args[0].isNullOrUndefined()) {
20805 arg0.Value().SetNull();
20806 } else {
20807 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20808 return false;
20809 }
20810 }
20811 // NOTE: This assert does NOT call the function.
20812 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableSequenceOfAny(cx, Constify(arg0)))>, "Should be returning void here");
20813 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableSequenceOfAny(cx, Constify(arg0));
20814 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 20814); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20814; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20815 args.rval().setUndefined();
20816 return true;
20817}
20818
20819static const JSJitInfo passOptionalNullableRecordOfNullableSequenceOfAny_methodinfo = {
20820 { (JSJitGetterOp)passOptionalNullableRecordOfNullableSequenceOfAny },
20821 { prototypes::id::TestExampleInterface },
20822 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
20823 JSJitInfo::Method,
20824 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20825 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20826 false, /* isInfallible. False in setters. */
20827 false, /* isMovable. Not relevant for setters. */
20828 false, /* isEliminatable. Not relevant for setters. */
20829 false, /* isAlwaysInSlot. Only relevant for getters. */
20830 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20831 false, /* isTypedMethod. Only relevant for methods. */
20832 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20833};
20834
20835MOZ_CAN_RUN_SCRIPT static bool
20836passOptionalNullableSequenceOfNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20837{
20838 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableSequenceOfNullableRecordOfAny");
20839 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20842( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20840 "TestExampleInterface", "passOptionalNullableSequenceOfNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20842( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20841 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20842( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20842 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20842( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
20843
20844 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
20845 Optional<Nullable<Sequence<Nullable<Record<nsString, JS::Value>>>>> arg0;
20846 Maybe<SequenceRooter<Nullable<Record<nsString, JS::Value>>>> arg0_holder;
20847 if (args.hasDefined(0)) {
20848 arg0.Construct();
20849 arg0_holder.emplace(cx, &arg0.Value().SetValue());
20850 if (args[0].isObject()) {
20851 JS::ForOfIterator iter(cx);
20852 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
20853 return false;
20854 }
20855 if (!iter.valueIsIterable()) {
20856 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
20857 return false;
20858 }
20859 Sequence<Nullable<Record<nsString, JS::Value>>> &arr = arg0.Value().SetValue();
20860 JS::Rooted<JS::Value> temp(cx);
20861 while (true) {
20862 bool done;
20863 if (!iter.next(&temp, &done)) {
20864 return false;
20865 }
20866 if (done) {
20867 break;
20868 }
20869 Nullable<Record<nsString, JS::Value>>* slotPtr = arr.AppendElement(mozilla::fallible);
20870 if (!slotPtr) {
20871 JS_ReportOutOfMemory(cx);
20872 return false;
20873 }
20874 Nullable<Record<nsString, JS::Value>>& slot = *slotPtr;
20875 if (temp.isObject()) {
20876 auto& recordEntries = slot.SetValue().Entries();
20877
20878 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
20879 JS::RootedVector<jsid> ids(cx);
20880 if (!js::GetPropertyKeys(cx, recordObj,
20881 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
20882 return false;
20883 }
20884 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
20885 JS_ReportOutOfMemory(cx);
20886 return false;
20887 }
20888 JS::Rooted<JS::Value> propNameValue(cx);
20889 JS::Rooted<JS::Value> temp(cx);
20890 JS::Rooted<jsid> curId(cx);
20891 JS::Rooted<JS::Value> idVal(cx);
20892 // Use a hashset to keep track of ids seen, to avoid
20893 // introducing nasty O(N^2) behavior scanning for them all the
20894 // time. Ideally we'd use a data structure with O(1) lookup
20895 // _and_ ordering for the MozMap, but we don't have one lying
20896 // around.
20897 nsTHashtable<nsStringHashKey> idsSeen;
20898 for (size_t i = 0; i < ids.length(); ++i) {
20899 curId = ids[i];
20900
20901 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
20902 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
20903 &desc)) {
20904 return false;
20905 }
20906
20907 if (desc.isNothing() || !desc->enumerable()) {
20908 continue;
20909 }
20910
20911 idVal = js::IdToValue(curId);
20912 nsString propName;
20913 // This will just throw if idVal is a Symbol, like the spec says
20914 // to do.
20915 if (!ConvertJSValueToString(cx, idVal, "key of element of argument 1", propName)) {
20916 return false;
20917 }
20918
20919 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
20920 return false;
20921 }
20922
20923 Record<nsString, JS::Value>::EntryType* entry;
20924 if (!idsSeen.EnsureInserted(propName)) {
20925 // Find the existing entry.
20926 auto idx = recordEntries.IndexOf(propName);
20927 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?" ")"
, "../TestExampleGenBinding.cpp", 20928); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20928; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
20928 "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?" ")"
, "../TestExampleGenBinding.cpp", 20928); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 20928; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
20929 // Now blow it away to make it look like it was just added
20930 // to the array, because it's not obvious that it's
20931 // safe to write to its already-initialized mValue via our
20932 // normal codegen conversions. For example, the value
20933 // could be a union and this would change its type, but
20934 // codegen assumes we won't do that.
20935 entry = recordEntries.ReconstructElementAt(idx);
20936 } else {
20937 // Safe to do an infallible append here, because we did a
20938 // SetCapacity above to the right capacity.
20939 entry = recordEntries.AppendElement();
20940 }
20941 entry->mKey = propName;
20942 JS::Value& slot = entry->mValue;
20943 slot = temp;
20944 }
20945 } else if (temp.isNullOrUndefined()) {
20946 slot.SetNull();
20947 } else {
20948 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
20949 return false;
20950 }
20951 }
20952 } else if (args[0].isNullOrUndefined()) {
20953 arg0.Value().SetNull();
20954 } else {
20955 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
20956 return false;
20957 }
20958 }
20959 // NOTE: This assert does NOT call the function.
20960 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableRecordOfAny(cx, Constify(arg0)))>, "Should be returning void here");
20961 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableRecordOfAny(cx, Constify(arg0));
20962 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 20962); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20962; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20963 args.rval().setUndefined();
20964 return true;
20965}
20966
20967static const JSJitInfo passOptionalNullableSequenceOfNullableRecordOfAny_methodinfo = {
20968 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableRecordOfAny },
20969 { prototypes::id::TestExampleInterface },
20970 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
20971 JSJitInfo::Method,
20972 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20973 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20974 false, /* isInfallible. False in setters. */
20975 false, /* isMovable. Not relevant for setters. */
20976 false, /* isEliminatable. Not relevant for setters. */
20977 false, /* isAlwaysInSlot. Only relevant for getters. */
20978 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20979 false, /* isTypedMethod. Only relevant for methods. */
20980 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20981};
20982
20983MOZ_CAN_RUN_SCRIPT static bool
20984receiveAny(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20985{
20986 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20989( cx, "TestExampleInterface"
, "receiveAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20987 "TestExampleInterface", "receiveAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20989( cx, "TestExampleInterface"
, "receiveAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20988 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20989( cx, "TestExampleInterface"
, "receiveAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20989 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20989( cx, "TestExampleInterface"
, "receiveAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20990
20991 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
20992 JS::Rooted<JS::Value> result(cx);
20993 // NOTE: This assert does NOT call the function.
20994 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveAny(cx, &result))>, "Should be returning void here");
20995 MOZ_KnownLive(self)(self)->ReceiveAny(cx, &result);
20996 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 20996); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20996; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20997 JS::ExposeValueToActiveJS(result);
20998 args.rval().set(result);
20999 if (!MaybeWrapValue(cx, args.rval())) {
21000 return false;
21001 }
21002 return true;
21003}
21004
21005static const JSJitInfo receiveAny_methodinfo = {
21006 { (JSJitGetterOp)receiveAny },
21007 { prototypes::id::TestExampleInterface },
21008 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21009 JSJitInfo::Method,
21010 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21011 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
21012 false, /* isInfallible. False in setters. */
21013 false, /* isMovable. Not relevant for setters. */
21014 false, /* isEliminatable. Not relevant for setters. */
21015 false, /* isAlwaysInSlot. Only relevant for getters. */
21016 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21017 false, /* isTypedMethod. Only relevant for methods. */
21018 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21019};
21020
21021MOZ_CAN_RUN_SCRIPT static bool
21022passObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21023{
21024 BindingCallContext cx(cx_, "TestExampleInterface.passObject");
21025 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21028( cx, "TestExampleInterface"
, "passObject", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21026 "TestExampleInterface", "passObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21028( cx, "TestExampleInterface"
, "passObject", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21027 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21028( cx, "TestExampleInterface"
, "passObject", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21028 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21028( cx, "TestExampleInterface"
, "passObject", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21029
21030 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21031 if (!args.requireAtLeast(cx, "TestExampleInterface.passObject", 1)) {
21032 return false;
21033 }
21034 JS::Rooted<JSObject*> arg0(cx);
21035 if (args[0].isObject()) {
21036 arg0 = &args[0].toObject();
21037 } else {
21038 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
21039 return false;
21040 }
21041 // NOTE: This assert does NOT call the function.
21042 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassObject(cx, arg0))>, "Should be returning void here");
21043 MOZ_KnownLive(self)(self)->PassObject(cx, arg0);
21044 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21044); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21044; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21045 args.rval().setUndefined();
21046 return true;
21047}
21048
21049static const JSJitInfo passObject_methodinfo = {
21050 { (JSJitGetterOp)passObject },
21051 { prototypes::id::TestExampleInterface },
21052 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21053 JSJitInfo::Method,
21054 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21055 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21056 false, /* isInfallible. False in setters. */
21057 false, /* isMovable. Not relevant for setters. */
21058 false, /* isEliminatable. Not relevant for setters. */
21059 false, /* isAlwaysInSlot. Only relevant for getters. */
21060 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21061 false, /* isTypedMethod. Only relevant for methods. */
21062 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21063};
21064
21065MOZ_CAN_RUN_SCRIPT static bool
21066passVariadicObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21067{
21068 BindingCallContext cx(cx_, "TestExampleInterface.passVariadicObject");
21069 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21072( cx, "TestExampleInterface"
, "passVariadicObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21070 "TestExampleInterface", "passVariadicObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21072( cx, "TestExampleInterface"
, "passVariadicObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21071 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21072( cx, "TestExampleInterface"
, "passVariadicObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21072 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21072( cx, "TestExampleInterface"
, "passVariadicObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21073
21074 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21075 AutoSequence<JSObject*> arg0;
21076 SequenceRooter<JSObject*> arg0_holder(cx, &arg0);
21077 if (args.length() > 0) {
21078 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
21079 JS_ReportOutOfMemory(cx);
21080 return false;
21081 }
21082 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
21083 // OK to do infallible append here, since we ensured capacity already.
21084 JSObject*& slot = *arg0.AppendElement(nullptr);
21085 if (args[variadicArg].isObject()) {
21086 slot = &args[variadicArg].toObject();
21087 } else {
21088 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
21089 return false;
21090 }
21091 }
21092 }
21093 // NOTE: This assert does NOT call the function.
21094 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicObject(cx, Constify(arg0)))>, "Should be returning void here");
21095 MOZ_KnownLive(self)(self)->PassVariadicObject(cx, Constify(arg0));
21096 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21096); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21096; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21097 args.rval().setUndefined();
21098 return true;
21099}
21100
21101static const JSJitInfo passVariadicObject_methodinfo = {
21102 { (JSJitGetterOp)passVariadicObject },
21103 { prototypes::id::TestExampleInterface },
21104 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21105 JSJitInfo::Method,
21106 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21107 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21108 false, /* isInfallible. False in setters. */
21109 false, /* isMovable. Not relevant for setters. */
21110 false, /* isEliminatable. Not relevant for setters. */
21111 false, /* isAlwaysInSlot. Only relevant for getters. */
21112 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21113 false, /* isTypedMethod. Only relevant for methods. */
21114 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21115};
21116
21117MOZ_CAN_RUN_SCRIPT static bool
21118passNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21119{
21120 BindingCallContext cx(cx_, "TestExampleInterface.passNullableObject");
21121 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21124( cx, "TestExampleInterface"
, "passNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21122 "TestExampleInterface", "passNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21124( cx, "TestExampleInterface"
, "passNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21123 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21124( cx, "TestExampleInterface"
, "passNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21124 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21124( cx, "TestExampleInterface"
, "passNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21125
21126 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21127 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableObject", 1)) {
21128 return false;
21129 }
21130 JS::Rooted<JSObject*> arg0(cx);
21131 if (args[0].isObject()) {
21132 arg0 = &args[0].toObject();
21133 } else if (args[0].isNullOrUndefined()) {
21134 arg0 = nullptr;
21135 } else {
21136 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
21137 return false;
21138 }
21139 // NOTE: This assert does NOT call the function.
21140 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableObject(cx, arg0))>, "Should be returning void here");
21141 MOZ_KnownLive(self)(self)->PassNullableObject(cx, arg0);
21142 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21142); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21142; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21143 args.rval().setUndefined();
21144 return true;
21145}
21146
21147static const JSJitInfo passNullableObject_methodinfo = {
21148 { (JSJitGetterOp)passNullableObject },
21149 { prototypes::id::TestExampleInterface },
21150 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21151 JSJitInfo::Method,
21152 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21153 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21154 false, /* isInfallible. False in setters. */
21155 false, /* isMovable. Not relevant for setters. */
21156 false, /* isEliminatable. Not relevant for setters. */
21157 false, /* isAlwaysInSlot. Only relevant for getters. */
21158 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21159 false, /* isTypedMethod. Only relevant for methods. */
21160 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21161};
21162
21163MOZ_CAN_RUN_SCRIPT static bool
21164passVariadicNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21165{
21166 BindingCallContext cx(cx_, "TestExampleInterface.passVariadicNullableObject");
21167 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21170( cx, "TestExampleInterface"
, "passVariadicNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21168 "TestExampleInterface", "passVariadicNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21170( cx, "TestExampleInterface"
, "passVariadicNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21169 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21170( cx, "TestExampleInterface"
, "passVariadicNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21170 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21170( cx, "TestExampleInterface"
, "passVariadicNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21171
21172 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21173 AutoSequence<JSObject*> arg0;
21174 SequenceRooter<JSObject*> arg0_holder(cx, &arg0);
21175 if (args.length() > 0) {
21176 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
21177 JS_ReportOutOfMemory(cx);
21178 return false;
21179 }
21180 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
21181 // OK to do infallible append here, since we ensured capacity already.
21182 JSObject*& slot = *arg0.AppendElement(nullptr);
21183 if (args[variadicArg].isObject()) {
21184 slot = &args[variadicArg].toObject();
21185 } else {
21186 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
21187 return false;
21188 }
21189 }
21190 }
21191 // NOTE: This assert does NOT call the function.
21192 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicNullableObject(cx, Constify(arg0)))>, "Should be returning void here");
21193 MOZ_KnownLive(self)(self)->PassVariadicNullableObject(cx, Constify(arg0));
21194 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21194); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21194; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21195 args.rval().setUndefined();
21196 return true;
21197}
21198
21199static const JSJitInfo passVariadicNullableObject_methodinfo = {
21200 { (JSJitGetterOp)passVariadicNullableObject },
21201 { prototypes::id::TestExampleInterface },
21202 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21203 JSJitInfo::Method,
21204 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21205 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21206 false, /* isInfallible. False in setters. */
21207 false, /* isMovable. Not relevant for setters. */
21208 false, /* isEliminatable. Not relevant for setters. */
21209 false, /* isAlwaysInSlot. Only relevant for getters. */
21210 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21211 false, /* isTypedMethod. Only relevant for methods. */
21212 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21213};
21214
21215MOZ_CAN_RUN_SCRIPT static bool
21216passOptionalObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21217{
21218 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalObject");
21219 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21222( cx, "TestExampleInterface"
, "passOptionalObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21220 "TestExampleInterface", "passOptionalObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21222( cx, "TestExampleInterface"
, "passOptionalObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21221 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21222( cx, "TestExampleInterface"
, "passOptionalObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21222 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21222( cx, "TestExampleInterface"
, "passOptionalObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21223
21224 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21225 Optional<JS::Handle<JSObject*>> arg0;
21226 if (args.hasDefined(0)) {
21227 arg0.Construct(cx);
21228 if (args[0].isObject()) {
21229 arg0.Value() = &args[0].toObject();
21230 } else {
21231 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
21232 return false;
21233 }
21234 }
21235 // NOTE: This assert does NOT call the function.
21236 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalObject(cx, Constify(arg0)))>, "Should be returning void here");
21237 MOZ_KnownLive(self)(self)->PassOptionalObject(cx, Constify(arg0));
21238 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21238); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21238; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21239 args.rval().setUndefined();
21240 return true;
21241}
21242
21243static const JSJitInfo passOptionalObject_methodinfo = {
21244 { (JSJitGetterOp)passOptionalObject },
21245 { prototypes::id::TestExampleInterface },
21246 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21247 JSJitInfo::Method,
21248 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21249 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21250 false, /* isInfallible. False in setters. */
21251 false, /* isMovable. Not relevant for setters. */
21252 false, /* isEliminatable. Not relevant for setters. */
21253 false, /* isAlwaysInSlot. Only relevant for getters. */
21254 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21255 false, /* isTypedMethod. Only relevant for methods. */
21256 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21257};
21258
21259MOZ_CAN_RUN_SCRIPT static bool
21260passOptionalNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21261{
21262 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableObject");
21263 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21266( cx, "TestExampleInterface"
, "passOptionalNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21264 "TestExampleInterface", "passOptionalNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21266( cx, "TestExampleInterface"
, "passOptionalNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21265 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21266( cx, "TestExampleInterface"
, "passOptionalNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21266 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21266( cx, "TestExampleInterface"
, "passOptionalNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21267
21268 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21269 Optional<JS::Handle<JSObject*>> arg0;
1
Calling default constructor for 'Optional<JS::Handle<JSObject *>>'
19
Returning from default constructor for 'Optional<JS::Handle<JSObject *>>'
21270 if (args.hasDefined(0)) {
20
Taking false branch
21271 arg0.Construct(cx);
21272 if (args[0].isObject()) {
21273 arg0.Value() = &args[0].toObject();
21274 } else if (args[0].isNullOrUndefined()) {
21275 arg0.Value() = nullptr;
21276 } else {
21277 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
21278 return false;
21279 }
21280 }
21281 // NOTE: This assert does NOT call the function.
21282 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableObject(cx, Constify(arg0)))>, "Should be returning void here");
21283 MOZ_KnownLive(self)(self)->PassOptionalNullableObject(cx, Constify(arg0));
21
Calling 'Constify<mozilla::dom::Optional<JS::Handle<JSObject *>>>'
23
Returning from 'Constify<mozilla::dom::Optional<JS::Handle<JSObject *>>>'
21284 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21284); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21284; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24
Assuming the condition is true
25
Taking false branch
26
Loop condition is false. Exiting loop
21285 args.rval().setUndefined();
21286 return true;
27
Calling implicit destructor for 'Optional<JS::Handle<JSObject *>>'
28
Calling implicit destructor for 'Optional_base<JS::Handle<JSObject *>, JS::Rooted<JSObject *>>'
29
Calling implicit destructor for 'Maybe<JS::Rooted<JSObject *>>'
30
Calling '~MaybeStorage'
21287}
21288
21289static const JSJitInfo passOptionalNullableObject_methodinfo = {
21290 { (JSJitGetterOp)passOptionalNullableObject },
21291 { prototypes::id::TestExampleInterface },
21292 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21293 JSJitInfo::Method,
21294 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21295 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21296 false, /* isInfallible. False in setters. */
21297 false, /* isMovable. Not relevant for setters. */
21298 false, /* isEliminatable. Not relevant for setters. */
21299 false, /* isAlwaysInSlot. Only relevant for getters. */
21300 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21301 false, /* isTypedMethod. Only relevant for methods. */
21302 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21303};
21304
21305MOZ_CAN_RUN_SCRIPT static bool
21306passOptionalNullableObjectWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21307{
21308 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableObjectWithDefaultValue");
21309 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21312( cx, "TestExampleInterface"
, "passOptionalNullableObjectWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21310 "TestExampleInterface", "passOptionalNullableObjectWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21312( cx, "TestExampleInterface"
, "passOptionalNullableObjectWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21311 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21312( cx, "TestExampleInterface"
, "passOptionalNullableObjectWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21312 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21312( cx, "TestExampleInterface"
, "passOptionalNullableObjectWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21313
21314 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21315 JS::Rooted<JSObject*> arg0(cx);
21316 if (args.hasDefined(0)) {
21317 if (args[0].isObject()) {
21318 arg0 = &args[0].toObject();
21319 } else if (args[0].isNullOrUndefined()) {
21320 arg0 = nullptr;
21321 } else {
21322 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
21323 return false;
21324 }
21325 } else {
21326 arg0 = nullptr;
21327 }
21328 // NOTE: This assert does NOT call the function.
21329 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableObjectWithDefaultValue(cx, arg0))>, "Should be returning void here");
21330 MOZ_KnownLive(self)(self)->PassOptionalNullableObjectWithDefaultValue(cx, arg0);
21331 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21331); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21331; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21332 args.rval().setUndefined();
21333 return true;
21334}
21335
21336static const JSJitInfo passOptionalNullableObjectWithDefaultValue_methodinfo = {
21337 { (JSJitGetterOp)passOptionalNullableObjectWithDefaultValue },
21338 { prototypes::id::TestExampleInterface },
21339 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21340 JSJitInfo::Method,
21341 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21342 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21343 false, /* isInfallible. False in setters. */
21344 false, /* isMovable. Not relevant for setters. */
21345 false, /* isEliminatable. Not relevant for setters. */
21346 false, /* isAlwaysInSlot. Only relevant for getters. */
21347 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21348 false, /* isTypedMethod. Only relevant for methods. */
21349 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21350};
21351
21352MOZ_CAN_RUN_SCRIPT static bool
21353passSequenceOfObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21354{
21355 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfObject");
21356 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21359( cx, "TestExampleInterface"
, "passSequenceOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21357 "TestExampleInterface", "passSequenceOfObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21359( cx, "TestExampleInterface"
, "passSequenceOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21358 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21359( cx, "TestExampleInterface"
, "passSequenceOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21359 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21359( cx, "TestExampleInterface"
, "passSequenceOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21360
21361 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21362 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfObject", 1)) {
21363 return false;
21364 }
21365 binding_detail::AutoSequence<JSObject*> arg0;
21366 SequenceRooter<JSObject*> arg0_holder(cx, &arg0);
21367 if (args[0].isObject()) {
21368 JS::ForOfIterator iter(cx);
21369 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21370 return false;
21371 }
21372 if (!iter.valueIsIterable()) {
21373 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21374 return false;
21375 }
21376 binding_detail::AutoSequence<JSObject*> &arr = arg0;
21377 JS::Rooted<JS::Value> temp(cx);
21378 while (true) {
21379 bool done;
21380 if (!iter.next(&temp, &done)) {
21381 return false;
21382 }
21383 if (done) {
21384 break;
21385 }
21386 JSObject** slotPtr = arr.AppendElement(nullptr, mozilla::fallible);
21387 if (!slotPtr) {
21388 JS_ReportOutOfMemory(cx);
21389 return false;
21390 }
21391 JSObject*& slot = *slotPtr;
21392 if (temp.isObject()) {
21393 slot = &temp.toObject();
21394 } else {
21395 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
21396 return false;
21397 }
21398 }
21399 } else {
21400 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21401 return false;
21402 }
21403 // NOTE: This assert does NOT call the function.
21404 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfObject(cx, Constify(arg0)))>, "Should be returning void here");
21405 MOZ_KnownLive(self)(self)->PassSequenceOfObject(cx, Constify(arg0));
21406 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21406); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21406; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21407 args.rval().setUndefined();
21408 return true;
21409}
21410
21411static const JSJitInfo passSequenceOfObject_methodinfo = {
21412 { (JSJitGetterOp)passSequenceOfObject },
21413 { prototypes::id::TestExampleInterface },
21414 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21415 JSJitInfo::Method,
21416 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21417 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21418 false, /* isInfallible. False in setters. */
21419 false, /* isMovable. Not relevant for setters. */
21420 false, /* isEliminatable. Not relevant for setters. */
21421 false, /* isAlwaysInSlot. Only relevant for getters. */
21422 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21423 false, /* isTypedMethod. Only relevant for methods. */
21424 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21425};
21426
21427MOZ_CAN_RUN_SCRIPT static bool
21428passSequenceOfNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21429{
21430 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfNullableObject");
21431 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21434( cx, "TestExampleInterface"
, "passSequenceOfNullableObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21432 "TestExampleInterface", "passSequenceOfNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21434( cx, "TestExampleInterface"
, "passSequenceOfNullableObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21433 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21434( cx, "TestExampleInterface"
, "passSequenceOfNullableObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21434 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21434( cx, "TestExampleInterface"
, "passSequenceOfNullableObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21435
21436 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21437 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfNullableObject", 1)) {
21438 return false;
21439 }
21440 binding_detail::AutoSequence<JSObject*> arg0;
21441 SequenceRooter<JSObject*> arg0_holder(cx, &arg0);
21442 if (args[0].isObject()) {
21443 JS::ForOfIterator iter(cx);
21444 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21445 return false;
21446 }
21447 if (!iter.valueIsIterable()) {
21448 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21449 return false;
21450 }
21451 binding_detail::AutoSequence<JSObject*> &arr = arg0;
21452 JS::Rooted<JS::Value> temp(cx);
21453 while (true) {
21454 bool done;
21455 if (!iter.next(&temp, &done)) {
21456 return false;
21457 }
21458 if (done) {
21459 break;
21460 }
21461 JSObject** slotPtr = arr.AppendElement(nullptr, mozilla::fallible);
21462 if (!slotPtr) {
21463 JS_ReportOutOfMemory(cx);
21464 return false;
21465 }
21466 JSObject*& slot = *slotPtr;
21467 if (temp.isObject()) {
21468 slot = &temp.toObject();
21469 } else if (temp.isNullOrUndefined()) {
21470 slot = nullptr;
21471 } else {
21472 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
21473 return false;
21474 }
21475 }
21476 } else {
21477 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21478 return false;
21479 }
21480 // NOTE: This assert does NOT call the function.
21481 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableObject(cx, Constify(arg0)))>, "Should be returning void here");
21482 MOZ_KnownLive(self)(self)->PassSequenceOfNullableObject(cx, Constify(arg0));
21483 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21483); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21483; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21484 args.rval().setUndefined();
21485 return true;
21486}
21487
21488static const JSJitInfo passSequenceOfNullableObject_methodinfo = {
21489 { (JSJitGetterOp)passSequenceOfNullableObject },
21490 { prototypes::id::TestExampleInterface },
21491 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21492 JSJitInfo::Method,
21493 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21494 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21495 false, /* isInfallible. False in setters. */
21496 false, /* isMovable. Not relevant for setters. */
21497 false, /* isEliminatable. Not relevant for setters. */
21498 false, /* isAlwaysInSlot. Only relevant for getters. */
21499 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21500 false, /* isTypedMethod. Only relevant for methods. */
21501 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21502};
21503
21504MOZ_CAN_RUN_SCRIPT static bool
21505passNullableSequenceOfObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21506{
21507 BindingCallContext cx(cx_, "TestExampleInterface.passNullableSequenceOfObject");
21508 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21511( cx, "TestExampleInterface"
, "passNullableSequenceOfObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21509 "TestExampleInterface", "passNullableSequenceOfObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21511( cx, "TestExampleInterface"
, "passNullableSequenceOfObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21510 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21511( cx, "TestExampleInterface"
, "passNullableSequenceOfObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21511 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21511( cx, "TestExampleInterface"
, "passNullableSequenceOfObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21512
21513 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21514 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableSequenceOfObject", 1)) {
21515 return false;
21516 }
21517 Nullable<Sequence<JSObject*>> arg0;
21518 SequenceRooter<JSObject*> arg0_holder(cx, &arg0.SetValue());
21519 if (args[0].isObject()) {
21520 JS::ForOfIterator iter(cx);
21521 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21522 return false;
21523 }
21524 if (!iter.valueIsIterable()) {
21525 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21526 return false;
21527 }
21528 Sequence<JSObject*> &arr = arg0.SetValue();
21529 JS::Rooted<JS::Value> temp(cx);
21530 while (true) {
21531 bool done;
21532 if (!iter.next(&temp, &done)) {
21533 return false;
21534 }
21535 if (done) {
21536 break;
21537 }
21538 JSObject** slotPtr = arr.AppendElement(nullptr, mozilla::fallible);
21539 if (!slotPtr) {
21540 JS_ReportOutOfMemory(cx);
21541 return false;
21542 }
21543 JSObject*& slot = *slotPtr;
21544 if (temp.isObject()) {
21545 slot = &temp.toObject();
21546 } else {
21547 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
21548 return false;
21549 }
21550 }
21551 } else if (args[0].isNullOrUndefined()) {
21552 arg0.SetNull();
21553 } else {
21554 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21555 return false;
21556 }
21557 // NOTE: This assert does NOT call the function.
21558 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSequenceOfObject(cx, Constify(arg0)))>, "Should be returning void here");
21559 MOZ_KnownLive(self)(self)->PassNullableSequenceOfObject(cx, Constify(arg0));
21560 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21560); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21560; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21561 args.rval().setUndefined();
21562 return true;
21563}
21564
21565static const JSJitInfo passNullableSequenceOfObject_methodinfo = {
21566 { (JSJitGetterOp)passNullableSequenceOfObject },
21567 { prototypes::id::TestExampleInterface },
21568 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21569 JSJitInfo::Method,
21570 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21571 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21572 false, /* isInfallible. False in setters. */
21573 false, /* isMovable. Not relevant for setters. */
21574 false, /* isEliminatable. Not relevant for setters. */
21575 false, /* isAlwaysInSlot. Only relevant for getters. */
21576 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21577 false, /* isTypedMethod. Only relevant for methods. */
21578 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21579};
21580
21581MOZ_CAN_RUN_SCRIPT static bool
21582passOptionalNullableSequenceOfNullableSequenceOfObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21583{
21584 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableSequenceOfNullableSequenceOfObject");
21585 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21588( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfObject", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
21586 "TestExampleInterface", "passOptionalNullableSequenceOfNullableSequenceOfObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21588( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfObject", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
21587 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21588( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfObject", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
21588 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21588( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfObject", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
21589
21590 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21591 Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>> arg0;
21592 Maybe<SequenceRooter<Nullable<Sequence<JSObject*>>>> arg0_holder;
21593 if (args.hasDefined(0)) {
21594 arg0.Construct();
21595 arg0_holder.emplace(cx, &arg0.Value().SetValue());
21596 if (args[0].isObject()) {
21597 JS::ForOfIterator iter(cx);
21598 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21599 return false;
21600 }
21601 if (!iter.valueIsIterable()) {
21602 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21603 return false;
21604 }
21605 Sequence<Nullable<Sequence<JSObject*>>> &arr = arg0.Value().SetValue();
21606 JS::Rooted<JS::Value> temp(cx);
21607 while (true) {
21608 bool done;
21609 if (!iter.next(&temp, &done)) {
21610 return false;
21611 }
21612 if (done) {
21613 break;
21614 }
21615 Nullable<Sequence<JSObject*>>* slotPtr = arr.AppendElement(mozilla::fallible);
21616 if (!slotPtr) {
21617 JS_ReportOutOfMemory(cx);
21618 return false;
21619 }
21620 Nullable<Sequence<JSObject*>>& slot = *slotPtr;
21621 if (temp.isObject()) {
21622 JS::ForOfIterator iter1(cx);
21623 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
21624 return false;
21625 }
21626 if (!iter1.valueIsIterable()) {
21627 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
21628 return false;
21629 }
21630 Sequence<JSObject*> &arr1 = slot.SetValue();
21631 JS::Rooted<JS::Value> temp1(cx);
21632 while (true) {
21633 bool done1;
21634 if (!iter1.next(&temp1, &done1)) {
21635 return false;
21636 }
21637 if (done1) {
21638 break;
21639 }
21640 JSObject** slotPtr1 = arr1.AppendElement(nullptr, mozilla::fallible);
21641 if (!slotPtr1) {
21642 JS_ReportOutOfMemory(cx);
21643 return false;
21644 }
21645 JSObject*& slot1 = *slotPtr1;
21646 if (temp1.isObject()) {
21647 slot1 = &temp1.toObject();
21648 } else {
21649 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of element of argument 1");
21650 return false;
21651 }
21652 }
21653 } else if (temp.isNullOrUndefined()) {
21654 slot.SetNull();
21655 } else {
21656 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
21657 return false;
21658 }
21659 }
21660 } else if (args[0].isNullOrUndefined()) {
21661 arg0.Value().SetNull();
21662 } else {
21663 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21664 return false;
21665 }
21666 }
21667 // NOTE: This assert does NOT call the function.
21668 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfObject(cx, Constify(arg0)))>, "Should be returning void here");
21669 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfObject(cx, Constify(arg0));
21670 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21670); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21670; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21671 args.rval().setUndefined();
21672 return true;
21673}
21674
21675static const JSJitInfo passOptionalNullableSequenceOfNullableSequenceOfObject_methodinfo = {
21676 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableSequenceOfObject },
21677 { prototypes::id::TestExampleInterface },
21678 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21679 JSJitInfo::Method,
21680 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21681 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21682 false, /* isInfallible. False in setters. */
21683 false, /* isMovable. Not relevant for setters. */
21684 false, /* isEliminatable. Not relevant for setters. */
21685 false, /* isAlwaysInSlot. Only relevant for getters. */
21686 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21687 false, /* isTypedMethod. Only relevant for methods. */
21688 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21689};
21690
21691MOZ_CAN_RUN_SCRIPT static bool
21692passOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21693{
21694 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableSequenceOfNullableSequenceOfNullableObject");
21695 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21698( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
21696 "TestExampleInterface", "passOptionalNullableSequenceOfNullableSequenceOfNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21698( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
21697 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21698( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
21698 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21698( cx, "TestExampleInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
21699
21700 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21701 Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>> arg0;
21702 Maybe<SequenceRooter<Nullable<Sequence<JSObject*>>>> arg0_holder;
21703 if (args.hasDefined(0)) {
21704 arg0.Construct();
21705 arg0_holder.emplace(cx, &arg0.Value().SetValue());
21706 if (args[0].isObject()) {
21707 JS::ForOfIterator iter(cx);
21708 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21709 return false;
21710 }
21711 if (!iter.valueIsIterable()) {
21712 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21713 return false;
21714 }
21715 Sequence<Nullable<Sequence<JSObject*>>> &arr = arg0.Value().SetValue();
21716 JS::Rooted<JS::Value> temp(cx);
21717 while (true) {
21718 bool done;
21719 if (!iter.next(&temp, &done)) {
21720 return false;
21721 }
21722 if (done) {
21723 break;
21724 }
21725 Nullable<Sequence<JSObject*>>* slotPtr = arr.AppendElement(mozilla::fallible);
21726 if (!slotPtr) {
21727 JS_ReportOutOfMemory(cx);
21728 return false;
21729 }
21730 Nullable<Sequence<JSObject*>>& slot = *slotPtr;
21731 if (temp.isObject()) {
21732 JS::ForOfIterator iter1(cx);
21733 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
21734 return false;
21735 }
21736 if (!iter1.valueIsIterable()) {
21737 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
21738 return false;
21739 }
21740 Sequence<JSObject*> &arr1 = slot.SetValue();
21741 JS::Rooted<JS::Value> temp1(cx);
21742 while (true) {
21743 bool done1;
21744 if (!iter1.next(&temp1, &done1)) {
21745 return false;
21746 }
21747 if (done1) {
21748 break;
21749 }
21750 JSObject** slotPtr1 = arr1.AppendElement(nullptr, mozilla::fallible);
21751 if (!slotPtr1) {
21752 JS_ReportOutOfMemory(cx);
21753 return false;
21754 }
21755 JSObject*& slot1 = *slotPtr1;
21756 if (temp1.isObject()) {
21757 slot1 = &temp1.toObject();
21758 } else if (temp1.isNullOrUndefined()) {
21759 slot1 = nullptr;
21760 } else {
21761 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of element of argument 1");
21762 return false;
21763 }
21764 }
21765 } else if (temp.isNullOrUndefined()) {
21766 slot.SetNull();
21767 } else {
21768 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
21769 return false;
21770 }
21771 }
21772 } else if (args[0].isNullOrUndefined()) {
21773 arg0.Value().SetNull();
21774 } else {
21775 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21776 return false;
21777 }
21778 }
21779 // NOTE: This assert does NOT call the function.
21780 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(cx, Constify(arg0)))>, "Should be returning void here");
21781 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(cx, Constify(arg0));
21782 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21782); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21782; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21783 args.rval().setUndefined();
21784 return true;
21785}
21786
21787static const JSJitInfo passOptionalNullableSequenceOfNullableSequenceOfNullableObject_methodinfo = {
21788 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableSequenceOfNullableObject },
21789 { prototypes::id::TestExampleInterface },
21790 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21791 JSJitInfo::Method,
21792 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21793 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21794 false, /* isInfallible. False in setters. */
21795 false, /* isMovable. Not relevant for setters. */
21796 false, /* isEliminatable. Not relevant for setters. */
21797 false, /* isAlwaysInSlot. Only relevant for getters. */
21798 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21799 false, /* isTypedMethod. Only relevant for methods. */
21800 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21801};
21802
21803MOZ_CAN_RUN_SCRIPT static bool
21804passRecordOfObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21805{
21806 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfObject");
21807 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21810( cx, "TestExampleInterface"
, "passRecordOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21808 "TestExampleInterface", "passRecordOfObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21810( cx, "TestExampleInterface"
, "passRecordOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21809 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21810( cx, "TestExampleInterface"
, "passRecordOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21810 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21810( cx, "TestExampleInterface"
, "passRecordOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21811
21812 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21813 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfObject", 1)) {
21814 return false;
21815 }
21816 Record<nsString, JSObject*> arg0;
21817 RecordRooter<nsString, JSObject*> arg0_holder(cx, &arg0);
21818 if (args[0].isObject()) {
21819 auto& recordEntries = arg0.Entries();
21820
21821 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
21822 JS::RootedVector<jsid> ids(cx);
21823 if (!js::GetPropertyKeys(cx, recordObj,
21824 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
21825 return false;
21826 }
21827 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
21828 JS_ReportOutOfMemory(cx);
21829 return false;
21830 }
21831 JS::Rooted<JS::Value> propNameValue(cx);
21832 JS::Rooted<JS::Value> temp(cx);
21833 JS::Rooted<jsid> curId(cx);
21834 JS::Rooted<JS::Value> idVal(cx);
21835 // Use a hashset to keep track of ids seen, to avoid
21836 // introducing nasty O(N^2) behavior scanning for them all the
21837 // time. Ideally we'd use a data structure with O(1) lookup
21838 // _and_ ordering for the MozMap, but we don't have one lying
21839 // around.
21840 nsTHashtable<nsStringHashKey> idsSeen;
21841 for (size_t i = 0; i < ids.length(); ++i) {
21842 curId = ids[i];
21843
21844 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
21845 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
21846 &desc)) {
21847 return false;
21848 }
21849
21850 if (desc.isNothing() || !desc->enumerable()) {
21851 continue;
21852 }
21853
21854 idVal = js::IdToValue(curId);
21855 nsString propName;
21856 // This will just throw if idVal is a Symbol, like the spec says
21857 // to do.
21858 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
21859 return false;
21860 }
21861
21862 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
21863 return false;
21864 }
21865
21866 Record<nsString, JSObject*>::EntryType* entry;
21867 if (!idsSeen.EnsureInserted(propName)) {
21868 // Find the existing entry.
21869 auto idx = recordEntries.IndexOf(propName);
21870 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?" ")"
, "../TestExampleGenBinding.cpp", 21871); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 21871; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
21871 "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?" ")"
, "../TestExampleGenBinding.cpp", 21871); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 21871; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
21872 // Now blow it away to make it look like it was just added
21873 // to the array, because it's not obvious that it's
21874 // safe to write to its already-initialized mValue via our
21875 // normal codegen conversions. For example, the value
21876 // could be a union and this would change its type, but
21877 // codegen assumes we won't do that.
21878 entry = recordEntries.ReconstructElementAt(idx);
21879 } else {
21880 // Safe to do an infallible append here, because we did a
21881 // SetCapacity above to the right capacity.
21882 entry = recordEntries.AppendElement();
21883 }
21884 entry->mKey = propName;
21885 JSObject*& slot = entry->mValue;
21886 if (temp.isObject()) {
21887 slot = &temp.toObject();
21888 } else {
21889 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
21890 return false;
21891 }
21892 }
21893 } else {
21894 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
21895 return false;
21896 }
21897 // NOTE: This assert does NOT call the function.
21898 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfObject(cx, Constify(arg0)))>, "Should be returning void here");
21899 MOZ_KnownLive(self)(self)->PassRecordOfObject(cx, Constify(arg0));
21900 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21900); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21900; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21901 args.rval().setUndefined();
21902 return true;
21903}
21904
21905static const JSJitInfo passRecordOfObject_methodinfo = {
21906 { (JSJitGetterOp)passRecordOfObject },
21907 { prototypes::id::TestExampleInterface },
21908 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21909 JSJitInfo::Method,
21910 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21911 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21912 false, /* isInfallible. False in setters. */
21913 false, /* isMovable. Not relevant for setters. */
21914 false, /* isEliminatable. Not relevant for setters. */
21915 false, /* isAlwaysInSlot. Only relevant for getters. */
21916 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21917 false, /* isTypedMethod. Only relevant for methods. */
21918 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21919};
21920
21921MOZ_CAN_RUN_SCRIPT static bool
21922receiveObject(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21923{
21924 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21927( cx, "TestExampleInterface"
, "receiveObject", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21925 "TestExampleInterface", "receiveObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21927( cx, "TestExampleInterface"
, "receiveObject", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21926 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21927( cx, "TestExampleInterface"
, "receiveObject", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21927 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21927( cx, "TestExampleInterface"
, "receiveObject", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21928
21929 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21930 JS::Rooted<JSObject*> result(cx);
21931 // NOTE: This assert does NOT call the function.
21932 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveObject(cx, &result))>, "Should be returning void here");
21933 MOZ_KnownLive(self)(self)->ReceiveObject(cx, &result);
21934 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21934); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21934; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21935 JS::ExposeObjectToActiveJS(result);
21936 args.rval().setObject(*result);
21937 if (!MaybeWrapObjectValue(cx, args.rval())) {
21938 return false;
21939 }
21940 return true;
21941}
21942
21943static const JSJitInfo receiveObject_methodinfo = {
21944 { (JSJitGetterOp)receiveObject },
21945 { prototypes::id::TestExampleInterface },
21946 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21947 JSJitInfo::Method,
21948 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21949 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
21950 false, /* isInfallible. False in setters. */
21951 false, /* isMovable. Not relevant for setters. */
21952 false, /* isEliminatable. Not relevant for setters. */
21953 false, /* isAlwaysInSlot. Only relevant for getters. */
21954 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21955 false, /* isTypedMethod. Only relevant for methods. */
21956 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21957};
21958
21959MOZ_CAN_RUN_SCRIPT static bool
21960receiveNullableObject(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21961{
21962 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21965( cx, "TestExampleInterface"
, "receiveNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21963 "TestExampleInterface", "receiveNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21965( cx, "TestExampleInterface"
, "receiveNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21964 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21965( cx, "TestExampleInterface"
, "receiveNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21965 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21965( cx, "TestExampleInterface"
, "receiveNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21966
21967 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
21968 JS::Rooted<JSObject*> result(cx);
21969 // NOTE: This assert does NOT call the function.
21970 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableObject(cx, &result))>, "Should be returning void here");
21971 MOZ_KnownLive(self)(self)->ReceiveNullableObject(cx, &result);
21972 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 21972); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21972; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21973 if (result) {
21974 JS::ExposeObjectToActiveJS(result);
21975 }
21976 args.rval().setObjectOrNull(result);
21977 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
21978 return false;
21979 }
21980 return true;
21981}
21982
21983static const JSJitInfo receiveNullableObject_methodinfo = {
21984 { (JSJitGetterOp)receiveNullableObject },
21985 { prototypes::id::TestExampleInterface },
21986 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
21987 JSJitInfo::Method,
21988 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21989 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
21990 false, /* isInfallible. False in setters. */
21991 false, /* isMovable. Not relevant for setters. */
21992 false, /* isEliminatable. Not relevant for setters. */
21993 false, /* isAlwaysInSlot. Only relevant for getters. */
21994 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21995 false, /* isTypedMethod. Only relevant for methods. */
21996 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21997};
21998
21999MOZ_CAN_RUN_SCRIPT static bool
22000passUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22001{
22002 BindingCallContext cx(cx_, "TestExampleInterface.passUnion");
22003 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22006( cx, "TestExampleInterface"
, "passUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
22004 "TestExampleInterface", "passUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22006( cx, "TestExampleInterface"
, "passUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
22005 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22006( cx, "TestExampleInterface"
, "passUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
22006 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22006( cx, "TestExampleInterface"
, "passUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
22007
22008 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22009 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion", 1)) {
22010 return false;
22011 }
22012 ObjectOrLong arg0;
22013 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22014 return false;
22015 }
22016 // NOTE: This assert does NOT call the function.
22017 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion(cx, Constify(arg0)))>, "Should be returning void here");
22018 MOZ_KnownLive(self)(self)->PassUnion(cx, Constify(arg0));
22019 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22019); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22019; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22020 args.rval().setUndefined();
22021 return true;
22022}
22023
22024static const JSJitInfo passUnion_methodinfo = {
22025 { (JSJitGetterOp)passUnion },
22026 { prototypes::id::TestExampleInterface },
22027 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22028 JSJitInfo::Method,
22029 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22030 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22031 false, /* isInfallible. False in setters. */
22032 false, /* isMovable. Not relevant for setters. */
22033 false, /* isEliminatable. Not relevant for setters. */
22034 false, /* isAlwaysInSlot. Only relevant for getters. */
22035 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22036 false, /* isTypedMethod. Only relevant for methods. */
22037 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22038};
22039
22040MOZ_CAN_RUN_SCRIPT static bool
22041passUnion2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22042{
22043 BindingCallContext cx(cx_, "TestExampleInterface.passUnion2");
22044 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22047( cx, "TestExampleInterface"
, "passUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22045 "TestExampleInterface", "passUnion2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22047( cx, "TestExampleInterface"
, "passUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22046 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22047( cx, "TestExampleInterface"
, "passUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22047 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22047( cx, "TestExampleInterface"
, "passUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22048
22049 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22050 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion2", 1)) {
22051 return false;
22052 }
22053 LongOrBoolean arg0;
22054 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22055 return false;
22056 }
22057 // NOTE: This assert does NOT call the function.
22058 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion2(Constify(arg0)))>, "Should be returning void here");
22059 MOZ_KnownLive(self)(self)->PassUnion2(Constify(arg0));
22060 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22060); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22060; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22061 args.rval().setUndefined();
22062 return true;
22063}
22064
22065static const JSJitInfo passUnion2_methodinfo = {
22066 { (JSJitGetterOp)passUnion2 },
22067 { prototypes::id::TestExampleInterface },
22068 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22069 JSJitInfo::Method,
22070 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22071 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22072 false, /* isInfallible. False in setters. */
22073 false, /* isMovable. Not relevant for setters. */
22074 false, /* isEliminatable. Not relevant for setters. */
22075 false, /* isAlwaysInSlot. Only relevant for getters. */
22076 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22077 false, /* isTypedMethod. Only relevant for methods. */
22078 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22079};
22080
22081MOZ_CAN_RUN_SCRIPT static bool
22082passUnion3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22083{
22084 BindingCallContext cx(cx_, "TestExampleInterface.passUnion3");
22085 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22088( cx, "TestExampleInterface"
, "passUnion3", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22086 "TestExampleInterface", "passUnion3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22088( cx, "TestExampleInterface"
, "passUnion3", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22087 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22088( cx, "TestExampleInterface"
, "passUnion3", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22088 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22088( cx, "TestExampleInterface"
, "passUnion3", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22089
22090 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22091 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion3", 1)) {
22092 return false;
22093 }
22094 ObjectOrLongOrBoolean arg0;
22095 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22096 return false;
22097 }
22098 // NOTE: This assert does NOT call the function.
22099 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion3(cx, Constify(arg0)))>, "Should be returning void here");
22100 MOZ_KnownLive(self)(self)->PassUnion3(cx, Constify(arg0));
22101 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22101); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22101; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22102 args.rval().setUndefined();
22103 return true;
22104}
22105
22106static const JSJitInfo passUnion3_methodinfo = {
22107 { (JSJitGetterOp)passUnion3 },
22108 { prototypes::id::TestExampleInterface },
22109 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22110 JSJitInfo::Method,
22111 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22112 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22113 false, /* isInfallible. False in setters. */
22114 false, /* isMovable. Not relevant for setters. */
22115 false, /* isEliminatable. Not relevant for setters. */
22116 false, /* isAlwaysInSlot. Only relevant for getters. */
22117 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22118 false, /* isTypedMethod. Only relevant for methods. */
22119 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22120};
22121
22122MOZ_CAN_RUN_SCRIPT static bool
22123passUnion4(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22124{
22125 BindingCallContext cx(cx_, "TestExampleInterface.passUnion4");
22126 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22129( cx, "TestExampleInterface"
, "passUnion4", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22127 "TestExampleInterface", "passUnion4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22129( cx, "TestExampleInterface"
, "passUnion4", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22128 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22129( cx, "TestExampleInterface"
, "passUnion4", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22129 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22129( cx, "TestExampleInterface"
, "passUnion4", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22130
22131 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22132 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion4", 1)) {
22133 return false;
22134 }
22135 NodeOrLongOrBoolean arg0;
22136 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22137 return false;
22138 }
22139 // NOTE: This assert does NOT call the function.
22140 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion4(Constify(arg0)))>, "Should be returning void here");
22141 MOZ_KnownLive(self)(self)->PassUnion4(Constify(arg0));
22142 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22142); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22142; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22143 args.rval().setUndefined();
22144 return true;
22145}
22146
22147static const JSJitInfo passUnion4_methodinfo = {
22148 { (JSJitGetterOp)passUnion4 },
22149 { prototypes::id::TestExampleInterface },
22150 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22151 JSJitInfo::Method,
22152 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22153 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22154 false, /* isInfallible. False in setters. */
22155 false, /* isMovable. Not relevant for setters. */
22156 false, /* isEliminatable. Not relevant for setters. */
22157 false, /* isAlwaysInSlot. Only relevant for getters. */
22158 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22159 false, /* isTypedMethod. Only relevant for methods. */
22160 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22161};
22162
22163MOZ_CAN_RUN_SCRIPT static bool
22164passUnion5(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22165{
22166 BindingCallContext cx(cx_, "TestExampleInterface.passUnion5");
22167 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22170( cx, "TestExampleInterface"
, "passUnion5", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22168 "TestExampleInterface", "passUnion5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22170( cx, "TestExampleInterface"
, "passUnion5", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22169 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22170( cx, "TestExampleInterface"
, "passUnion5", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22170 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22170( cx, "TestExampleInterface"
, "passUnion5", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22171
22172 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22173 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion5", 1)) {
22174 return false;
22175 }
22176 ObjectOrBoolean arg0;
22177 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22178 return false;
22179 }
22180 // NOTE: This assert does NOT call the function.
22181 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion5(cx, Constify(arg0)))>, "Should be returning void here");
22182 MOZ_KnownLive(self)(self)->PassUnion5(cx, Constify(arg0));
22183 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22183); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22183; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22184 args.rval().setUndefined();
22185 return true;
22186}
22187
22188static const JSJitInfo passUnion5_methodinfo = {
22189 { (JSJitGetterOp)passUnion5 },
22190 { prototypes::id::TestExampleInterface },
22191 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22192 JSJitInfo::Method,
22193 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22194 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22195 false, /* isInfallible. False in setters. */
22196 false, /* isMovable. Not relevant for setters. */
22197 false, /* isEliminatable. Not relevant for setters. */
22198 false, /* isAlwaysInSlot. Only relevant for getters. */
22199 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22200 false, /* isTypedMethod. Only relevant for methods. */
22201 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22202};
22203
22204MOZ_CAN_RUN_SCRIPT static bool
22205passUnion6(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22206{
22207 BindingCallContext cx(cx_, "TestExampleInterface.passUnion6");
22208 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22211( cx, "TestExampleInterface"
, "passUnion6", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22209 "TestExampleInterface", "passUnion6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22211( cx, "TestExampleInterface"
, "passUnion6", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22210 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22211( cx, "TestExampleInterface"
, "passUnion6", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22211 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22211( cx, "TestExampleInterface"
, "passUnion6", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22212
22213 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22214 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion6", 1)) {
22215 return false;
22216 }
22217 ObjectOrString arg0;
22218 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22219 return false;
22220 }
22221 // NOTE: This assert does NOT call the function.
22222 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion6(cx, Constify(arg0)))>, "Should be returning void here");
22223 MOZ_KnownLive(self)(self)->PassUnion6(cx, Constify(arg0));
22224 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22224); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22224; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22225 args.rval().setUndefined();
22226 return true;
22227}
22228
22229static const JSJitInfo passUnion6_methodinfo = {
22230 { (JSJitGetterOp)passUnion6 },
22231 { prototypes::id::TestExampleInterface },
22232 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22233 JSJitInfo::Method,
22234 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22235 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22236 false, /* isInfallible. False in setters. */
22237 false, /* isMovable. Not relevant for setters. */
22238 false, /* isEliminatable. Not relevant for setters. */
22239 false, /* isAlwaysInSlot. Only relevant for getters. */
22240 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22241 false, /* isTypedMethod. Only relevant for methods. */
22242 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22243};
22244
22245MOZ_CAN_RUN_SCRIPT static bool
22246passUnion7(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22247{
22248 BindingCallContext cx(cx_, "TestExampleInterface.passUnion7");
22249 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22252( cx, "TestExampleInterface"
, "passUnion7", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22250 "TestExampleInterface", "passUnion7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22252( cx, "TestExampleInterface"
, "passUnion7", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22251 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22252( cx, "TestExampleInterface"
, "passUnion7", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22252 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22252( cx, "TestExampleInterface"
, "passUnion7", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22253
22254 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22255 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion7", 1)) {
22256 return false;
22257 }
22258 ObjectOrStringOrLong arg0;
22259 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22260 return false;
22261 }
22262 // NOTE: This assert does NOT call the function.
22263 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion7(cx, Constify(arg0)))>, "Should be returning void here");
22264 MOZ_KnownLive(self)(self)->PassUnion7(cx, Constify(arg0));
22265 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22265); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22265; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22266 args.rval().setUndefined();
22267 return true;
22268}
22269
22270static const JSJitInfo passUnion7_methodinfo = {
22271 { (JSJitGetterOp)passUnion7 },
22272 { prototypes::id::TestExampleInterface },
22273 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22274 JSJitInfo::Method,
22275 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22276 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22277 false, /* isInfallible. False in setters. */
22278 false, /* isMovable. Not relevant for setters. */
22279 false, /* isEliminatable. Not relevant for setters. */
22280 false, /* isAlwaysInSlot. Only relevant for getters. */
22281 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22282 false, /* isTypedMethod. Only relevant for methods. */
22283 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22284};
22285
22286MOZ_CAN_RUN_SCRIPT static bool
22287passUnion8(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22288{
22289 BindingCallContext cx(cx_, "TestExampleInterface.passUnion8");
22290 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22293( cx, "TestExampleInterface"
, "passUnion8", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22291 "TestExampleInterface", "passUnion8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22293( cx, "TestExampleInterface"
, "passUnion8", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22292 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22293( cx, "TestExampleInterface"
, "passUnion8", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22293 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22293( cx, "TestExampleInterface"
, "passUnion8", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22294
22295 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22296 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion8", 1)) {
22297 return false;
22298 }
22299 ObjectOrStringOrBoolean arg0;
22300 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22301 return false;
22302 }
22303 // NOTE: This assert does NOT call the function.
22304 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion8(cx, Constify(arg0)))>, "Should be returning void here");
22305 MOZ_KnownLive(self)(self)->PassUnion8(cx, Constify(arg0));
22306 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22306); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22306; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22307 args.rval().setUndefined();
22308 return true;
22309}
22310
22311static const JSJitInfo passUnion8_methodinfo = {
22312 { (JSJitGetterOp)passUnion8 },
22313 { prototypes::id::TestExampleInterface },
22314 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22315 JSJitInfo::Method,
22316 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22317 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22318 false, /* isInfallible. False in setters. */
22319 false, /* isMovable. Not relevant for setters. */
22320 false, /* isEliminatable. Not relevant for setters. */
22321 false, /* isAlwaysInSlot. Only relevant for getters. */
22322 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22323 false, /* isTypedMethod. Only relevant for methods. */
22324 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22325};
22326
22327MOZ_CAN_RUN_SCRIPT static bool
22328passUnion9(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22329{
22330 BindingCallContext cx(cx_, "TestExampleInterface.passUnion9");
22331 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22334( cx, "TestExampleInterface"
, "passUnion9", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22332 "TestExampleInterface", "passUnion9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22334( cx, "TestExampleInterface"
, "passUnion9", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22333 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22334( cx, "TestExampleInterface"
, "passUnion9", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22334 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22334( cx, "TestExampleInterface"
, "passUnion9", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22335
22336 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22337 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion9", 1)) {
22338 return false;
22339 }
22340 ObjectOrStringOrLongOrBoolean arg0;
22341 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22342 return false;
22343 }
22344 // NOTE: This assert does NOT call the function.
22345 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion9(cx, Constify(arg0)))>, "Should be returning void here");
22346 MOZ_KnownLive(self)(self)->PassUnion9(cx, Constify(arg0));
22347 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22347); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22347; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22348 args.rval().setUndefined();
22349 return true;
22350}
22351
22352static const JSJitInfo passUnion9_methodinfo = {
22353 { (JSJitGetterOp)passUnion9 },
22354 { prototypes::id::TestExampleInterface },
22355 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22356 JSJitInfo::Method,
22357 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22358 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22359 false, /* isInfallible. False in setters. */
22360 false, /* isMovable. Not relevant for setters. */
22361 false, /* isEliminatable. Not relevant for setters. */
22362 false, /* isAlwaysInSlot. Only relevant for getters. */
22363 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22364 false, /* isTypedMethod. Only relevant for methods. */
22365 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22366};
22367
22368MOZ_CAN_RUN_SCRIPT static bool
22369passUnion10(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22370{
22371 BindingCallContext cx(cx_, "TestExampleInterface.passUnion10");
22372 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22375( cx, "TestExampleInterface"
, "passUnion10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22373 "TestExampleInterface", "passUnion10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22375( cx, "TestExampleInterface"
, "passUnion10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22374 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22375( cx, "TestExampleInterface"
, "passUnion10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22375 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22375( cx, "TestExampleInterface"
, "passUnion10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22376
22377 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22378 EventInitOrLong arg0;
22379 if (!(args.hasDefined(0))) {
22380 if (!arg0.RawSetAsEventInit().Init(cx, JS::NullHandleValue, "Member of (EventInit or long)")) {
22381 return false;
22382 }
22383 } else {
22384 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22385 return false;
22386 }
22387 }
22388 // NOTE: This assert does NOT call the function.
22389 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion10(Constify(arg0)))>, "Should be returning void here");
22390 MOZ_KnownLive(self)(self)->PassUnion10(Constify(arg0));
22391 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22391); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22391; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22392 args.rval().setUndefined();
22393 return true;
22394}
22395
22396static const JSJitInfo passUnion10_methodinfo = {
22397 { (JSJitGetterOp)passUnion10 },
22398 { prototypes::id::TestExampleInterface },
22399 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22400 JSJitInfo::Method,
22401 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22402 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22403 false, /* isInfallible. False in setters. */
22404 false, /* isMovable. Not relevant for setters. */
22405 false, /* isEliminatable. Not relevant for setters. */
22406 false, /* isAlwaysInSlot. Only relevant for getters. */
22407 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22408 false, /* isTypedMethod. Only relevant for methods. */
22409 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22410};
22411
22412MOZ_CAN_RUN_SCRIPT static bool
22413passUnion11(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22414{
22415 BindingCallContext cx(cx_, "TestExampleInterface.passUnion11");
22416 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22419( cx, "TestExampleInterface"
, "passUnion11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22417 "TestExampleInterface", "passUnion11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22419( cx, "TestExampleInterface"
, "passUnion11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22418 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22419( cx, "TestExampleInterface"
, "passUnion11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22419 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22419( cx, "TestExampleInterface"
, "passUnion11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22420
22421 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22422 CustomEventInitOrLong arg0;
22423 if (!(args.hasDefined(0))) {
22424 if (!arg0.RawSetAsCustomEventInit(cx).Init(cx, JS::NullHandleValue, "Member of (CustomEventInit or long)")) {
22425 return false;
22426 }
22427 } else {
22428 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22429 return false;
22430 }
22431 }
22432 // NOTE: This assert does NOT call the function.
22433 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion11(cx, Constify(arg0)))>, "Should be returning void here");
22434 MOZ_KnownLive(self)(self)->PassUnion11(cx, Constify(arg0));
22435 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22435); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22435; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22436 args.rval().setUndefined();
22437 return true;
22438}
22439
22440static const JSJitInfo passUnion11_methodinfo = {
22441 { (JSJitGetterOp)passUnion11 },
22442 { prototypes::id::TestExampleInterface },
22443 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22444 JSJitInfo::Method,
22445 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22446 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22447 false, /* isInfallible. False in setters. */
22448 false, /* isMovable. Not relevant for setters. */
22449 false, /* isEliminatable. Not relevant for setters. */
22450 false, /* isAlwaysInSlot. Only relevant for getters. */
22451 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22452 false, /* isTypedMethod. Only relevant for methods. */
22453 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22454};
22455
22456MOZ_CAN_RUN_SCRIPT static bool
22457passUnion12(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22458{
22459 BindingCallContext cx(cx_, "TestExampleInterface.passUnion12");
22460 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22463( cx, "TestExampleInterface"
, "passUnion12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22461 "TestExampleInterface", "passUnion12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22463( cx, "TestExampleInterface"
, "passUnion12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22462 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22463( cx, "TestExampleInterface"
, "passUnion12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22463 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22463( cx, "TestExampleInterface"
, "passUnion12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22464
22465 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22466 EventInitOrLong arg0;
22467 if (!(args.hasDefined(0))) {
22468 arg0.RawSetAsLong() = 5;
22469 } else {
22470 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22471 return false;
22472 }
22473 }
22474 // NOTE: This assert does NOT call the function.
22475 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion12(Constify(arg0)))>, "Should be returning void here");
22476 MOZ_KnownLive(self)(self)->PassUnion12(Constify(arg0));
22477 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22477); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22477; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22478 args.rval().setUndefined();
22479 return true;
22480}
22481
22482static const JSJitInfo passUnion12_methodinfo = {
22483 { (JSJitGetterOp)passUnion12 },
22484 { prototypes::id::TestExampleInterface },
22485 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22486 JSJitInfo::Method,
22487 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22488 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22489 false, /* isInfallible. False in setters. */
22490 false, /* isMovable. Not relevant for setters. */
22491 false, /* isEliminatable. Not relevant for setters. */
22492 false, /* isAlwaysInSlot. Only relevant for getters. */
22493 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22494 false, /* isTypedMethod. Only relevant for methods. */
22495 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22496};
22497
22498MOZ_CAN_RUN_SCRIPT static bool
22499passUnion13(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22500{
22501 BindingCallContext cx(cx_, "TestExampleInterface.passUnion13");
22502 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22505( cx, "TestExampleInterface"
, "passUnion13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22503 "TestExampleInterface", "passUnion13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22505( cx, "TestExampleInterface"
, "passUnion13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22504 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22505( cx, "TestExampleInterface"
, "passUnion13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22505 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22505( cx, "TestExampleInterface"
, "passUnion13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22506
22507 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22508 ObjectOrLongOrNull arg0;
22509 if (!(args.hasDefined(0))) {
22510 arg0.SetNull();
22511 } else {
22512 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22513 return false;
22514 }
22515 }
22516 // NOTE: This assert does NOT call the function.
22517 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion13(cx, Constify(arg0)))>, "Should be returning void here");
22518 MOZ_KnownLive(self)(self)->PassUnion13(cx, Constify(arg0));
22519 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22519); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22519; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22520 args.rval().setUndefined();
22521 return true;
22522}
22523
22524static const JSJitInfo passUnion13_methodinfo = {
22525 { (JSJitGetterOp)passUnion13 },
22526 { prototypes::id::TestExampleInterface },
22527 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22528 JSJitInfo::Method,
22529 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22530 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22531 false, /* isInfallible. False in setters. */
22532 false, /* isMovable. Not relevant for setters. */
22533 false, /* isEliminatable. Not relevant for setters. */
22534 false, /* isAlwaysInSlot. Only relevant for getters. */
22535 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22536 false, /* isTypedMethod. Only relevant for methods. */
22537 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22538};
22539
22540MOZ_CAN_RUN_SCRIPT static bool
22541passUnion14(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22542{
22543 BindingCallContext cx(cx_, "TestExampleInterface.passUnion14");
22544 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22547( cx, "TestExampleInterface"
, "passUnion14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22545 "TestExampleInterface", "passUnion14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22547( cx, "TestExampleInterface"
, "passUnion14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22546 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22547( cx, "TestExampleInterface"
, "passUnion14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22547 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22547( cx, "TestExampleInterface"
, "passUnion14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22548
22549 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22550 ObjectOrLongOrNull arg0;
22551 if (!(args.hasDefined(0))) {
22552 arg0.RawSetAsLong() = 5;
22553 } else {
22554 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22555 return false;
22556 }
22557 }
22558 // NOTE: This assert does NOT call the function.
22559 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion14(cx, Constify(arg0)))>, "Should be returning void here");
22560 MOZ_KnownLive(self)(self)->PassUnion14(cx, Constify(arg0));
22561 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22561); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22561; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22562 args.rval().setUndefined();
22563 return true;
22564}
22565
22566static const JSJitInfo passUnion14_methodinfo = {
22567 { (JSJitGetterOp)passUnion14 },
22568 { prototypes::id::TestExampleInterface },
22569 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22570 JSJitInfo::Method,
22571 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22572 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22573 false, /* isInfallible. False in setters. */
22574 false, /* isMovable. Not relevant for setters. */
22575 false, /* isEliminatable. Not relevant for setters. */
22576 false, /* isAlwaysInSlot. Only relevant for getters. */
22577 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22578 false, /* isTypedMethod. Only relevant for methods. */
22579 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22580};
22581
22582MOZ_CAN_RUN_SCRIPT static bool
22583passUnion15(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22584{
22585 BindingCallContext cx(cx_, "TestExampleInterface.passUnion15");
22586 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22589( cx, "TestExampleInterface"
, "passUnion15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22587 "TestExampleInterface", "passUnion15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22589( cx, "TestExampleInterface"
, "passUnion15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22588 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22589( cx, "TestExampleInterface"
, "passUnion15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22589 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22589( cx, "TestExampleInterface"
, "passUnion15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22590
22591 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22592 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion15", 1)) {
22593 return false;
22594 }
22595 LongSequenceOrLong arg0;
22596 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22597 return false;
22598 }
22599 // NOTE: This assert does NOT call the function.
22600 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion15(Constify(arg0)))>, "Should be returning void here");
22601 MOZ_KnownLive(self)(self)->PassUnion15(Constify(arg0));
22602 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22602); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22602; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22603 args.rval().setUndefined();
22604 return true;
22605}
22606
22607static const JSJitInfo passUnion15_methodinfo = {
22608 { (JSJitGetterOp)passUnion15 },
22609 { prototypes::id::TestExampleInterface },
22610 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22611 JSJitInfo::Method,
22612 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22613 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22614 false, /* isInfallible. False in setters. */
22615 false, /* isMovable. Not relevant for setters. */
22616 false, /* isEliminatable. Not relevant for setters. */
22617 false, /* isAlwaysInSlot. Only relevant for getters. */
22618 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22619 false, /* isTypedMethod. Only relevant for methods. */
22620 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22621};
22622
22623MOZ_CAN_RUN_SCRIPT static bool
22624passUnion16(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22625{
22626 BindingCallContext cx(cx_, "TestExampleInterface.passUnion16");
22627 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22630( cx, "TestExampleInterface"
, "passUnion16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22628 "TestExampleInterface", "passUnion16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22630( cx, "TestExampleInterface"
, "passUnion16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22629 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22630( cx, "TestExampleInterface"
, "passUnion16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22630 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22630( cx, "TestExampleInterface"
, "passUnion16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22631
22632 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22633 Optional<LongSequenceOrLong> arg0;
22634 if (args.hasDefined(0)) {
22635 arg0.Construct();
22636 if (!arg0.Value().Init(cx, args[0], "Argument 1", false)) {
22637 return false;
22638 }
22639 }
22640 // NOTE: This assert does NOT call the function.
22641 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion16(Constify(arg0)))>, "Should be returning void here");
22642 MOZ_KnownLive(self)(self)->PassUnion16(Constify(arg0));
22643 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22643); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22643; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22644 args.rval().setUndefined();
22645 return true;
22646}
22647
22648static const JSJitInfo passUnion16_methodinfo = {
22649 { (JSJitGetterOp)passUnion16 },
22650 { prototypes::id::TestExampleInterface },
22651 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22652 JSJitInfo::Method,
22653 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22654 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22655 false, /* isInfallible. False in setters. */
22656 false, /* isMovable. Not relevant for setters. */
22657 false, /* isEliminatable. Not relevant for setters. */
22658 false, /* isAlwaysInSlot. Only relevant for getters. */
22659 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22660 false, /* isTypedMethod. Only relevant for methods. */
22661 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22662};
22663
22664MOZ_CAN_RUN_SCRIPT static bool
22665passUnion17(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22666{
22667 BindingCallContext cx(cx_, "TestExampleInterface.passUnion17");
22668 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22671( cx, "TestExampleInterface"
, "passUnion17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22669 "TestExampleInterface", "passUnion17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22671( cx, "TestExampleInterface"
, "passUnion17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22670 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22671( cx, "TestExampleInterface"
, "passUnion17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22671 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22671( cx, "TestExampleInterface"
, "passUnion17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22672
22673 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22674 LongSequenceOrNullOrLong arg0;
22675 if (!(args.hasDefined(0))) {
22676 arg0.RawSetAsLong() = 5;
22677 } else {
22678 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22679 return false;
22680 }
22681 }
22682 // NOTE: This assert does NOT call the function.
22683 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion17(Constify(arg0)))>, "Should be returning void here");
22684 MOZ_KnownLive(self)(self)->PassUnion17(Constify(arg0));
22685 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22685); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22685; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22686 args.rval().setUndefined();
22687 return true;
22688}
22689
22690static const JSJitInfo passUnion17_methodinfo = {
22691 { (JSJitGetterOp)passUnion17 },
22692 { prototypes::id::TestExampleInterface },
22693 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22694 JSJitInfo::Method,
22695 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22696 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22697 false, /* isInfallible. False in setters. */
22698 false, /* isMovable. Not relevant for setters. */
22699 false, /* isEliminatable. Not relevant for setters. */
22700 false, /* isAlwaysInSlot. Only relevant for getters. */
22701 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22702 false, /* isTypedMethod. Only relevant for methods. */
22703 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22704};
22705
22706MOZ_CAN_RUN_SCRIPT static bool
22707passUnion18(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22708{
22709 BindingCallContext cx(cx_, "TestExampleInterface.passUnion18");
22710 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22713( cx, "TestExampleInterface"
, "passUnion18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22711 "TestExampleInterface", "passUnion18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22713( cx, "TestExampleInterface"
, "passUnion18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22712 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22713( cx, "TestExampleInterface"
, "passUnion18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22713 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22713( cx, "TestExampleInterface"
, "passUnion18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22714
22715 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22716 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion18", 1)) {
22717 return false;
22718 }
22719 ObjectSequenceOrLong arg0;
22720 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22721 return false;
22722 }
22723 // NOTE: This assert does NOT call the function.
22724 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion18(cx, Constify(arg0)))>, "Should be returning void here");
22725 MOZ_KnownLive(self)(self)->PassUnion18(cx, Constify(arg0));
22726 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22726); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22726; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22727 args.rval().setUndefined();
22728 return true;
22729}
22730
22731static const JSJitInfo passUnion18_methodinfo = {
22732 { (JSJitGetterOp)passUnion18 },
22733 { prototypes::id::TestExampleInterface },
22734 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22735 JSJitInfo::Method,
22736 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22737 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22738 false, /* isInfallible. False in setters. */
22739 false, /* isMovable. Not relevant for setters. */
22740 false, /* isEliminatable. Not relevant for setters. */
22741 false, /* isAlwaysInSlot. Only relevant for getters. */
22742 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22743 false, /* isTypedMethod. Only relevant for methods. */
22744 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22745};
22746
22747MOZ_CAN_RUN_SCRIPT static bool
22748passUnion19(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22749{
22750 BindingCallContext cx(cx_, "TestExampleInterface.passUnion19");
22751 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22754( cx, "TestExampleInterface"
, "passUnion19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22752 "TestExampleInterface", "passUnion19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22754( cx, "TestExampleInterface"
, "passUnion19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22753 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22754( cx, "TestExampleInterface"
, "passUnion19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22754 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22754( cx, "TestExampleInterface"
, "passUnion19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22755
22756 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22757 Optional<ObjectSequenceOrLong> arg0;
22758 if (args.hasDefined(0)) {
22759 arg0.Construct();
22760 if (!arg0.Value().Init(cx, args[0], "Argument 1", false)) {
22761 return false;
22762 }
22763 }
22764 // NOTE: This assert does NOT call the function.
22765 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion19(cx, Constify(arg0)))>, "Should be returning void here");
22766 MOZ_KnownLive(self)(self)->PassUnion19(cx, Constify(arg0));
22767 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22767); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22767; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22768 args.rval().setUndefined();
22769 return true;
22770}
22771
22772static const JSJitInfo passUnion19_methodinfo = {
22773 { (JSJitGetterOp)passUnion19 },
22774 { prototypes::id::TestExampleInterface },
22775 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22776 JSJitInfo::Method,
22777 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22778 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22779 false, /* isInfallible. False in setters. */
22780 false, /* isMovable. Not relevant for setters. */
22781 false, /* isEliminatable. Not relevant for setters. */
22782 false, /* isAlwaysInSlot. Only relevant for getters. */
22783 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22784 false, /* isTypedMethod. Only relevant for methods. */
22785 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22786};
22787
22788MOZ_CAN_RUN_SCRIPT static bool
22789passUnion20(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22790{
22791 BindingCallContext cx(cx_, "TestExampleInterface.passUnion20");
22792 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22795( cx, "TestExampleInterface"
, "passUnion20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22793 "TestExampleInterface", "passUnion20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22795( cx, "TestExampleInterface"
, "passUnion20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22794 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22795( cx, "TestExampleInterface"
, "passUnion20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22795 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22795( cx, "TestExampleInterface"
, "passUnion20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22796
22797 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22798 ObjectSequenceOrLong arg0;
22799 if (!(args.hasDefined(0))) {
22800 Unused << arg0.RawSetAsObjectSequence(cx);
22801 } else {
22802 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22803 return false;
22804 }
22805 }
22806 // NOTE: This assert does NOT call the function.
22807 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion20(cx, Constify(arg0)))>, "Should be returning void here");
22808 MOZ_KnownLive(self)(self)->PassUnion20(cx, Constify(arg0));
22809 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22809); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22809; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22810 args.rval().setUndefined();
22811 return true;
22812}
22813
22814static const JSJitInfo passUnion20_methodinfo = {
22815 { (JSJitGetterOp)passUnion20 },
22816 { prototypes::id::TestExampleInterface },
22817 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22818 JSJitInfo::Method,
22819 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22820 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22821 false, /* isInfallible. False in setters. */
22822 false, /* isMovable. Not relevant for setters. */
22823 false, /* isEliminatable. Not relevant for setters. */
22824 false, /* isAlwaysInSlot. Only relevant for getters. */
22825 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22826 false, /* isTypedMethod. Only relevant for methods. */
22827 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22828};
22829
22830MOZ_CAN_RUN_SCRIPT static bool
22831passUnion21(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22832{
22833 BindingCallContext cx(cx_, "TestExampleInterface.passUnion21");
22834 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22837( cx, "TestExampleInterface"
, "passUnion21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22835 "TestExampleInterface", "passUnion21", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22837( cx, "TestExampleInterface"
, "passUnion21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22836 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22837( cx, "TestExampleInterface"
, "passUnion21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22837 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22837( cx, "TestExampleInterface"
, "passUnion21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22838
22839 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22840 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion21", 1)) {
22841 return false;
22842 }
22843 StringLongRecordOrLong arg0;
22844 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22845 return false;
22846 }
22847 // NOTE: This assert does NOT call the function.
22848 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion21(Constify(arg0)))>, "Should be returning void here");
22849 MOZ_KnownLive(self)(self)->PassUnion21(Constify(arg0));
22850 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22850); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22850; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22851 args.rval().setUndefined();
22852 return true;
22853}
22854
22855static const JSJitInfo passUnion21_methodinfo = {
22856 { (JSJitGetterOp)passUnion21 },
22857 { prototypes::id::TestExampleInterface },
22858 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22859 JSJitInfo::Method,
22860 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22861 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22862 false, /* isInfallible. False in setters. */
22863 false, /* isMovable. Not relevant for setters. */
22864 false, /* isEliminatable. Not relevant for setters. */
22865 false, /* isAlwaysInSlot. Only relevant for getters. */
22866 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22867 false, /* isTypedMethod. Only relevant for methods. */
22868 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22869};
22870
22871MOZ_CAN_RUN_SCRIPT static bool
22872passUnion22(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22873{
22874 BindingCallContext cx(cx_, "TestExampleInterface.passUnion22");
22875 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22878( cx, "TestExampleInterface"
, "passUnion22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22876 "TestExampleInterface", "passUnion22", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22878( cx, "TestExampleInterface"
, "passUnion22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22877 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22878( cx, "TestExampleInterface"
, "passUnion22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22878 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22878( cx, "TestExampleInterface"
, "passUnion22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22879
22880 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22881 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion22", 1)) {
22882 return false;
22883 }
22884 StringObjectRecordOrLong arg0;
22885 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22886 return false;
22887 }
22888 // NOTE: This assert does NOT call the function.
22889 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion22(cx, Constify(arg0)))>, "Should be returning void here");
22890 MOZ_KnownLive(self)(self)->PassUnion22(cx, Constify(arg0));
22891 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22891); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22891; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22892 args.rval().setUndefined();
22893 return true;
22894}
22895
22896static const JSJitInfo passUnion22_methodinfo = {
22897 { (JSJitGetterOp)passUnion22 },
22898 { prototypes::id::TestExampleInterface },
22899 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22900 JSJitInfo::Method,
22901 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22902 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22903 false, /* isInfallible. False in setters. */
22904 false, /* isMovable. Not relevant for setters. */
22905 false, /* isEliminatable. Not relevant for setters. */
22906 false, /* isAlwaysInSlot. Only relevant for getters. */
22907 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22908 false, /* isTypedMethod. Only relevant for methods. */
22909 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22910};
22911
22912MOZ_CAN_RUN_SCRIPT static bool
22913passUnion23(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22914{
22915 BindingCallContext cx(cx_, "TestExampleInterface.passUnion23");
22916 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22919( cx, "TestExampleInterface"
, "passUnion23", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22917 "TestExampleInterface", "passUnion23", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22919( cx, "TestExampleInterface"
, "passUnion23", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22918 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22919( cx, "TestExampleInterface"
, "passUnion23", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22919 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22919( cx, "TestExampleInterface"
, "passUnion23", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22920
22921 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22922 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion23", 1)) {
22923 return false;
22924 }
22925 ImageDataSequenceOrLong arg0;
22926 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22927 return false;
22928 }
22929 // NOTE: This assert does NOT call the function.
22930 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion23(Constify(arg0)))>, "Should be returning void here");
22931 MOZ_KnownLive(self)(self)->PassUnion23(Constify(arg0));
22932 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22932); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22932; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22933 args.rval().setUndefined();
22934 return true;
22935}
22936
22937static const JSJitInfo passUnion23_methodinfo = {
22938 { (JSJitGetterOp)passUnion23 },
22939 { prototypes::id::TestExampleInterface },
22940 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22941 JSJitInfo::Method,
22942 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22943 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22944 false, /* isInfallible. False in setters. */
22945 false, /* isMovable. Not relevant for setters. */
22946 false, /* isEliminatable. Not relevant for setters. */
22947 false, /* isAlwaysInSlot. Only relevant for getters. */
22948 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22949 false, /* isTypedMethod. Only relevant for methods. */
22950 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22951};
22952
22953MOZ_CAN_RUN_SCRIPT static bool
22954passUnion24(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22955{
22956 BindingCallContext cx(cx_, "TestExampleInterface.passUnion24");
22957 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22960( cx, "TestExampleInterface"
, "passUnion24", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22958 "TestExampleInterface", "passUnion24", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22960( cx, "TestExampleInterface"
, "passUnion24", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22959 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22960( cx, "TestExampleInterface"
, "passUnion24", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22960 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22960( cx, "TestExampleInterface"
, "passUnion24", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22961
22962 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
22963 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion24", 1)) {
22964 return false;
22965 }
22966 ImageDataOrNullSequenceOrLong arg0;
22967 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
22968 return false;
22969 }
22970 // NOTE: This assert does NOT call the function.
22971 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion24(Constify(arg0)))>, "Should be returning void here");
22972 MOZ_KnownLive(self)(self)->PassUnion24(Constify(arg0));
22973 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 22973); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22973; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22974 args.rval().setUndefined();
22975 return true;
22976}
22977
22978static const JSJitInfo passUnion24_methodinfo = {
22979 { (JSJitGetterOp)passUnion24 },
22980 { prototypes::id::TestExampleInterface },
22981 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
22982 JSJitInfo::Method,
22983 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22984 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22985 false, /* isInfallible. False in setters. */
22986 false, /* isMovable. Not relevant for setters. */
22987 false, /* isEliminatable. Not relevant for setters. */
22988 false, /* isAlwaysInSlot. Only relevant for getters. */
22989 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22990 false, /* isTypedMethod. Only relevant for methods. */
22991 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22992};
22993
22994MOZ_CAN_RUN_SCRIPT static bool
22995passUnion25(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22996{
22997 BindingCallContext cx(cx_, "TestExampleInterface.passUnion25");
22998 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23001( cx, "TestExampleInterface"
, "passUnion25", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22999 "TestExampleInterface", "passUnion25", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23001( cx, "TestExampleInterface"
, "passUnion25", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23000 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23001( cx, "TestExampleInterface"
, "passUnion25", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23001 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23001( cx, "TestExampleInterface"
, "passUnion25", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23002
23003 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23004 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion25", 1)) {
23005 return false;
23006 }
23007 ImageDataSequenceSequenceOrLong arg0;
23008 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23009 return false;
23010 }
23011 // NOTE: This assert does NOT call the function.
23012 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion25(Constify(arg0)))>, "Should be returning void here");
23013 MOZ_KnownLive(self)(self)->PassUnion25(Constify(arg0));
23014 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23014); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23014; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23015 args.rval().setUndefined();
23016 return true;
23017}
23018
23019static const JSJitInfo passUnion25_methodinfo = {
23020 { (JSJitGetterOp)passUnion25 },
23021 { prototypes::id::TestExampleInterface },
23022 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23023 JSJitInfo::Method,
23024 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23025 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23026 false, /* isInfallible. False in setters. */
23027 false, /* isMovable. Not relevant for setters. */
23028 false, /* isEliminatable. Not relevant for setters. */
23029 false, /* isAlwaysInSlot. Only relevant for getters. */
23030 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23031 false, /* isTypedMethod. Only relevant for methods. */
23032 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23033};
23034
23035MOZ_CAN_RUN_SCRIPT static bool
23036passUnion26(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23037{
23038 BindingCallContext cx(cx_, "TestExampleInterface.passUnion26");
23039 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23042( cx, "TestExampleInterface"
, "passUnion26", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23040 "TestExampleInterface", "passUnion26", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23042( cx, "TestExampleInterface"
, "passUnion26", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23041 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23042( cx, "TestExampleInterface"
, "passUnion26", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23042 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23042( cx, "TestExampleInterface"
, "passUnion26", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23043
23044 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23045 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnion26", 1)) {
23046 return false;
23047 }
23048 ImageDataOrNullSequenceSequenceOrLong arg0;
23049 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23050 return false;
23051 }
23052 // NOTE: This assert does NOT call the function.
23053 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion26(Constify(arg0)))>, "Should be returning void here");
23054 MOZ_KnownLive(self)(self)->PassUnion26(Constify(arg0));
23055 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23055); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23055; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23056 args.rval().setUndefined();
23057 return true;
23058}
23059
23060static const JSJitInfo passUnion26_methodinfo = {
23061 { (JSJitGetterOp)passUnion26 },
23062 { prototypes::id::TestExampleInterface },
23063 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23064 JSJitInfo::Method,
23065 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23066 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23067 false, /* isInfallible. False in setters. */
23068 false, /* isMovable. Not relevant for setters. */
23069 false, /* isEliminatable. Not relevant for setters. */
23070 false, /* isAlwaysInSlot. Only relevant for getters. */
23071 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23072 false, /* isTypedMethod. Only relevant for methods. */
23073 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23074};
23075
23076MOZ_CAN_RUN_SCRIPT static bool
23077passUnion27(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23078{
23079 BindingCallContext cx(cx_, "TestExampleInterface.passUnion27");
23080 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23083( cx, "TestExampleInterface"
, "passUnion27", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23081 "TestExampleInterface", "passUnion27", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23083( cx, "TestExampleInterface"
, "passUnion27", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23082 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23083( cx, "TestExampleInterface"
, "passUnion27", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23083 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23083( cx, "TestExampleInterface"
, "passUnion27", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23084
23085 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23086 StringSequenceOrEventInit arg0;
23087 if (!(args.hasDefined(0))) {
23088 if (!arg0.RawSetAsEventInit().Init(cx, JS::NullHandleValue, "Member of (sequence<DOMString> or EventInit)")) {
23089 return false;
23090 }
23091 } else {
23092 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23093 return false;
23094 }
23095 }
23096 // NOTE: This assert does NOT call the function.
23097 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion27(Constify(arg0)))>, "Should be returning void here");
23098 MOZ_KnownLive(self)(self)->PassUnion27(Constify(arg0));
23099 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23099); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23099; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23100 args.rval().setUndefined();
23101 return true;
23102}
23103
23104static const JSJitInfo passUnion27_methodinfo = {
23105 { (JSJitGetterOp)passUnion27 },
23106 { prototypes::id::TestExampleInterface },
23107 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23108 JSJitInfo::Method,
23109 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23110 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23111 false, /* isInfallible. False in setters. */
23112 false, /* isMovable. Not relevant for setters. */
23113 false, /* isEliminatable. Not relevant for setters. */
23114 false, /* isAlwaysInSlot. Only relevant for getters. */
23115 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23116 false, /* isTypedMethod. Only relevant for methods. */
23117 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23118};
23119
23120MOZ_CAN_RUN_SCRIPT static bool
23121passUnion28(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23122{
23123 BindingCallContext cx(cx_, "TestExampleInterface.passUnion28");
23124 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23127( cx, "TestExampleInterface"
, "passUnion28", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23125 "TestExampleInterface", "passUnion28", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23127( cx, "TestExampleInterface"
, "passUnion28", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23126 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23127( cx, "TestExampleInterface"
, "passUnion28", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23127 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23127( cx, "TestExampleInterface"
, "passUnion28", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23128
23129 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23130 EventInitOrStringSequence arg0;
23131 if (!(args.hasDefined(0))) {
23132 if (!arg0.RawSetAsEventInit().Init(cx, JS::NullHandleValue, "Member of (EventInit or sequence<DOMString>)")) {
23133 return false;
23134 }
23135 } else {
23136 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23137 return false;
23138 }
23139 }
23140 // NOTE: This assert does NOT call the function.
23141 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion28(Constify(arg0)))>, "Should be returning void here");
23142 MOZ_KnownLive(self)(self)->PassUnion28(Constify(arg0));
23143 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23143); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23143; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23144 args.rval().setUndefined();
23145 return true;
23146}
23147
23148static const JSJitInfo passUnion28_methodinfo = {
23149 { (JSJitGetterOp)passUnion28 },
23150 { prototypes::id::TestExampleInterface },
23151 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23152 JSJitInfo::Method,
23153 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23154 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23155 false, /* isInfallible. False in setters. */
23156 false, /* isMovable. Not relevant for setters. */
23157 false, /* isEliminatable. Not relevant for setters. */
23158 false, /* isAlwaysInSlot. Only relevant for getters. */
23159 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23160 false, /* isTypedMethod. Only relevant for methods. */
23161 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23162};
23163
23164MOZ_CAN_RUN_SCRIPT static bool
23165passUnionWithCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23166{
23167 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithCallback");
23168 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23171( cx, "TestExampleInterface"
, "passUnionWithCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23169 "TestExampleInterface", "passUnionWithCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23171( cx, "TestExampleInterface"
, "passUnionWithCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23170 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23171( cx, "TestExampleInterface"
, "passUnionWithCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23171 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23171( cx, "TestExampleInterface"
, "passUnionWithCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23172
23173 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23174 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithCallback", 1)) {
23175 return false;
23176 }
23177 EventHandlerNonNullOrNullOrLong arg0;
23178 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23179 return false;
23180 }
23181 // NOTE: This assert does NOT call the function.
23182 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithCallback(Constify(arg0)))>, "Should be returning void here");
23183 MOZ_KnownLive(self)(self)->PassUnionWithCallback(Constify(arg0));
23184 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23184); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23184; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23185 args.rval().setUndefined();
23186 return true;
23187}
23188
23189static const JSJitInfo passUnionWithCallback_methodinfo = {
23190 { (JSJitGetterOp)passUnionWithCallback },
23191 { prototypes::id::TestExampleInterface },
23192 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23193 JSJitInfo::Method,
23194 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23195 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23196 false, /* isInfallible. False in setters. */
23197 false, /* isMovable. Not relevant for setters. */
23198 false, /* isEliminatable. Not relevant for setters. */
23199 false, /* isAlwaysInSlot. Only relevant for getters. */
23200 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23201 false, /* isTypedMethod. Only relevant for methods. */
23202 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23203};
23204
23205MOZ_CAN_RUN_SCRIPT static bool
23206passUnionWithByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23207{
23208 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithByteString");
23209 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23212( cx, "TestExampleInterface"
, "passUnionWithByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23210 "TestExampleInterface", "passUnionWithByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23212( cx, "TestExampleInterface"
, "passUnionWithByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23211 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23212( cx, "TestExampleInterface"
, "passUnionWithByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23212 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23212( cx, "TestExampleInterface"
, "passUnionWithByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23213
23214 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23215 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithByteString", 1)) {
23216 return false;
23217 }
23218 ByteStringOrLong arg0;
23219 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23220 return false;
23221 }
23222 // NOTE: This assert does NOT call the function.
23223 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithByteString(Constify(arg0)))>, "Should be returning void here");
23224 MOZ_KnownLive(self)(self)->PassUnionWithByteString(Constify(arg0));
23225 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23225); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23225; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23226 args.rval().setUndefined();
23227 return true;
23228}
23229
23230static const JSJitInfo passUnionWithByteString_methodinfo = {
23231 { (JSJitGetterOp)passUnionWithByteString },
23232 { prototypes::id::TestExampleInterface },
23233 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23234 JSJitInfo::Method,
23235 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23236 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23237 false, /* isInfallible. False in setters. */
23238 false, /* isMovable. Not relevant for setters. */
23239 false, /* isEliminatable. Not relevant for setters. */
23240 false, /* isAlwaysInSlot. Only relevant for getters. */
23241 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23242 false, /* isTypedMethod. Only relevant for methods. */
23243 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23244};
23245
23246MOZ_CAN_RUN_SCRIPT static bool
23247passUnionWithUTF8String(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23248{
23249 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithUTF8String");
23250 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23253( cx, "TestExampleInterface"
, "passUnionWithUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23251 "TestExampleInterface", "passUnionWithUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23253( cx, "TestExampleInterface"
, "passUnionWithUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23252 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23253( cx, "TestExampleInterface"
, "passUnionWithUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23253 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23253( cx, "TestExampleInterface"
, "passUnionWithUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23254
23255 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23256 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithUTF8String", 1)) {
23257 return false;
23258 }
23259 UTF8StringOrLong arg0;
23260 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23261 return false;
23262 }
23263 // NOTE: This assert does NOT call the function.
23264 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithUTF8String(Constify(arg0)))>, "Should be returning void here");
23265 MOZ_KnownLive(self)(self)->PassUnionWithUTF8String(Constify(arg0));
23266 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23266); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23266; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23267 args.rval().setUndefined();
23268 return true;
23269}
23270
23271static const JSJitInfo passUnionWithUTF8String_methodinfo = {
23272 { (JSJitGetterOp)passUnionWithUTF8String },
23273 { prototypes::id::TestExampleInterface },
23274 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23275 JSJitInfo::Method,
23276 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23277 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23278 false, /* isInfallible. False in setters. */
23279 false, /* isMovable. Not relevant for setters. */
23280 false, /* isEliminatable. Not relevant for setters. */
23281 false, /* isAlwaysInSlot. Only relevant for getters. */
23282 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23283 false, /* isTypedMethod. Only relevant for methods. */
23284 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23285};
23286
23287MOZ_CAN_RUN_SCRIPT static bool
23288passUnionWithRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23289{
23290 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithRecord");
23291 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23294( cx, "TestExampleInterface"
, "passUnionWithRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23292 "TestExampleInterface", "passUnionWithRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23294( cx, "TestExampleInterface"
, "passUnionWithRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23293 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23294( cx, "TestExampleInterface"
, "passUnionWithRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23294 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23294( cx, "TestExampleInterface"
, "passUnionWithRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23295
23296 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23297 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithRecord", 1)) {
23298 return false;
23299 }
23300 StringStringRecordOrString arg0;
23301 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23302 return false;
23303 }
23304 // NOTE: This assert does NOT call the function.
23305 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithRecord(Constify(arg0)))>, "Should be returning void here");
23306 MOZ_KnownLive(self)(self)->PassUnionWithRecord(Constify(arg0));
23307 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23307); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23307; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23308 args.rval().setUndefined();
23309 return true;
23310}
23311
23312static const JSJitInfo passUnionWithRecord_methodinfo = {
23313 { (JSJitGetterOp)passUnionWithRecord },
23314 { prototypes::id::TestExampleInterface },
23315 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23316 JSJitInfo::Method,
23317 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23318 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23319 false, /* isInfallible. False in setters. */
23320 false, /* isMovable. Not relevant for setters. */
23321 false, /* isEliminatable. Not relevant for setters. */
23322 false, /* isAlwaysInSlot. Only relevant for getters. */
23323 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23324 false, /* isTypedMethod. Only relevant for methods. */
23325 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23326};
23327
23328MOZ_CAN_RUN_SCRIPT static bool
23329passUnionWithRecordAndSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23330{
23331 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithRecordAndSequence");
23332 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23335( cx, "TestExampleInterface"
, "passUnionWithRecordAndSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23333 "TestExampleInterface", "passUnionWithRecordAndSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23335( cx, "TestExampleInterface"
, "passUnionWithRecordAndSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23334 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23335( cx, "TestExampleInterface"
, "passUnionWithRecordAndSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23335 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23335( cx, "TestExampleInterface"
, "passUnionWithRecordAndSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23336
23337 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23338 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithRecordAndSequence", 1)) {
23339 return false;
23340 }
23341 StringStringRecordOrStringSequence arg0;
23342 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23343 return false;
23344 }
23345 // NOTE: This assert does NOT call the function.
23346 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithRecordAndSequence(Constify(arg0)))>, "Should be returning void here");
23347 MOZ_KnownLive(self)(self)->PassUnionWithRecordAndSequence(Constify(arg0));
23348 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23348); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23348; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23349 args.rval().setUndefined();
23350 return true;
23351}
23352
23353static const JSJitInfo passUnionWithRecordAndSequence_methodinfo = {
23354 { (JSJitGetterOp)passUnionWithRecordAndSequence },
23355 { prototypes::id::TestExampleInterface },
23356 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23357 JSJitInfo::Method,
23358 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23359 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23360 false, /* isInfallible. False in setters. */
23361 false, /* isMovable. Not relevant for setters. */
23362 false, /* isEliminatable. Not relevant for setters. */
23363 false, /* isAlwaysInSlot. Only relevant for getters. */
23364 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23365 false, /* isTypedMethod. Only relevant for methods. */
23366 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23367};
23368
23369MOZ_CAN_RUN_SCRIPT static bool
23370passUnionWithSequenceAndRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23371{
23372 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithSequenceAndRecord");
23373 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23376( cx, "TestExampleInterface"
, "passUnionWithSequenceAndRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23374 "TestExampleInterface", "passUnionWithSequenceAndRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23376( cx, "TestExampleInterface"
, "passUnionWithSequenceAndRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23375 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23376( cx, "TestExampleInterface"
, "passUnionWithSequenceAndRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23376 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23376( cx, "TestExampleInterface"
, "passUnionWithSequenceAndRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23377
23378 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23379 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithSequenceAndRecord", 1)) {
23380 return false;
23381 }
23382 StringSequenceOrStringStringRecord arg0;
23383 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23384 return false;
23385 }
23386 // NOTE: This assert does NOT call the function.
23387 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithSequenceAndRecord(Constify(arg0)))>, "Should be returning void here");
23388 MOZ_KnownLive(self)(self)->PassUnionWithSequenceAndRecord(Constify(arg0));
23389 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23389); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23389; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23390 args.rval().setUndefined();
23391 return true;
23392}
23393
23394static const JSJitInfo passUnionWithSequenceAndRecord_methodinfo = {
23395 { (JSJitGetterOp)passUnionWithSequenceAndRecord },
23396 { prototypes::id::TestExampleInterface },
23397 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23398 JSJitInfo::Method,
23399 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23400 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23401 false, /* isInfallible. False in setters. */
23402 false, /* isMovable. Not relevant for setters. */
23403 false, /* isEliminatable. Not relevant for setters. */
23404 false, /* isAlwaysInSlot. Only relevant for getters. */
23405 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23406 false, /* isTypedMethod. Only relevant for methods. */
23407 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23408};
23409
23410MOZ_CAN_RUN_SCRIPT static bool
23411passUnionWithSVS(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23412{
23413 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithSVS");
23414 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23417( cx, "TestExampleInterface"
, "passUnionWithSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23415 "TestExampleInterface", "passUnionWithSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23417( cx, "TestExampleInterface"
, "passUnionWithSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23416 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23417( cx, "TestExampleInterface"
, "passUnionWithSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23417 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23417( cx, "TestExampleInterface"
, "passUnionWithSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23418
23419 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23420 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithSVS", 1)) {
23421 return false;
23422 }
23423 USVStringOrLong arg0;
23424 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23425 return false;
23426 }
23427 // NOTE: This assert does NOT call the function.
23428 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithSVS(Constify(arg0)))>, "Should be returning void here");
23429 MOZ_KnownLive(self)(self)->PassUnionWithSVS(Constify(arg0));
23430 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23430); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23430; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23431 args.rval().setUndefined();
23432 return true;
23433}
23434
23435static const JSJitInfo passUnionWithSVS_methodinfo = {
23436 { (JSJitGetterOp)passUnionWithSVS },
23437 { prototypes::id::TestExampleInterface },
23438 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23439 JSJitInfo::Method,
23440 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23441 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23442 false, /* isInfallible. False in setters. */
23443 false, /* isMovable. Not relevant for setters. */
23444 false, /* isEliminatable. Not relevant for setters. */
23445 false, /* isAlwaysInSlot. Only relevant for getters. */
23446 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23447 false, /* isTypedMethod. Only relevant for methods. */
23448 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23449};
23450
23451MOZ_CAN_RUN_SCRIPT static bool
23452passUnionWithNullable(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23453{
23454 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithNullable");
23455 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23458( cx, "TestExampleInterface"
, "passUnionWithNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23456 "TestExampleInterface", "passUnionWithNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23458( cx, "TestExampleInterface"
, "passUnionWithNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23457 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23458( cx, "TestExampleInterface"
, "passUnionWithNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23458 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23458( cx, "TestExampleInterface"
, "passUnionWithNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23459
23460 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23461 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithNullable", 1)) {
23462 return false;
23463 }
23464 ObjectOrNullOrLong arg0;
23465 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23466 return false;
23467 }
23468 // NOTE: This assert does NOT call the function.
23469 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithNullable(cx, Constify(arg0)))>, "Should be returning void here");
23470 MOZ_KnownLive(self)(self)->PassUnionWithNullable(cx, Constify(arg0));
23471 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23471); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23471; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23472 args.rval().setUndefined();
23473 return true;
23474}
23475
23476static const JSJitInfo passUnionWithNullable_methodinfo = {
23477 { (JSJitGetterOp)passUnionWithNullable },
23478 { prototypes::id::TestExampleInterface },
23479 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23480 JSJitInfo::Method,
23481 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23482 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23483 false, /* isInfallible. False in setters. */
23484 false, /* isMovable. Not relevant for setters. */
23485 false, /* isEliminatable. Not relevant for setters. */
23486 false, /* isAlwaysInSlot. Only relevant for getters. */
23487 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23488 false, /* isTypedMethod. Only relevant for methods. */
23489 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23490};
23491
23492MOZ_CAN_RUN_SCRIPT static bool
23493passNullableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23494{
23495 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnion");
23496 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23499( cx, "TestExampleInterface"
, "passNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23497 "TestExampleInterface", "passNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23499( cx, "TestExampleInterface"
, "passNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23498 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23499( cx, "TestExampleInterface"
, "passNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23499 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23499( cx, "TestExampleInterface"
, "passNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23500
23501 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23502 if (!args.requireAtLeast(cx, "TestExampleInterface.passNullableUnion", 1)) {
23503 return false;
23504 }
23505 Nullable<ObjectOrLong > arg0;
23506 if (args[0].isNullOrUndefined()) {
23507 arg0.SetNull();
23508 } else {
23509 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
23510 return false;
23511 }
23512 }
23513 // NOTE: This assert does NOT call the function.
23514 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnion(cx, Constify(arg0)))>, "Should be returning void here");
23515 MOZ_KnownLive(self)(self)->PassNullableUnion(cx, Constify(arg0));
23516 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23516); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23516; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23517 args.rval().setUndefined();
23518 return true;
23519}
23520
23521static const JSJitInfo passNullableUnion_methodinfo = {
23522 { (JSJitGetterOp)passNullableUnion },
23523 { prototypes::id::TestExampleInterface },
23524 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23525 JSJitInfo::Method,
23526 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23527 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23528 false, /* isInfallible. False in setters. */
23529 false, /* isMovable. Not relevant for setters. */
23530 false, /* isEliminatable. Not relevant for setters. */
23531 false, /* isAlwaysInSlot. Only relevant for getters. */
23532 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23533 false, /* isTypedMethod. Only relevant for methods. */
23534 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23535};
23536
23537MOZ_CAN_RUN_SCRIPT static bool
23538passOptionalUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23539{
23540 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalUnion");
23541 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23544( cx, "TestExampleInterface"
, "passOptionalUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23542 "TestExampleInterface", "passOptionalUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23544( cx, "TestExampleInterface"
, "passOptionalUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23543 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23544( cx, "TestExampleInterface"
, "passOptionalUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23544 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23544( cx, "TestExampleInterface"
, "passOptionalUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23545
23546 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23547 Optional<ObjectOrLong> arg0;
23548 if (args.hasDefined(0)) {
23549 arg0.Construct();
23550 if (!arg0.Value().Init(cx, args[0], "Argument 1", false)) {
23551 return false;
23552 }
23553 }
23554 // NOTE: This assert does NOT call the function.
23555 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnion(cx, Constify(arg0)))>, "Should be returning void here");
23556 MOZ_KnownLive(self)(self)->PassOptionalUnion(cx, Constify(arg0));
23557 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23557); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23557; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23558 args.rval().setUndefined();
23559 return true;
23560}
23561
23562static const JSJitInfo passOptionalUnion_methodinfo = {
23563 { (JSJitGetterOp)passOptionalUnion },
23564 { prototypes::id::TestExampleInterface },
23565 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23566 JSJitInfo::Method,
23567 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23568 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23569 false, /* isInfallible. False in setters. */
23570 false, /* isMovable. Not relevant for setters. */
23571 false, /* isEliminatable. Not relevant for setters. */
23572 false, /* isAlwaysInSlot. Only relevant for getters. */
23573 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23574 false, /* isTypedMethod. Only relevant for methods. */
23575 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23576};
23577
23578MOZ_CAN_RUN_SCRIPT static bool
23579passOptionalNullableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23580{
23581 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableUnion");
23582 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23585( cx, "TestExampleInterface"
, "passOptionalNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23583 "TestExampleInterface", "passOptionalNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23585( cx, "TestExampleInterface"
, "passOptionalNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23584 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23585( cx, "TestExampleInterface"
, "passOptionalNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23585 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23585( cx, "TestExampleInterface"
, "passOptionalNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23586
23587 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23588 Optional<Nullable<ObjectOrLong >> arg0;
23589 if (args.hasDefined(0)) {
23590 arg0.Construct();
23591 if (args[0].isNullOrUndefined()) {
23592 arg0.Value().SetNull();
23593 } else {
23594 if (!arg0.Value().SetValue().Init(cx, args[0], "Argument 1", false)) {
23595 return false;
23596 }
23597 }
23598 }
23599 // NOTE: This assert does NOT call the function.
23600 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableUnion(cx, Constify(arg0)))>, "Should be returning void here");
23601 MOZ_KnownLive(self)(self)->PassOptionalNullableUnion(cx, Constify(arg0));
23602 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23602); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23602; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23603 args.rval().setUndefined();
23604 return true;
23605}
23606
23607static const JSJitInfo passOptionalNullableUnion_methodinfo = {
23608 { (JSJitGetterOp)passOptionalNullableUnion },
23609 { prototypes::id::TestExampleInterface },
23610 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23611 JSJitInfo::Method,
23612 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23613 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23614 false, /* isInfallible. False in setters. */
23615 false, /* isMovable. Not relevant for setters. */
23616 false, /* isEliminatable. Not relevant for setters. */
23617 false, /* isAlwaysInSlot. Only relevant for getters. */
23618 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23619 false, /* isTypedMethod. Only relevant for methods. */
23620 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23621};
23622
23623MOZ_CAN_RUN_SCRIPT static bool
23624passOptionalNullableUnionWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23625{
23626 BindingCallContext cx(cx_, "TestExampleInterface.passOptionalNullableUnionWithDefaultValue");
23627 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23630( cx, "TestExampleInterface"
, "passOptionalNullableUnionWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23628 "TestExampleInterface", "passOptionalNullableUnionWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23630( cx, "TestExampleInterface"
, "passOptionalNullableUnionWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23629 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23630( cx, "TestExampleInterface"
, "passOptionalNullableUnionWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23630 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23630( cx, "TestExampleInterface"
, "passOptionalNullableUnionWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23631
23632 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23633 Nullable<ObjectOrLong > arg0;
23634 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
23635 arg0.SetNull();
23636 } else {
23637 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
23638 return false;
23639 }
23640 }
23641 // NOTE: This assert does NOT call the function.
23642 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableUnionWithDefaultValue(cx, Constify(arg0)))>, "Should be returning void here");
23643 MOZ_KnownLive(self)(self)->PassOptionalNullableUnionWithDefaultValue(cx, Constify(arg0));
23644 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23644); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23644; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23645 args.rval().setUndefined();
23646 return true;
23647}
23648
23649static const JSJitInfo passOptionalNullableUnionWithDefaultValue_methodinfo = {
23650 { (JSJitGetterOp)passOptionalNullableUnionWithDefaultValue },
23651 { prototypes::id::TestExampleInterface },
23652 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23653 JSJitInfo::Method,
23654 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23655 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23656 false, /* isInfallible. False in setters. */
23657 false, /* isMovable. Not relevant for setters. */
23658 false, /* isEliminatable. Not relevant for setters. */
23659 false, /* isAlwaysInSlot. Only relevant for getters. */
23660 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23661 false, /* isTypedMethod. Only relevant for methods. */
23662 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23663};
23664
23665MOZ_CAN_RUN_SCRIPT static bool
23666passUnionWithArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23667{
23668 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithArrayBuffer");
23669 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23672( cx, "TestExampleInterface"
, "passUnionWithArrayBuffer", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23670 "TestExampleInterface", "passUnionWithArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23672( cx, "TestExampleInterface"
, "passUnionWithArrayBuffer", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23671 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23672( cx, "TestExampleInterface"
, "passUnionWithArrayBuffer", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23672 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23672( cx, "TestExampleInterface"
, "passUnionWithArrayBuffer", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23673
23674 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23675 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithArrayBuffer", 1)) {
23676 return false;
23677 }
23678 UTF8StringOrArrayBuffer arg0;
23679 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23680 return false;
23681 }
23682 // NOTE: This assert does NOT call the function.
23683 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithArrayBuffer(Constify(arg0)))>, "Should be returning void here");
23684 MOZ_KnownLive(self)(self)->PassUnionWithArrayBuffer(Constify(arg0));
23685 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23685); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23685; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23686 args.rval().setUndefined();
23687 return true;
23688}
23689
23690static const JSJitInfo passUnionWithArrayBuffer_methodinfo = {
23691 { (JSJitGetterOp)passUnionWithArrayBuffer },
23692 { prototypes::id::TestExampleInterface },
23693 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23694 JSJitInfo::Method,
23695 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23696 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23697 false, /* isInfallible. False in setters. */
23698 false, /* isMovable. Not relevant for setters. */
23699 false, /* isEliminatable. Not relevant for setters. */
23700 false, /* isAlwaysInSlot. Only relevant for getters. */
23701 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23702 false, /* isTypedMethod. Only relevant for methods. */
23703 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23704};
23705
23706MOZ_CAN_RUN_SCRIPT static bool
23707passUnionWithArrayBufferOrNull(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23708{
23709 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithArrayBufferOrNull");
23710 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23713( cx, "TestExampleInterface"
, "passUnionWithArrayBufferOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23711 "TestExampleInterface", "passUnionWithArrayBufferOrNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23713( cx, "TestExampleInterface"
, "passUnionWithArrayBufferOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23712 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23713( cx, "TestExampleInterface"
, "passUnionWithArrayBufferOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23713 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23713( cx, "TestExampleInterface"
, "passUnionWithArrayBufferOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23714
23715 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23716 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithArrayBufferOrNull", 1)) {
23717 return false;
23718 }
23719 UTF8StringOrArrayBufferOrNull arg0;
23720 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23721 return false;
23722 }
23723 // NOTE: This assert does NOT call the function.
23724 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithArrayBufferOrNull(Constify(arg0)))>, "Should be returning void here");
23725 MOZ_KnownLive(self)(self)->PassUnionWithArrayBufferOrNull(Constify(arg0));
23726 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23726); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23726; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23727 args.rval().setUndefined();
23728 return true;
23729}
23730
23731static const JSJitInfo passUnionWithArrayBufferOrNull_methodinfo = {
23732 { (JSJitGetterOp)passUnionWithArrayBufferOrNull },
23733 { prototypes::id::TestExampleInterface },
23734 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23735 JSJitInfo::Method,
23736 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23737 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23738 false, /* isInfallible. False in setters. */
23739 false, /* isMovable. Not relevant for setters. */
23740 false, /* isEliminatable. Not relevant for setters. */
23741 false, /* isAlwaysInSlot. Only relevant for getters. */
23742 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23743 false, /* isTypedMethod. Only relevant for methods. */
23744 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23745};
23746
23747MOZ_CAN_RUN_SCRIPT static bool
23748passUnionWithTypedArrays(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23749{
23750 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithTypedArrays");
23751 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23754( cx, "TestExampleInterface"
, "passUnionWithTypedArrays", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23752 "TestExampleInterface", "passUnionWithTypedArrays", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23754( cx, "TestExampleInterface"
, "passUnionWithTypedArrays", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23753 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23754( cx, "TestExampleInterface"
, "passUnionWithTypedArrays", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23754 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23754( cx, "TestExampleInterface"
, "passUnionWithTypedArrays", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23755
23756 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23757 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithTypedArrays", 1)) {
23758 return false;
23759 }
23760 ArrayBufferViewOrArrayBuffer arg0;
23761 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23762 return false;
23763 }
23764 // NOTE: This assert does NOT call the function.
23765 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithTypedArrays(Constify(arg0)))>, "Should be returning void here");
23766 MOZ_KnownLive(self)(self)->PassUnionWithTypedArrays(Constify(arg0));
23767 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23767); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23767; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23768 args.rval().setUndefined();
23769 return true;
23770}
23771
23772static const JSJitInfo passUnionWithTypedArrays_methodinfo = {
23773 { (JSJitGetterOp)passUnionWithTypedArrays },
23774 { prototypes::id::TestExampleInterface },
23775 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23776 JSJitInfo::Method,
23777 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23778 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23779 false, /* isInfallible. False in setters. */
23780 false, /* isMovable. Not relevant for setters. */
23781 false, /* isEliminatable. Not relevant for setters. */
23782 false, /* isAlwaysInSlot. Only relevant for getters. */
23783 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23784 false, /* isTypedMethod. Only relevant for methods. */
23785 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23786};
23787
23788MOZ_CAN_RUN_SCRIPT static bool
23789passUnionWithTypedArraysOrNull(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23790{
23791 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithTypedArraysOrNull");
23792 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23795( cx, "TestExampleInterface"
, "passUnionWithTypedArraysOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23793 "TestExampleInterface", "passUnionWithTypedArraysOrNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23795( cx, "TestExampleInterface"
, "passUnionWithTypedArraysOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23794 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23795( cx, "TestExampleInterface"
, "passUnionWithTypedArraysOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23795 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23795( cx, "TestExampleInterface"
, "passUnionWithTypedArraysOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23796
23797 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23798 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithTypedArraysOrNull", 1)) {
23799 return false;
23800 }
23801 ArrayBufferViewOrArrayBufferOrNull arg0;
23802 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23803 return false;
23804 }
23805 // NOTE: This assert does NOT call the function.
23806 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithTypedArraysOrNull(Constify(arg0)))>, "Should be returning void here");
23807 MOZ_KnownLive(self)(self)->PassUnionWithTypedArraysOrNull(Constify(arg0));
23808 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23808); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23808; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23809 args.rval().setUndefined();
23810 return true;
23811}
23812
23813static const JSJitInfo passUnionWithTypedArraysOrNull_methodinfo = {
23814 { (JSJitGetterOp)passUnionWithTypedArraysOrNull },
23815 { prototypes::id::TestExampleInterface },
23816 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23817 JSJitInfo::Method,
23818 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23819 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23820 false, /* isInfallible. False in setters. */
23821 false, /* isMovable. Not relevant for setters. */
23822 false, /* isEliminatable. Not relevant for setters. */
23823 false, /* isAlwaysInSlot. Only relevant for getters. */
23824 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23825 false, /* isTypedMethod. Only relevant for methods. */
23826 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23827};
23828
23829MOZ_CAN_RUN_SCRIPT static bool
23830passUnionWithString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23831{
23832 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithString");
23833 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23836( cx, "TestExampleInterface"
, "passUnionWithString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23834 "TestExampleInterface", "passUnionWithString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23836( cx, "TestExampleInterface"
, "passUnionWithString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23835 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23836( cx, "TestExampleInterface"
, "passUnionWithString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23836 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23836( cx, "TestExampleInterface"
, "passUnionWithString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23837
23838 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23839 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithString", 1)) {
23840 return false;
23841 }
23842 StringOrObject arg0;
23843 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23844 return false;
23845 }
23846 // NOTE: This assert does NOT call the function.
23847 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithString(cx, Constify(arg0)))>, "Should be returning void here");
23848 MOZ_KnownLive(self)(self)->PassUnionWithString(cx, Constify(arg0));
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)"
, "../TestExampleGenBinding.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 passUnionWithString_methodinfo = {
23855 { (JSJitGetterOp)passUnionWithString },
23856 { prototypes::id::TestExampleInterface },
23857 { PrototypeTraits<prototypes::id::TestExampleInterface>::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
23871passUnionWithEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23872{
23873 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithEnum");
23874 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23877( cx, "TestExampleInterface"
, "passUnionWithEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23875 "TestExampleInterface", "passUnionWithEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23877( cx, "TestExampleInterface"
, "passUnionWithEnum", 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, "TestExampleInterface"
, "passUnionWithEnum", 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, "TestExampleInterface"
, "passUnionWithEnum", 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::TestExampleInterface*>(void_self);
23880 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithEnum", 1)) {
23881 return false;
23882 }
23883 SupportedTypeOrObject arg0;
23884 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23885 return false;
23886 }
23887 // NOTE: This assert does NOT call the function.
23888 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithEnum(cx, Constify(arg0)))>, "Should be returning void here");
23889 MOZ_KnownLive(self)(self)->PassUnionWithEnum(cx, Constify(arg0));
23890 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23890); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23890; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23891 args.rval().setUndefined();
23892 return true;
23893}
23894
23895static const JSJitInfo passUnionWithEnum_methodinfo = {
23896 { (JSJitGetterOp)passUnionWithEnum },
23897 { prototypes::id::TestExampleInterface },
23898 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23899 JSJitInfo::Method,
23900 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23901 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23902 false, /* isInfallible. False in setters. */
23903 false, /* isMovable. Not relevant for setters. */
23904 false, /* isEliminatable. Not relevant for setters. */
23905 false, /* isAlwaysInSlot. Only relevant for getters. */
23906 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23907 false, /* isTypedMethod. Only relevant for methods. */
23908 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23909};
23910
23911MOZ_CAN_RUN_SCRIPT static bool
23912passUnionWithObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23913{
23914 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithObject");
23915 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23918( cx, "TestExampleInterface"
, "passUnionWithObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23916 "TestExampleInterface", "passUnionWithObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23918( cx, "TestExampleInterface"
, "passUnionWithObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23917 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23918( cx, "TestExampleInterface"
, "passUnionWithObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23918 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23918( cx, "TestExampleInterface"
, "passUnionWithObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23919
23920 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23921 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionWithObject", 1)) {
23922 return false;
23923 }
23924 ObjectOrLong arg0;
23925 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23926 return false;
23927 }
23928 // NOTE: This assert does NOT call the function.
23929 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithObject(cx, Constify(arg0)))>, "Should be returning void here");
23930 MOZ_KnownLive(self)(self)->PassUnionWithObject(cx, Constify(arg0));
23931 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23931); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23931; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23932 args.rval().setUndefined();
23933 return true;
23934}
23935
23936static const JSJitInfo passUnionWithObject_methodinfo = {
23937 { (JSJitGetterOp)passUnionWithObject },
23938 { prototypes::id::TestExampleInterface },
23939 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23940 JSJitInfo::Method,
23941 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23942 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23943 false, /* isInfallible. False in setters. */
23944 false, /* isMovable. Not relevant for setters. */
23945 false, /* isEliminatable. Not relevant for setters. */
23946 false, /* isAlwaysInSlot. Only relevant for getters. */
23947 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23948 false, /* isTypedMethod. Only relevant for methods. */
23949 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23950};
23951
23952MOZ_CAN_RUN_SCRIPT static bool
23953passUnionWithDefaultValue1(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23954{
23955 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue1");
23956 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23959( cx, "TestExampleInterface"
, "passUnionWithDefaultValue1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23957 "TestExampleInterface", "passUnionWithDefaultValue1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23959( cx, "TestExampleInterface"
, "passUnionWithDefaultValue1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23958 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23959( cx, "TestExampleInterface"
, "passUnionWithDefaultValue1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23959 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23959( cx, "TestExampleInterface"
, "passUnionWithDefaultValue1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23960
23961 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
23962 DoubleOrString arg0;
23963 if (!(args.hasDefined(0))) {
23964 arg0.SetStringLiteral(u"");
23965 } else {
23966 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
23967 return false;
23968 }
23969 }
23970 // NOTE: This assert does NOT call the function.
23971 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue1(Constify(arg0)))>, "Should be returning void here");
23972 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue1(Constify(arg0));
23973 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 23973); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23973; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23974 args.rval().setUndefined();
23975 return true;
23976}
23977
23978static const JSJitInfo passUnionWithDefaultValue1_methodinfo = {
23979 { (JSJitGetterOp)passUnionWithDefaultValue1 },
23980 { prototypes::id::TestExampleInterface },
23981 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
23982 JSJitInfo::Method,
23983 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23984 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23985 false, /* isInfallible. False in setters. */
23986 false, /* isMovable. Not relevant for setters. */
23987 false, /* isEliminatable. Not relevant for setters. */
23988 false, /* isAlwaysInSlot. Only relevant for getters. */
23989 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23990 false, /* isTypedMethod. Only relevant for methods. */
23991 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23992};
23993
23994MOZ_CAN_RUN_SCRIPT static bool
23995passUnionWithDefaultValue2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23996{
23997 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue2");
23998 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24001( cx, "TestExampleInterface"
, "passUnionWithDefaultValue2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23999 "TestExampleInterface", "passUnionWithDefaultValue2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24001( cx, "TestExampleInterface"
, "passUnionWithDefaultValue2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24000 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24001( cx, "TestExampleInterface"
, "passUnionWithDefaultValue2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24001 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24001( cx, "TestExampleInterface"
, "passUnionWithDefaultValue2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24002
24003 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24004 DoubleOrString arg0;
24005 if (!(args.hasDefined(0))) {
24006 arg0.RawSetAsDouble() = 1.0;
24007 } else {
24008 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24009 return false;
24010 }
24011 }
24012 // NOTE: This assert does NOT call the function.
24013 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue2(Constify(arg0)))>, "Should be returning void here");
24014 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue2(Constify(arg0));
24015 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24015); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24015; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24016 args.rval().setUndefined();
24017 return true;
24018}
24019
24020static const JSJitInfo passUnionWithDefaultValue2_methodinfo = {
24021 { (JSJitGetterOp)passUnionWithDefaultValue2 },
24022 { prototypes::id::TestExampleInterface },
24023 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24024 JSJitInfo::Method,
24025 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24026 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24027 false, /* isInfallible. False in setters. */
24028 false, /* isMovable. Not relevant for setters. */
24029 false, /* isEliminatable. Not relevant for setters. */
24030 false, /* isAlwaysInSlot. Only relevant for getters. */
24031 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24032 false, /* isTypedMethod. Only relevant for methods. */
24033 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24034};
24035
24036MOZ_CAN_RUN_SCRIPT static bool
24037passUnionWithDefaultValue3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24038{
24039 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue3");
24040 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24043( cx, "TestExampleInterface"
, "passUnionWithDefaultValue3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24041 "TestExampleInterface", "passUnionWithDefaultValue3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24043( cx, "TestExampleInterface"
, "passUnionWithDefaultValue3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24042 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24043( cx, "TestExampleInterface"
, "passUnionWithDefaultValue3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24043 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24043( cx, "TestExampleInterface"
, "passUnionWithDefaultValue3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24044
24045 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24046 DoubleOrString arg0;
24047 if (!(args.hasDefined(0))) {
24048 arg0.RawSetAsDouble() = 1.5;
24049 } else {
24050 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24051 return false;
24052 }
24053 }
24054 // NOTE: This assert does NOT call the function.
24055 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue3(Constify(arg0)))>, "Should be returning void here");
24056 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue3(Constify(arg0));
24057 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24057); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24057; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24058 args.rval().setUndefined();
24059 return true;
24060}
24061
24062static const JSJitInfo passUnionWithDefaultValue3_methodinfo = {
24063 { (JSJitGetterOp)passUnionWithDefaultValue3 },
24064 { prototypes::id::TestExampleInterface },
24065 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24066 JSJitInfo::Method,
24067 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24068 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24069 false, /* isInfallible. False in setters. */
24070 false, /* isMovable. Not relevant for setters. */
24071 false, /* isEliminatable. Not relevant for setters. */
24072 false, /* isAlwaysInSlot. Only relevant for getters. */
24073 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24074 false, /* isTypedMethod. Only relevant for methods. */
24075 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24076};
24077
24078MOZ_CAN_RUN_SCRIPT static bool
24079passUnionWithDefaultValue4(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24080{
24081 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue4");
24082 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24085( cx, "TestExampleInterface"
, "passUnionWithDefaultValue4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24083 "TestExampleInterface", "passUnionWithDefaultValue4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24085( cx, "TestExampleInterface"
, "passUnionWithDefaultValue4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24084 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24085( cx, "TestExampleInterface"
, "passUnionWithDefaultValue4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24085 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24085( cx, "TestExampleInterface"
, "passUnionWithDefaultValue4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24086
24087 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24088 FloatOrString arg0;
24089 if (!(args.hasDefined(0))) {
24090 arg0.SetStringLiteral(u"");
24091 } else {
24092 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24093 return false;
24094 }
24095 }
24096 // NOTE: This assert does NOT call the function.
24097 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue4(Constify(arg0)))>, "Should be returning void here");
24098 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue4(Constify(arg0));
24099 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24099); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24099; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24100 args.rval().setUndefined();
24101 return true;
24102}
24103
24104static const JSJitInfo passUnionWithDefaultValue4_methodinfo = {
24105 { (JSJitGetterOp)passUnionWithDefaultValue4 },
24106 { prototypes::id::TestExampleInterface },
24107 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24108 JSJitInfo::Method,
24109 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24110 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24111 false, /* isInfallible. False in setters. */
24112 false, /* isMovable. Not relevant for setters. */
24113 false, /* isEliminatable. Not relevant for setters. */
24114 false, /* isAlwaysInSlot. Only relevant for getters. */
24115 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24116 false, /* isTypedMethod. Only relevant for methods. */
24117 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24118};
24119
24120MOZ_CAN_RUN_SCRIPT static bool
24121passUnionWithDefaultValue5(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24122{
24123 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue5");
24124 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24127( cx, "TestExampleInterface"
, "passUnionWithDefaultValue5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24125 "TestExampleInterface", "passUnionWithDefaultValue5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24127( cx, "TestExampleInterface"
, "passUnionWithDefaultValue5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24126 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24127( cx, "TestExampleInterface"
, "passUnionWithDefaultValue5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24127 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24127( cx, "TestExampleInterface"
, "passUnionWithDefaultValue5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24128
24129 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24130 FloatOrString arg0;
24131 if (!(args.hasDefined(0))) {
24132 arg0.RawSetAsFloat() = 1.0F;
24133 } else {
24134 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24135 return false;
24136 }
24137 }
24138 // NOTE: This assert does NOT call the function.
24139 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue5(Constify(arg0)))>, "Should be returning void here");
24140 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue5(Constify(arg0));
24141 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24141); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24141; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24142 args.rval().setUndefined();
24143 return true;
24144}
24145
24146static const JSJitInfo passUnionWithDefaultValue5_methodinfo = {
24147 { (JSJitGetterOp)passUnionWithDefaultValue5 },
24148 { prototypes::id::TestExampleInterface },
24149 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24150 JSJitInfo::Method,
24151 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24152 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24153 false, /* isInfallible. False in setters. */
24154 false, /* isMovable. Not relevant for setters. */
24155 false, /* isEliminatable. Not relevant for setters. */
24156 false, /* isAlwaysInSlot. Only relevant for getters. */
24157 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24158 false, /* isTypedMethod. Only relevant for methods. */
24159 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24160};
24161
24162MOZ_CAN_RUN_SCRIPT static bool
24163passUnionWithDefaultValue6(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24164{
24165 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue6");
24166 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24169( cx, "TestExampleInterface"
, "passUnionWithDefaultValue6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24167 "TestExampleInterface", "passUnionWithDefaultValue6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24169( cx, "TestExampleInterface"
, "passUnionWithDefaultValue6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24168 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24169( cx, "TestExampleInterface"
, "passUnionWithDefaultValue6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24169 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24169( cx, "TestExampleInterface"
, "passUnionWithDefaultValue6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24170
24171 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24172 FloatOrString arg0;
24173 if (!(args.hasDefined(0))) {
24174 arg0.RawSetAsFloat() = 1.5F;
24175 } else {
24176 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24177 return false;
24178 }
24179 }
24180 // NOTE: This assert does NOT call the function.
24181 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue6(Constify(arg0)))>, "Should be returning void here");
24182 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue6(Constify(arg0));
24183 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24183); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24183; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24184 args.rval().setUndefined();
24185 return true;
24186}
24187
24188static const JSJitInfo passUnionWithDefaultValue6_methodinfo = {
24189 { (JSJitGetterOp)passUnionWithDefaultValue6 },
24190 { prototypes::id::TestExampleInterface },
24191 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24192 JSJitInfo::Method,
24193 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24194 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24195 false, /* isInfallible. False in setters. */
24196 false, /* isMovable. Not relevant for setters. */
24197 false, /* isEliminatable. Not relevant for setters. */
24198 false, /* isAlwaysInSlot. Only relevant for getters. */
24199 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24200 false, /* isTypedMethod. Only relevant for methods. */
24201 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24202};
24203
24204MOZ_CAN_RUN_SCRIPT static bool
24205passUnionWithDefaultValue7(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24206{
24207 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue7");
24208 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24211( cx, "TestExampleInterface"
, "passUnionWithDefaultValue7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24209 "TestExampleInterface", "passUnionWithDefaultValue7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24211( cx, "TestExampleInterface"
, "passUnionWithDefaultValue7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24210 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24211( cx, "TestExampleInterface"
, "passUnionWithDefaultValue7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24211 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24211( cx, "TestExampleInterface"
, "passUnionWithDefaultValue7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24212
24213 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24214 UnrestrictedDoubleOrString arg0;
24215 if (!(args.hasDefined(0))) {
24216 arg0.SetStringLiteral(u"");
24217 } else {
24218 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24219 return false;
24220 }
24221 }
24222 // NOTE: This assert does NOT call the function.
24223 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue7(Constify(arg0)))>, "Should be returning void here");
24224 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue7(Constify(arg0));
24225 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24225); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24225; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24226 args.rval().setUndefined();
24227 return true;
24228}
24229
24230static const JSJitInfo passUnionWithDefaultValue7_methodinfo = {
24231 { (JSJitGetterOp)passUnionWithDefaultValue7 },
24232 { prototypes::id::TestExampleInterface },
24233 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24234 JSJitInfo::Method,
24235 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24236 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24237 false, /* isInfallible. False in setters. */
24238 false, /* isMovable. Not relevant for setters. */
24239 false, /* isEliminatable. Not relevant for setters. */
24240 false, /* isAlwaysInSlot. Only relevant for getters. */
24241 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24242 false, /* isTypedMethod. Only relevant for methods. */
24243 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24244};
24245
24246MOZ_CAN_RUN_SCRIPT static bool
24247passUnionWithDefaultValue8(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24248{
24249 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue8");
24250 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24253( cx, "TestExampleInterface"
, "passUnionWithDefaultValue8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24251 "TestExampleInterface", "passUnionWithDefaultValue8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24253( cx, "TestExampleInterface"
, "passUnionWithDefaultValue8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24252 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24253( cx, "TestExampleInterface"
, "passUnionWithDefaultValue8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24253 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24253( cx, "TestExampleInterface"
, "passUnionWithDefaultValue8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24254
24255 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24256 UnrestrictedDoubleOrString arg0;
24257 if (!(args.hasDefined(0))) {
24258 arg0.RawSetAsUnrestrictedDouble() = 1.0;
24259 } else {
24260 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24261 return false;
24262 }
24263 }
24264 // NOTE: This assert does NOT call the function.
24265 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue8(Constify(arg0)))>, "Should be returning void here");
24266 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue8(Constify(arg0));
24267 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24267); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24267; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24268 args.rval().setUndefined();
24269 return true;
24270}
24271
24272static const JSJitInfo passUnionWithDefaultValue8_methodinfo = {
24273 { (JSJitGetterOp)passUnionWithDefaultValue8 },
24274 { prototypes::id::TestExampleInterface },
24275 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24276 JSJitInfo::Method,
24277 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24278 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24279 false, /* isInfallible. False in setters. */
24280 false, /* isMovable. Not relevant for setters. */
24281 false, /* isEliminatable. Not relevant for setters. */
24282 false, /* isAlwaysInSlot. Only relevant for getters. */
24283 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24284 false, /* isTypedMethod. Only relevant for methods. */
24285 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24286};
24287
24288MOZ_CAN_RUN_SCRIPT static bool
24289passUnionWithDefaultValue9(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24290{
24291 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue9");
24292 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24295( cx, "TestExampleInterface"
, "passUnionWithDefaultValue9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24293 "TestExampleInterface", "passUnionWithDefaultValue9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24295( cx, "TestExampleInterface"
, "passUnionWithDefaultValue9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24294 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24295( cx, "TestExampleInterface"
, "passUnionWithDefaultValue9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24295 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24295( cx, "TestExampleInterface"
, "passUnionWithDefaultValue9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24296
24297 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24298 UnrestrictedDoubleOrString arg0;
24299 if (!(args.hasDefined(0))) {
24300 arg0.RawSetAsUnrestrictedDouble() = 1.5;
24301 } else {
24302 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24303 return false;
24304 }
24305 }
24306 // NOTE: This assert does NOT call the function.
24307 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue9(Constify(arg0)))>, "Should be returning void here");
24308 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue9(Constify(arg0));
24309 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24309); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24309; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24310 args.rval().setUndefined();
24311 return true;
24312}
24313
24314static const JSJitInfo passUnionWithDefaultValue9_methodinfo = {
24315 { (JSJitGetterOp)passUnionWithDefaultValue9 },
24316 { prototypes::id::TestExampleInterface },
24317 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24318 JSJitInfo::Method,
24319 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24320 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24321 false, /* isInfallible. False in setters. */
24322 false, /* isMovable. Not relevant for setters. */
24323 false, /* isEliminatable. Not relevant for setters. */
24324 false, /* isAlwaysInSlot. Only relevant for getters. */
24325 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24326 false, /* isTypedMethod. Only relevant for methods. */
24327 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24328};
24329
24330MOZ_CAN_RUN_SCRIPT static bool
24331passUnionWithDefaultValue10(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24332{
24333 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue10");
24334 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24337( cx, "TestExampleInterface"
, "passUnionWithDefaultValue10", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24335 "TestExampleInterface", "passUnionWithDefaultValue10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24337( cx, "TestExampleInterface"
, "passUnionWithDefaultValue10", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24336 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24337( cx, "TestExampleInterface"
, "passUnionWithDefaultValue10", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24337 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24337( cx, "TestExampleInterface"
, "passUnionWithDefaultValue10", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24338
24339 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24340 UnrestrictedDoubleOrString arg0;
24341 if (!(args.hasDefined(0))) {
24342 arg0.RawSetAsUnrestrictedDouble() = mozilla::PositiveInfinity<double>();
24343 } else {
24344 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24345 return false;
24346 }
24347 }
24348 // NOTE: This assert does NOT call the function.
24349 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue10(Constify(arg0)))>, "Should be returning void here");
24350 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue10(Constify(arg0));
24351 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24351); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24351; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24352 args.rval().setUndefined();
24353 return true;
24354}
24355
24356static const JSJitInfo passUnionWithDefaultValue10_methodinfo = {
24357 { (JSJitGetterOp)passUnionWithDefaultValue10 },
24358 { prototypes::id::TestExampleInterface },
24359 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24360 JSJitInfo::Method,
24361 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24362 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24363 false, /* isInfallible. False in setters. */
24364 false, /* isMovable. Not relevant for setters. */
24365 false, /* isEliminatable. Not relevant for setters. */
24366 false, /* isAlwaysInSlot. Only relevant for getters. */
24367 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24368 false, /* isTypedMethod. Only relevant for methods. */
24369 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24370};
24371
24372MOZ_CAN_RUN_SCRIPT static bool
24373passUnionWithDefaultValue11(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24374{
24375 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue11");
24376 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24379( cx, "TestExampleInterface"
, "passUnionWithDefaultValue11", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24377 "TestExampleInterface", "passUnionWithDefaultValue11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24379( cx, "TestExampleInterface"
, "passUnionWithDefaultValue11", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24378 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24379( cx, "TestExampleInterface"
, "passUnionWithDefaultValue11", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24379 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24379( cx, "TestExampleInterface"
, "passUnionWithDefaultValue11", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24380
24381 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24382 UnrestrictedFloatOrString arg0;
24383 if (!(args.hasDefined(0))) {
24384 arg0.SetStringLiteral(u"");
24385 } else {
24386 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24387 return false;
24388 }
24389 }
24390 // NOTE: This assert does NOT call the function.
24391 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue11(Constify(arg0)))>, "Should be returning void here");
24392 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue11(Constify(arg0));
24393 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24393); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24393; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24394 args.rval().setUndefined();
24395 return true;
24396}
24397
24398static const JSJitInfo passUnionWithDefaultValue11_methodinfo = {
24399 { (JSJitGetterOp)passUnionWithDefaultValue11 },
24400 { prototypes::id::TestExampleInterface },
24401 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24402 JSJitInfo::Method,
24403 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24404 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24405 false, /* isInfallible. False in setters. */
24406 false, /* isMovable. Not relevant for setters. */
24407 false, /* isEliminatable. Not relevant for setters. */
24408 false, /* isAlwaysInSlot. Only relevant for getters. */
24409 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24410 false, /* isTypedMethod. Only relevant for methods. */
24411 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24412};
24413
24414MOZ_CAN_RUN_SCRIPT static bool
24415passUnionWithDefaultValue12(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24416{
24417 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue12");
24418 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24421( cx, "TestExampleInterface"
, "passUnionWithDefaultValue12", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24419 "TestExampleInterface", "passUnionWithDefaultValue12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24421( cx, "TestExampleInterface"
, "passUnionWithDefaultValue12", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24420 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24421( cx, "TestExampleInterface"
, "passUnionWithDefaultValue12", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24421 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24421( cx, "TestExampleInterface"
, "passUnionWithDefaultValue12", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24422
24423 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24424 UnrestrictedFloatOrString arg0;
24425 if (!(args.hasDefined(0))) {
24426 arg0.RawSetAsUnrestrictedFloat() = 1.0F;
24427 } else {
24428 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24429 return false;
24430 }
24431 }
24432 // NOTE: This assert does NOT call the function.
24433 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue12(Constify(arg0)))>, "Should be returning void here");
24434 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue12(Constify(arg0));
24435 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24435); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24435; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24436 args.rval().setUndefined();
24437 return true;
24438}
24439
24440static const JSJitInfo passUnionWithDefaultValue12_methodinfo = {
24441 { (JSJitGetterOp)passUnionWithDefaultValue12 },
24442 { prototypes::id::TestExampleInterface },
24443 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24444 JSJitInfo::Method,
24445 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24446 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24447 false, /* isInfallible. False in setters. */
24448 false, /* isMovable. Not relevant for setters. */
24449 false, /* isEliminatable. Not relevant for setters. */
24450 false, /* isAlwaysInSlot. Only relevant for getters. */
24451 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24452 false, /* isTypedMethod. Only relevant for methods. */
24453 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24454};
24455
24456MOZ_CAN_RUN_SCRIPT static bool
24457passUnionWithDefaultValue13(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24458{
24459 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue13");
24460 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24463( cx, "TestExampleInterface"
, "passUnionWithDefaultValue13", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24461 "TestExampleInterface", "passUnionWithDefaultValue13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24463( cx, "TestExampleInterface"
, "passUnionWithDefaultValue13", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24462 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24463( cx, "TestExampleInterface"
, "passUnionWithDefaultValue13", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24463 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24463( cx, "TestExampleInterface"
, "passUnionWithDefaultValue13", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24464
24465 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24466 UnrestrictedFloatOrString arg0;
24467 if (!(args.hasDefined(0))) {
24468 arg0.RawSetAsUnrestrictedFloat() = mozilla::PositiveInfinity<float>();
24469 } else {
24470 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24471 return false;
24472 }
24473 }
24474 // NOTE: This assert does NOT call the function.
24475 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue13(Constify(arg0)))>, "Should be returning void here");
24476 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue13(Constify(arg0));
24477 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24477); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24477; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24478 args.rval().setUndefined();
24479 return true;
24480}
24481
24482static const JSJitInfo passUnionWithDefaultValue13_methodinfo = {
24483 { (JSJitGetterOp)passUnionWithDefaultValue13 },
24484 { prototypes::id::TestExampleInterface },
24485 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24486 JSJitInfo::Method,
24487 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24488 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24489 false, /* isInfallible. False in setters. */
24490 false, /* isMovable. Not relevant for setters. */
24491 false, /* isEliminatable. Not relevant for setters. */
24492 false, /* isAlwaysInSlot. Only relevant for getters. */
24493 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24494 false, /* isTypedMethod. Only relevant for methods. */
24495 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24496};
24497
24498MOZ_CAN_RUN_SCRIPT static bool
24499passUnionWithDefaultValue14(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24500{
24501 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue14");
24502 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24505( cx, "TestExampleInterface"
, "passUnionWithDefaultValue14", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24503 "TestExampleInterface", "passUnionWithDefaultValue14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24505( cx, "TestExampleInterface"
, "passUnionWithDefaultValue14", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24504 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24505( cx, "TestExampleInterface"
, "passUnionWithDefaultValue14", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24505 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24505( cx, "TestExampleInterface"
, "passUnionWithDefaultValue14", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24506
24507 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24508 DoubleOrByteString arg0;
24509 if (!(args.hasDefined(0))) {
24510 arg0.SetStringLiteral("");
24511 } else {
24512 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24513 return false;
24514 }
24515 }
24516 // NOTE: This assert does NOT call the function.
24517 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue14(Constify(arg0)))>, "Should be returning void here");
24518 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue14(Constify(arg0));
24519 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24519); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24519; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24520 args.rval().setUndefined();
24521 return true;
24522}
24523
24524static const JSJitInfo passUnionWithDefaultValue14_methodinfo = {
24525 { (JSJitGetterOp)passUnionWithDefaultValue14 },
24526 { prototypes::id::TestExampleInterface },
24527 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24528 JSJitInfo::Method,
24529 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24530 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24531 false, /* isInfallible. False in setters. */
24532 false, /* isMovable. Not relevant for setters. */
24533 false, /* isEliminatable. Not relevant for setters. */
24534 false, /* isAlwaysInSlot. Only relevant for getters. */
24535 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24536 false, /* isTypedMethod. Only relevant for methods. */
24537 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24538};
24539
24540MOZ_CAN_RUN_SCRIPT static bool
24541passUnionWithDefaultValue15(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24542{
24543 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue15");
24544 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24547( cx, "TestExampleInterface"
, "passUnionWithDefaultValue15", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24545 "TestExampleInterface", "passUnionWithDefaultValue15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24547( cx, "TestExampleInterface"
, "passUnionWithDefaultValue15", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24546 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24547( cx, "TestExampleInterface"
, "passUnionWithDefaultValue15", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24547 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24547( cx, "TestExampleInterface"
, "passUnionWithDefaultValue15", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24548
24549 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24550 DoubleOrByteString arg0;
24551 if (!(args.hasDefined(0))) {
24552 arg0.RawSetAsDouble() = 1.0;
24553 } else {
24554 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24555 return false;
24556 }
24557 }
24558 // NOTE: This assert does NOT call the function.
24559 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue15(Constify(arg0)))>, "Should be returning void here");
24560 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue15(Constify(arg0));
24561 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24561); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24561; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24562 args.rval().setUndefined();
24563 return true;
24564}
24565
24566static const JSJitInfo passUnionWithDefaultValue15_methodinfo = {
24567 { (JSJitGetterOp)passUnionWithDefaultValue15 },
24568 { prototypes::id::TestExampleInterface },
24569 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24570 JSJitInfo::Method,
24571 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24572 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24573 false, /* isInfallible. False in setters. */
24574 false, /* isMovable. Not relevant for setters. */
24575 false, /* isEliminatable. Not relevant for setters. */
24576 false, /* isAlwaysInSlot. Only relevant for getters. */
24577 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24578 false, /* isTypedMethod. Only relevant for methods. */
24579 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24580};
24581
24582MOZ_CAN_RUN_SCRIPT static bool
24583passUnionWithDefaultValue16(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24584{
24585 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue16");
24586 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24589( cx, "TestExampleInterface"
, "passUnionWithDefaultValue16", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24587 "TestExampleInterface", "passUnionWithDefaultValue16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24589( cx, "TestExampleInterface"
, "passUnionWithDefaultValue16", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24588 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24589( cx, "TestExampleInterface"
, "passUnionWithDefaultValue16", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24589 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24589( cx, "TestExampleInterface"
, "passUnionWithDefaultValue16", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24590
24591 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24592 DoubleOrByteString arg0;
24593 if (!(args.hasDefined(0))) {
24594 arg0.RawSetAsDouble() = 1.5;
24595 } else {
24596 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24597 return false;
24598 }
24599 }
24600 // NOTE: This assert does NOT call the function.
24601 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue16(Constify(arg0)))>, "Should be returning void here");
24602 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue16(Constify(arg0));
24603 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24603); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24603; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24604 args.rval().setUndefined();
24605 return true;
24606}
24607
24608static const JSJitInfo passUnionWithDefaultValue16_methodinfo = {
24609 { (JSJitGetterOp)passUnionWithDefaultValue16 },
24610 { prototypes::id::TestExampleInterface },
24611 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24612 JSJitInfo::Method,
24613 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24614 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24615 false, /* isInfallible. False in setters. */
24616 false, /* isMovable. Not relevant for setters. */
24617 false, /* isEliminatable. Not relevant for setters. */
24618 false, /* isAlwaysInSlot. Only relevant for getters. */
24619 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24620 false, /* isTypedMethod. Only relevant for methods. */
24621 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24622};
24623
24624MOZ_CAN_RUN_SCRIPT static bool
24625passUnionWithDefaultValue17(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24626{
24627 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue17");
24628 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24631( cx, "TestExampleInterface"
, "passUnionWithDefaultValue17", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24629 "TestExampleInterface", "passUnionWithDefaultValue17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24631( cx, "TestExampleInterface"
, "passUnionWithDefaultValue17", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24630 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24631( cx, "TestExampleInterface"
, "passUnionWithDefaultValue17", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24631 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24631( cx, "TestExampleInterface"
, "passUnionWithDefaultValue17", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24632
24633 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24634 DoubleOrSupportedType arg0;
24635 if (!(args.hasDefined(0))) {
24636 arg0.RawSetAsSupportedType() = SupportedType::Text_html;
24637 } else {
24638 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24639 return false;
24640 }
24641 }
24642 // NOTE: This assert does NOT call the function.
24643 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue17(Constify(arg0)))>, "Should be returning void here");
24644 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue17(Constify(arg0));
24645 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24645); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24645; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24646 args.rval().setUndefined();
24647 return true;
24648}
24649
24650static const JSJitInfo passUnionWithDefaultValue17_methodinfo = {
24651 { (JSJitGetterOp)passUnionWithDefaultValue17 },
24652 { prototypes::id::TestExampleInterface },
24653 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24654 JSJitInfo::Method,
24655 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24656 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24657 false, /* isInfallible. False in setters. */
24658 false, /* isMovable. Not relevant for setters. */
24659 false, /* isEliminatable. Not relevant for setters. */
24660 false, /* isAlwaysInSlot. Only relevant for getters. */
24661 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24662 false, /* isTypedMethod. Only relevant for methods. */
24663 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24664};
24665
24666MOZ_CAN_RUN_SCRIPT static bool
24667passUnionWithDefaultValue18(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24668{
24669 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue18");
24670 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24673( cx, "TestExampleInterface"
, "passUnionWithDefaultValue18", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24671 "TestExampleInterface", "passUnionWithDefaultValue18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24673( cx, "TestExampleInterface"
, "passUnionWithDefaultValue18", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24672 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24673( cx, "TestExampleInterface"
, "passUnionWithDefaultValue18", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24673 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24673( cx, "TestExampleInterface"
, "passUnionWithDefaultValue18", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24674
24675 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24676 DoubleOrSupportedType arg0;
24677 if (!(args.hasDefined(0))) {
24678 arg0.RawSetAsDouble() = 1.0;
24679 } else {
24680 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24681 return false;
24682 }
24683 }
24684 // NOTE: This assert does NOT call the function.
24685 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue18(Constify(arg0)))>, "Should be returning void here");
24686 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue18(Constify(arg0));
24687 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24687); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24687; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24688 args.rval().setUndefined();
24689 return true;
24690}
24691
24692static const JSJitInfo passUnionWithDefaultValue18_methodinfo = {
24693 { (JSJitGetterOp)passUnionWithDefaultValue18 },
24694 { prototypes::id::TestExampleInterface },
24695 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24696 JSJitInfo::Method,
24697 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24698 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24699 false, /* isInfallible. False in setters. */
24700 false, /* isMovable. Not relevant for setters. */
24701 false, /* isEliminatable. Not relevant for setters. */
24702 false, /* isAlwaysInSlot. Only relevant for getters. */
24703 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24704 false, /* isTypedMethod. Only relevant for methods. */
24705 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24706};
24707
24708MOZ_CAN_RUN_SCRIPT static bool
24709passUnionWithDefaultValue19(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24710{
24711 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue19");
24712 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24715( cx, "TestExampleInterface"
, "passUnionWithDefaultValue19", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24713 "TestExampleInterface", "passUnionWithDefaultValue19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24715( cx, "TestExampleInterface"
, "passUnionWithDefaultValue19", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24714 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24715( cx, "TestExampleInterface"
, "passUnionWithDefaultValue19", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24715 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24715( cx, "TestExampleInterface"
, "passUnionWithDefaultValue19", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24716
24717 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24718 DoubleOrSupportedType arg0;
24719 if (!(args.hasDefined(0))) {
24720 arg0.RawSetAsDouble() = 1.5;
24721 } else {
24722 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24723 return false;
24724 }
24725 }
24726 // NOTE: This assert does NOT call the function.
24727 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue19(Constify(arg0)))>, "Should be returning void here");
24728 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue19(Constify(arg0));
24729 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24729); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24729; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24730 args.rval().setUndefined();
24731 return true;
24732}
24733
24734static const JSJitInfo passUnionWithDefaultValue19_methodinfo = {
24735 { (JSJitGetterOp)passUnionWithDefaultValue19 },
24736 { prototypes::id::TestExampleInterface },
24737 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24738 JSJitInfo::Method,
24739 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24740 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24741 false, /* isInfallible. False in setters. */
24742 false, /* isMovable. Not relevant for setters. */
24743 false, /* isEliminatable. Not relevant for setters. */
24744 false, /* isAlwaysInSlot. Only relevant for getters. */
24745 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24746 false, /* isTypedMethod. Only relevant for methods. */
24747 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24748};
24749
24750MOZ_CAN_RUN_SCRIPT static bool
24751passUnionWithDefaultValue20(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24752{
24753 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue20");
24754 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24757( cx, "TestExampleInterface"
, "passUnionWithDefaultValue20", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24755 "TestExampleInterface", "passUnionWithDefaultValue20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24757( cx, "TestExampleInterface"
, "passUnionWithDefaultValue20", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24756 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24757( cx, "TestExampleInterface"
, "passUnionWithDefaultValue20", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24757 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24757( cx, "TestExampleInterface"
, "passUnionWithDefaultValue20", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24758
24759 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24760 DoubleOrUSVString arg0;
24761 if (!(args.hasDefined(0))) {
24762 arg0.SetStringLiteral(u"abc");
24763 } else {
24764 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24765 return false;
24766 }
24767 }
24768 // NOTE: This assert does NOT call the function.
24769 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue20(Constify(arg0)))>, "Should be returning void here");
24770 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue20(Constify(arg0));
24771 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24771); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24771; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24772 args.rval().setUndefined();
24773 return true;
24774}
24775
24776static const JSJitInfo passUnionWithDefaultValue20_methodinfo = {
24777 { (JSJitGetterOp)passUnionWithDefaultValue20 },
24778 { prototypes::id::TestExampleInterface },
24779 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24780 JSJitInfo::Method,
24781 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24782 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24783 false, /* isInfallible. False in setters. */
24784 false, /* isMovable. Not relevant for setters. */
24785 false, /* isEliminatable. Not relevant for setters. */
24786 false, /* isAlwaysInSlot. Only relevant for getters. */
24787 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24788 false, /* isTypedMethod. Only relevant for methods. */
24789 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24790};
24791
24792MOZ_CAN_RUN_SCRIPT static bool
24793passUnionWithDefaultValue21(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24794{
24795 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue21");
24796 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24799( cx, "TestExampleInterface"
, "passUnionWithDefaultValue21", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24797 "TestExampleInterface", "passUnionWithDefaultValue21", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24799( cx, "TestExampleInterface"
, "passUnionWithDefaultValue21", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24798 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24799( cx, "TestExampleInterface"
, "passUnionWithDefaultValue21", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24799 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24799( cx, "TestExampleInterface"
, "passUnionWithDefaultValue21", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24800
24801 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24802 DoubleOrUSVString arg0;
24803 if (!(args.hasDefined(0))) {
24804 arg0.RawSetAsDouble() = 1.0;
24805 } else {
24806 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24807 return false;
24808 }
24809 }
24810 // NOTE: This assert does NOT call the function.
24811 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue21(Constify(arg0)))>, "Should be returning void here");
24812 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue21(Constify(arg0));
24813 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24813); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24813; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24814 args.rval().setUndefined();
24815 return true;
24816}
24817
24818static const JSJitInfo passUnionWithDefaultValue21_methodinfo = {
24819 { (JSJitGetterOp)passUnionWithDefaultValue21 },
24820 { prototypes::id::TestExampleInterface },
24821 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24822 JSJitInfo::Method,
24823 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24824 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24825 false, /* isInfallible. False in setters. */
24826 false, /* isMovable. Not relevant for setters. */
24827 false, /* isEliminatable. Not relevant for setters. */
24828 false, /* isAlwaysInSlot. Only relevant for getters. */
24829 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24830 false, /* isTypedMethod. Only relevant for methods. */
24831 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24832};
24833
24834MOZ_CAN_RUN_SCRIPT static bool
24835passUnionWithDefaultValue22(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24836{
24837 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue22");
24838 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24841( cx, "TestExampleInterface"
, "passUnionWithDefaultValue22", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24839 "TestExampleInterface", "passUnionWithDefaultValue22", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24841( cx, "TestExampleInterface"
, "passUnionWithDefaultValue22", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24840 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24841( cx, "TestExampleInterface"
, "passUnionWithDefaultValue22", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24841 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24841( cx, "TestExampleInterface"
, "passUnionWithDefaultValue22", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24842
24843 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24844 DoubleOrUSVString arg0;
24845 if (!(args.hasDefined(0))) {
24846 arg0.RawSetAsDouble() = 1.5;
24847 } else {
24848 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24849 return false;
24850 }
24851 }
24852 // NOTE: This assert does NOT call the function.
24853 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue22(Constify(arg0)))>, "Should be returning void here");
24854 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue22(Constify(arg0));
24855 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24855); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24855; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24856 args.rval().setUndefined();
24857 return true;
24858}
24859
24860static const JSJitInfo passUnionWithDefaultValue22_methodinfo = {
24861 { (JSJitGetterOp)passUnionWithDefaultValue22 },
24862 { prototypes::id::TestExampleInterface },
24863 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24864 JSJitInfo::Method,
24865 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24866 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24867 false, /* isInfallible. False in setters. */
24868 false, /* isMovable. Not relevant for setters. */
24869 false, /* isEliminatable. Not relevant for setters. */
24870 false, /* isAlwaysInSlot. Only relevant for getters. */
24871 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24872 false, /* isTypedMethod. Only relevant for methods. */
24873 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24874};
24875
24876MOZ_CAN_RUN_SCRIPT static bool
24877passUnionWithDefaultValue23(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24878{
24879 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue23");
24880 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24883( cx, "TestExampleInterface"
, "passUnionWithDefaultValue23", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24881 "TestExampleInterface", "passUnionWithDefaultValue23", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24883( cx, "TestExampleInterface"
, "passUnionWithDefaultValue23", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24882 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24883( cx, "TestExampleInterface"
, "passUnionWithDefaultValue23", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24883 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24883( cx, "TestExampleInterface"
, "passUnionWithDefaultValue23", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24884
24885 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24886 DoubleOrUTF8String arg0;
24887 if (!(args.hasDefined(0))) {
24888 arg0.SetStringLiteral("");
24889 } else {
24890 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24891 return false;
24892 }
24893 }
24894 // NOTE: This assert does NOT call the function.
24895 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue23(Constify(arg0)))>, "Should be returning void here");
24896 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue23(Constify(arg0));
24897 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24897); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24897; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24898 args.rval().setUndefined();
24899 return true;
24900}
24901
24902static const JSJitInfo passUnionWithDefaultValue23_methodinfo = {
24903 { (JSJitGetterOp)passUnionWithDefaultValue23 },
24904 { prototypes::id::TestExampleInterface },
24905 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24906 JSJitInfo::Method,
24907 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24908 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24909 false, /* isInfallible. False in setters. */
24910 false, /* isMovable. Not relevant for setters. */
24911 false, /* isEliminatable. Not relevant for setters. */
24912 false, /* isAlwaysInSlot. Only relevant for getters. */
24913 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24914 false, /* isTypedMethod. Only relevant for methods. */
24915 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24916};
24917
24918MOZ_CAN_RUN_SCRIPT static bool
24919passUnionWithDefaultValue24(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24920{
24921 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue24");
24922 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24925( cx, "TestExampleInterface"
, "passUnionWithDefaultValue24", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24923 "TestExampleInterface", "passUnionWithDefaultValue24", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24925( cx, "TestExampleInterface"
, "passUnionWithDefaultValue24", 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::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24925( cx, "TestExampleInterface"
, "passUnionWithDefaultValue24", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24925 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24925( cx, "TestExampleInterface"
, "passUnionWithDefaultValue24", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24926
24927 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24928 DoubleOrUTF8String arg0;
24929 if (!(args.hasDefined(0))) {
24930 arg0.RawSetAsDouble() = 1.0;
24931 } else {
24932 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24933 return false;
24934 }
24935 }
24936 // NOTE: This assert does NOT call the function.
24937 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue24(Constify(arg0)))>, "Should be returning void here");
24938 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue24(Constify(arg0));
24939 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24939); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24939; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24940 args.rval().setUndefined();
24941 return true;
24942}
24943
24944static const JSJitInfo passUnionWithDefaultValue24_methodinfo = {
24945 { (JSJitGetterOp)passUnionWithDefaultValue24 },
24946 { prototypes::id::TestExampleInterface },
24947 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24948 JSJitInfo::Method,
24949 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24950 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24951 false, /* isInfallible. False in setters. */
24952 false, /* isMovable. Not relevant for setters. */
24953 false, /* isEliminatable. Not relevant for setters. */
24954 false, /* isAlwaysInSlot. Only relevant for getters. */
24955 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24956 false, /* isTypedMethod. Only relevant for methods. */
24957 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24958};
24959
24960MOZ_CAN_RUN_SCRIPT static bool
24961passUnionWithDefaultValue25(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24962{
24963 BindingCallContext cx(cx_, "TestExampleInterface.passUnionWithDefaultValue25");
24964 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24967( cx, "TestExampleInterface"
, "passUnionWithDefaultValue25", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24965 "TestExampleInterface", "passUnionWithDefaultValue25", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24967( cx, "TestExampleInterface"
, "passUnionWithDefaultValue25", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24966 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24967( cx, "TestExampleInterface"
, "passUnionWithDefaultValue25", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24967 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24967( cx, "TestExampleInterface"
, "passUnionWithDefaultValue25", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24968
24969 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
24970 DoubleOrUTF8String arg0;
24971 if (!(args.hasDefined(0))) {
24972 arg0.RawSetAsDouble() = 1.5;
24973 } else {
24974 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
24975 return false;
24976 }
24977 }
24978 // NOTE: This assert does NOT call the function.
24979 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue25(Constify(arg0)))>, "Should be returning void here");
24980 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue25(Constify(arg0));
24981 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 24981); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24981; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24982 args.rval().setUndefined();
24983 return true;
24984}
24985
24986static const JSJitInfo passUnionWithDefaultValue25_methodinfo = {
24987 { (JSJitGetterOp)passUnionWithDefaultValue25 },
24988 { prototypes::id::TestExampleInterface },
24989 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
24990 JSJitInfo::Method,
24991 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24992 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24993 false, /* isInfallible. False in setters. */
24994 false, /* isMovable. Not relevant for setters. */
24995 false, /* isEliminatable. Not relevant for setters. */
24996 false, /* isAlwaysInSlot. Only relevant for getters. */
24997 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24998 false, /* isTypedMethod. Only relevant for methods. */
24999 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25000};
25001
25002MOZ_CAN_RUN_SCRIPT static bool
25003passNullableUnionWithDefaultValue1(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25004{
25005 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue1");
25006 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25009( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue1", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25007 "TestExampleInterface", "passNullableUnionWithDefaultValue1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25009( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue1", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25008 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25009( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue1", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25009 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25009( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue1", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25010
25011 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25012 Nullable<DoubleOrString > arg0;
25013 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25014 arg0.SetNull();
25015 } else {
25016 if (!(args.hasDefined(0))) {
25017 arg0.SetValue().SetStringLiteral(u"");
25018 } else {
25019 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25020 return false;
25021 }
25022 }
25023 }
25024 // NOTE: This assert does NOT call the function.
25025 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue1(Constify(arg0)))>, "Should be returning void here");
25026 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue1(Constify(arg0));
25027 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25027); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25027; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25028 args.rval().setUndefined();
25029 return true;
25030}
25031
25032static const JSJitInfo passNullableUnionWithDefaultValue1_methodinfo = {
25033 { (JSJitGetterOp)passNullableUnionWithDefaultValue1 },
25034 { prototypes::id::TestExampleInterface },
25035 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25036 JSJitInfo::Method,
25037 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25038 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25039 false, /* isInfallible. False in setters. */
25040 false, /* isMovable. Not relevant for setters. */
25041 false, /* isEliminatable. Not relevant for setters. */
25042 false, /* isAlwaysInSlot. Only relevant for getters. */
25043 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25044 false, /* isTypedMethod. Only relevant for methods. */
25045 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25046};
25047
25048MOZ_CAN_RUN_SCRIPT static bool
25049passNullableUnionWithDefaultValue2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25050{
25051 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue2");
25052 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25055( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25053 "TestExampleInterface", "passNullableUnionWithDefaultValue2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25055( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25054 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25055( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25055 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25055( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25056
25057 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25058 Nullable<DoubleOrString > arg0;
25059 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25060 arg0.SetNull();
25061 } else {
25062 if (!(args.hasDefined(0))) {
25063 arg0.SetValue().RawSetAsDouble() = 1.0;
25064 } else {
25065 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25066 return false;
25067 }
25068 }
25069 }
25070 // NOTE: This assert does NOT call the function.
25071 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue2(Constify(arg0)))>, "Should be returning void here");
25072 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue2(Constify(arg0));
25073 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25073); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25073; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25074 args.rval().setUndefined();
25075 return true;
25076}
25077
25078static const JSJitInfo passNullableUnionWithDefaultValue2_methodinfo = {
25079 { (JSJitGetterOp)passNullableUnionWithDefaultValue2 },
25080 { prototypes::id::TestExampleInterface },
25081 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25082 JSJitInfo::Method,
25083 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25084 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25085 false, /* isInfallible. False in setters. */
25086 false, /* isMovable. Not relevant for setters. */
25087 false, /* isEliminatable. Not relevant for setters. */
25088 false, /* isAlwaysInSlot. Only relevant for getters. */
25089 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25090 false, /* isTypedMethod. Only relevant for methods. */
25091 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25092};
25093
25094MOZ_CAN_RUN_SCRIPT static bool
25095passNullableUnionWithDefaultValue3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25096{
25097 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue3");
25098 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25101( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue3", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25099 "TestExampleInterface", "passNullableUnionWithDefaultValue3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25101( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue3", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25100 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25101( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue3", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25101 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25101( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue3", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25102
25103 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25104 Nullable<DoubleOrString > arg0;
25105 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
25106 arg0.SetNull();
25107 } else {
25108 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25109 return false;
25110 }
25111 }
25112 // NOTE: This assert does NOT call the function.
25113 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue3(Constify(arg0)))>, "Should be returning void here");
25114 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue3(Constify(arg0));
25115 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25115); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25115; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25116 args.rval().setUndefined();
25117 return true;
25118}
25119
25120static const JSJitInfo passNullableUnionWithDefaultValue3_methodinfo = {
25121 { (JSJitGetterOp)passNullableUnionWithDefaultValue3 },
25122 { prototypes::id::TestExampleInterface },
25123 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25124 JSJitInfo::Method,
25125 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25126 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25127 false, /* isInfallible. False in setters. */
25128 false, /* isMovable. Not relevant for setters. */
25129 false, /* isEliminatable. Not relevant for setters. */
25130 false, /* isAlwaysInSlot. Only relevant for getters. */
25131 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25132 false, /* isTypedMethod. Only relevant for methods. */
25133 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25134};
25135
25136MOZ_CAN_RUN_SCRIPT static bool
25137passNullableUnionWithDefaultValue4(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25138{
25139 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue4");
25140 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25143( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue4", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25141 "TestExampleInterface", "passNullableUnionWithDefaultValue4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25143( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue4", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25142 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25143( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue4", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25143 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25143( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue4", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25144
25145 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25146 Nullable<FloatOrString > arg0;
25147 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25148 arg0.SetNull();
25149 } else {
25150 if (!(args.hasDefined(0))) {
25151 arg0.SetValue().SetStringLiteral(u"");
25152 } else {
25153 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25154 return false;
25155 }
25156 }
25157 }
25158 // NOTE: This assert does NOT call the function.
25159 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue4(Constify(arg0)))>, "Should be returning void here");
25160 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue4(Constify(arg0));
25161 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25161); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25161; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25162 args.rval().setUndefined();
25163 return true;
25164}
25165
25166static const JSJitInfo passNullableUnionWithDefaultValue4_methodinfo = {
25167 { (JSJitGetterOp)passNullableUnionWithDefaultValue4 },
25168 { prototypes::id::TestExampleInterface },
25169 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25170 JSJitInfo::Method,
25171 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25172 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25173 false, /* isInfallible. False in setters. */
25174 false, /* isMovable. Not relevant for setters. */
25175 false, /* isEliminatable. Not relevant for setters. */
25176 false, /* isAlwaysInSlot. Only relevant for getters. */
25177 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25178 false, /* isTypedMethod. Only relevant for methods. */
25179 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25180};
25181
25182MOZ_CAN_RUN_SCRIPT static bool
25183passNullableUnionWithDefaultValue5(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25184{
25185 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue5");
25186 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25189( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue5", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25187 "TestExampleInterface", "passNullableUnionWithDefaultValue5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25189( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue5", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25188 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25189( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue5", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25189 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25189( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue5", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25190
25191 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25192 Nullable<FloatOrString > arg0;
25193 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25194 arg0.SetNull();
25195 } else {
25196 if (!(args.hasDefined(0))) {
25197 arg0.SetValue().RawSetAsFloat() = 1.0F;
25198 } else {
25199 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25200 return false;
25201 }
25202 }
25203 }
25204 // NOTE: This assert does NOT call the function.
25205 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue5(Constify(arg0)))>, "Should be returning void here");
25206 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue5(Constify(arg0));
25207 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25207); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25207; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25208 args.rval().setUndefined();
25209 return true;
25210}
25211
25212static const JSJitInfo passNullableUnionWithDefaultValue5_methodinfo = {
25213 { (JSJitGetterOp)passNullableUnionWithDefaultValue5 },
25214 { prototypes::id::TestExampleInterface },
25215 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25216 JSJitInfo::Method,
25217 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25218 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25219 false, /* isInfallible. False in setters. */
25220 false, /* isMovable. Not relevant for setters. */
25221 false, /* isEliminatable. Not relevant for setters. */
25222 false, /* isAlwaysInSlot. Only relevant for getters. */
25223 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25224 false, /* isTypedMethod. Only relevant for methods. */
25225 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25226};
25227
25228MOZ_CAN_RUN_SCRIPT static bool
25229passNullableUnionWithDefaultValue6(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25230{
25231 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue6");
25232 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25235( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue6", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25233 "TestExampleInterface", "passNullableUnionWithDefaultValue6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25235( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue6", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25234 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25235( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue6", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25235 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25235( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue6", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25236
25237 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25238 Nullable<FloatOrString > arg0;
25239 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
25240 arg0.SetNull();
25241 } else {
25242 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25243 return false;
25244 }
25245 }
25246 // NOTE: This assert does NOT call the function.
25247 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue6(Constify(arg0)))>, "Should be returning void here");
25248 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue6(Constify(arg0));
25249 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25249); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25249; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25250 args.rval().setUndefined();
25251 return true;
25252}
25253
25254static const JSJitInfo passNullableUnionWithDefaultValue6_methodinfo = {
25255 { (JSJitGetterOp)passNullableUnionWithDefaultValue6 },
25256 { prototypes::id::TestExampleInterface },
25257 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25258 JSJitInfo::Method,
25259 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25260 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25261 false, /* isInfallible. False in setters. */
25262 false, /* isMovable. Not relevant for setters. */
25263 false, /* isEliminatable. Not relevant for setters. */
25264 false, /* isAlwaysInSlot. Only relevant for getters. */
25265 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25266 false, /* isTypedMethod. Only relevant for methods. */
25267 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25268};
25269
25270MOZ_CAN_RUN_SCRIPT static bool
25271passNullableUnionWithDefaultValue7(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25272{
25273 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue7");
25274 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25277( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue7", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25275 "TestExampleInterface", "passNullableUnionWithDefaultValue7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25277( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue7", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25276 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25277( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue7", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25277 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25277( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue7", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25278
25279 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25280 Nullable<UnrestrictedDoubleOrString > arg0;
25281 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25282 arg0.SetNull();
25283 } else {
25284 if (!(args.hasDefined(0))) {
25285 arg0.SetValue().SetStringLiteral(u"");
25286 } else {
25287 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25288 return false;
25289 }
25290 }
25291 }
25292 // NOTE: This assert does NOT call the function.
25293 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue7(Constify(arg0)))>, "Should be returning void here");
25294 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue7(Constify(arg0));
25295 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25295); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25295; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25296 args.rval().setUndefined();
25297 return true;
25298}
25299
25300static const JSJitInfo passNullableUnionWithDefaultValue7_methodinfo = {
25301 { (JSJitGetterOp)passNullableUnionWithDefaultValue7 },
25302 { prototypes::id::TestExampleInterface },
25303 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25304 JSJitInfo::Method,
25305 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25306 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25307 false, /* isInfallible. False in setters. */
25308 false, /* isMovable. Not relevant for setters. */
25309 false, /* isEliminatable. Not relevant for setters. */
25310 false, /* isAlwaysInSlot. Only relevant for getters. */
25311 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25312 false, /* isTypedMethod. Only relevant for methods. */
25313 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25314};
25315
25316MOZ_CAN_RUN_SCRIPT static bool
25317passNullableUnionWithDefaultValue8(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25318{
25319 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue8");
25320 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25323( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue8", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25321 "TestExampleInterface", "passNullableUnionWithDefaultValue8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25323( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue8", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25322 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25323( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue8", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25323 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25323( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue8", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25324
25325 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25326 Nullable<UnrestrictedDoubleOrString > arg0;
25327 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25328 arg0.SetNull();
25329 } else {
25330 if (!(args.hasDefined(0))) {
25331 arg0.SetValue().RawSetAsUnrestrictedDouble() = 1.0;
25332 } else {
25333 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25334 return false;
25335 }
25336 }
25337 }
25338 // NOTE: This assert does NOT call the function.
25339 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue8(Constify(arg0)))>, "Should be returning void here");
25340 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue8(Constify(arg0));
25341 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25341); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25341; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25342 args.rval().setUndefined();
25343 return true;
25344}
25345
25346static const JSJitInfo passNullableUnionWithDefaultValue8_methodinfo = {
25347 { (JSJitGetterOp)passNullableUnionWithDefaultValue8 },
25348 { prototypes::id::TestExampleInterface },
25349 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25350 JSJitInfo::Method,
25351 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25352 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25353 false, /* isInfallible. False in setters. */
25354 false, /* isMovable. Not relevant for setters. */
25355 false, /* isEliminatable. Not relevant for setters. */
25356 false, /* isAlwaysInSlot. Only relevant for getters. */
25357 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25358 false, /* isTypedMethod. Only relevant for methods. */
25359 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25360};
25361
25362MOZ_CAN_RUN_SCRIPT static bool
25363passNullableUnionWithDefaultValue9(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25364{
25365 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue9");
25366 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25369( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue9", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25367 "TestExampleInterface", "passNullableUnionWithDefaultValue9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25369( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue9", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25368 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25369( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue9", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25369 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25369( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue9", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25370
25371 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25372 Nullable<UnrestrictedDoubleOrString > arg0;
25373 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
25374 arg0.SetNull();
25375 } else {
25376 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25377 return false;
25378 }
25379 }
25380 // NOTE: This assert does NOT call the function.
25381 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue9(Constify(arg0)))>, "Should be returning void here");
25382 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue9(Constify(arg0));
25383 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25383); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25383; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25384 args.rval().setUndefined();
25385 return true;
25386}
25387
25388static const JSJitInfo passNullableUnionWithDefaultValue9_methodinfo = {
25389 { (JSJitGetterOp)passNullableUnionWithDefaultValue9 },
25390 { prototypes::id::TestExampleInterface },
25391 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25392 JSJitInfo::Method,
25393 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25394 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25395 false, /* isInfallible. False in setters. */
25396 false, /* isMovable. Not relevant for setters. */
25397 false, /* isEliminatable. Not relevant for setters. */
25398 false, /* isAlwaysInSlot. Only relevant for getters. */
25399 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25400 false, /* isTypedMethod. Only relevant for methods. */
25401 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25402};
25403
25404MOZ_CAN_RUN_SCRIPT static bool
25405passNullableUnionWithDefaultValue10(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25406{
25407 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue10");
25408 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25411( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue10", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25409 "TestExampleInterface", "passNullableUnionWithDefaultValue10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25411( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue10", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25410 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25411( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue10", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25411 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25411( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue10", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25412
25413 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25414 Nullable<UnrestrictedFloatOrString > arg0;
25415 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25416 arg0.SetNull();
25417 } else {
25418 if (!(args.hasDefined(0))) {
25419 arg0.SetValue().SetStringLiteral(u"");
25420 } else {
25421 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25422 return false;
25423 }
25424 }
25425 }
25426 // NOTE: This assert does NOT call the function.
25427 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue10(Constify(arg0)))>, "Should be returning void here");
25428 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue10(Constify(arg0));
25429 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25429); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25429; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25430 args.rval().setUndefined();
25431 return true;
25432}
25433
25434static const JSJitInfo passNullableUnionWithDefaultValue10_methodinfo = {
25435 { (JSJitGetterOp)passNullableUnionWithDefaultValue10 },
25436 { prototypes::id::TestExampleInterface },
25437 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25438 JSJitInfo::Method,
25439 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25440 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25441 false, /* isInfallible. False in setters. */
25442 false, /* isMovable. Not relevant for setters. */
25443 false, /* isEliminatable. Not relevant for setters. */
25444 false, /* isAlwaysInSlot. Only relevant for getters. */
25445 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25446 false, /* isTypedMethod. Only relevant for methods. */
25447 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25448};
25449
25450MOZ_CAN_RUN_SCRIPT static bool
25451passNullableUnionWithDefaultValue11(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25452{
25453 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue11");
25454 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25457( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue11", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25455 "TestExampleInterface", "passNullableUnionWithDefaultValue11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25457( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue11", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25456 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25457( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue11", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25457 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25457( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue11", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25458
25459 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25460 Nullable<UnrestrictedFloatOrString > arg0;
25461 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25462 arg0.SetNull();
25463 } else {
25464 if (!(args.hasDefined(0))) {
25465 arg0.SetValue().RawSetAsUnrestrictedFloat() = 1.0F;
25466 } else {
25467 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25468 return false;
25469 }
25470 }
25471 }
25472 // NOTE: This assert does NOT call the function.
25473 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue11(Constify(arg0)))>, "Should be returning void here");
25474 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue11(Constify(arg0));
25475 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25475); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25475; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25476 args.rval().setUndefined();
25477 return true;
25478}
25479
25480static const JSJitInfo passNullableUnionWithDefaultValue11_methodinfo = {
25481 { (JSJitGetterOp)passNullableUnionWithDefaultValue11 },
25482 { prototypes::id::TestExampleInterface },
25483 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25484 JSJitInfo::Method,
25485 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25486 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25487 false, /* isInfallible. False in setters. */
25488 false, /* isMovable. Not relevant for setters. */
25489 false, /* isEliminatable. Not relevant for setters. */
25490 false, /* isAlwaysInSlot. Only relevant for getters. */
25491 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25492 false, /* isTypedMethod. Only relevant for methods. */
25493 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25494};
25495
25496MOZ_CAN_RUN_SCRIPT static bool
25497passNullableUnionWithDefaultValue12(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25498{
25499 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue12");
25500 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25503( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue12", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25501 "TestExampleInterface", "passNullableUnionWithDefaultValue12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25503( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue12", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25502 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25503( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue12", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25503 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25503( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue12", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25504
25505 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25506 Nullable<UnrestrictedFloatOrString > arg0;
25507 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
25508 arg0.SetNull();
25509 } else {
25510 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25511 return false;
25512 }
25513 }
25514 // NOTE: This assert does NOT call the function.
25515 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue12(Constify(arg0)))>, "Should be returning void here");
25516 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue12(Constify(arg0));
25517 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25517); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25517; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25518 args.rval().setUndefined();
25519 return true;
25520}
25521
25522static const JSJitInfo passNullableUnionWithDefaultValue12_methodinfo = {
25523 { (JSJitGetterOp)passNullableUnionWithDefaultValue12 },
25524 { prototypes::id::TestExampleInterface },
25525 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25526 JSJitInfo::Method,
25527 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25528 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25529 false, /* isInfallible. False in setters. */
25530 false, /* isMovable. Not relevant for setters. */
25531 false, /* isEliminatable. Not relevant for setters. */
25532 false, /* isAlwaysInSlot. Only relevant for getters. */
25533 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25534 false, /* isTypedMethod. Only relevant for methods. */
25535 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25536};
25537
25538MOZ_CAN_RUN_SCRIPT static bool
25539passNullableUnionWithDefaultValue13(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25540{
25541 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue13");
25542 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25545( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue13", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25543 "TestExampleInterface", "passNullableUnionWithDefaultValue13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25545( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue13", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25544 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25545( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue13", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25545 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25545( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue13", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25546
25547 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25548 Nullable<DoubleOrByteString > arg0;
25549 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25550 arg0.SetNull();
25551 } else {
25552 if (!(args.hasDefined(0))) {
25553 arg0.SetValue().SetStringLiteral("");
25554 } else {
25555 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25556 return false;
25557 }
25558 }
25559 }
25560 // NOTE: This assert does NOT call the function.
25561 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue13(Constify(arg0)))>, "Should be returning void here");
25562 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue13(Constify(arg0));
25563 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25563); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25563; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25564 args.rval().setUndefined();
25565 return true;
25566}
25567
25568static const JSJitInfo passNullableUnionWithDefaultValue13_methodinfo = {
25569 { (JSJitGetterOp)passNullableUnionWithDefaultValue13 },
25570 { prototypes::id::TestExampleInterface },
25571 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25572 JSJitInfo::Method,
25573 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25574 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25575 false, /* isInfallible. False in setters. */
25576 false, /* isMovable. Not relevant for setters. */
25577 false, /* isEliminatable. Not relevant for setters. */
25578 false, /* isAlwaysInSlot. Only relevant for getters. */
25579 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25580 false, /* isTypedMethod. Only relevant for methods. */
25581 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25582};
25583
25584MOZ_CAN_RUN_SCRIPT static bool
25585passNullableUnionWithDefaultValue14(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25586{
25587 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue14");
25588 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25591( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue14", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25589 "TestExampleInterface", "passNullableUnionWithDefaultValue14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25591( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue14", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25590 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25591( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue14", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25591 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25591( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue14", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25592
25593 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25594 Nullable<DoubleOrByteString > arg0;
25595 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25596 arg0.SetNull();
25597 } else {
25598 if (!(args.hasDefined(0))) {
25599 arg0.SetValue().RawSetAsDouble() = 1.0;
25600 } else {
25601 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25602 return false;
25603 }
25604 }
25605 }
25606 // NOTE: This assert does NOT call the function.
25607 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue14(Constify(arg0)))>, "Should be returning void here");
25608 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue14(Constify(arg0));
25609 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25609); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25609; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25610 args.rval().setUndefined();
25611 return true;
25612}
25613
25614static const JSJitInfo passNullableUnionWithDefaultValue14_methodinfo = {
25615 { (JSJitGetterOp)passNullableUnionWithDefaultValue14 },
25616 { prototypes::id::TestExampleInterface },
25617 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25618 JSJitInfo::Method,
25619 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25620 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25621 false, /* isInfallible. False in setters. */
25622 false, /* isMovable. Not relevant for setters. */
25623 false, /* isEliminatable. Not relevant for setters. */
25624 false, /* isAlwaysInSlot. Only relevant for getters. */
25625 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25626 false, /* isTypedMethod. Only relevant for methods. */
25627 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25628};
25629
25630MOZ_CAN_RUN_SCRIPT static bool
25631passNullableUnionWithDefaultValue15(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25632{
25633 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue15");
25634 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25637( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue15", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25635 "TestExampleInterface", "passNullableUnionWithDefaultValue15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25637( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue15", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25636 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25637( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue15", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25637 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25637( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue15", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25638
25639 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25640 Nullable<DoubleOrByteString > arg0;
25641 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25642 arg0.SetNull();
25643 } else {
25644 if (!(args.hasDefined(0))) {
25645 arg0.SetValue().RawSetAsDouble() = 1.5;
25646 } else {
25647 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25648 return false;
25649 }
25650 }
25651 }
25652 // NOTE: This assert does NOT call the function.
25653 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue15(Constify(arg0)))>, "Should be returning void here");
25654 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue15(Constify(arg0));
25655 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25655); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25655; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25656 args.rval().setUndefined();
25657 return true;
25658}
25659
25660static const JSJitInfo passNullableUnionWithDefaultValue15_methodinfo = {
25661 { (JSJitGetterOp)passNullableUnionWithDefaultValue15 },
25662 { prototypes::id::TestExampleInterface },
25663 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25664 JSJitInfo::Method,
25665 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25666 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25667 false, /* isInfallible. False in setters. */
25668 false, /* isMovable. Not relevant for setters. */
25669 false, /* isEliminatable. Not relevant for setters. */
25670 false, /* isAlwaysInSlot. Only relevant for getters. */
25671 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25672 false, /* isTypedMethod. Only relevant for methods. */
25673 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25674};
25675
25676MOZ_CAN_RUN_SCRIPT static bool
25677passNullableUnionWithDefaultValue16(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25678{
25679 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue16");
25680 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25683( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue16", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25681 "TestExampleInterface", "passNullableUnionWithDefaultValue16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25683( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue16", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25682 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25683( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue16", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25683 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25683( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue16", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25684
25685 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25686 Nullable<DoubleOrByteString > arg0;
25687 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
25688 arg0.SetNull();
25689 } else {
25690 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25691 return false;
25692 }
25693 }
25694 // NOTE: This assert does NOT call the function.
25695 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue16(Constify(arg0)))>, "Should be returning void here");
25696 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue16(Constify(arg0));
25697 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25697); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25697; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25698 args.rval().setUndefined();
25699 return true;
25700}
25701
25702static const JSJitInfo passNullableUnionWithDefaultValue16_methodinfo = {
25703 { (JSJitGetterOp)passNullableUnionWithDefaultValue16 },
25704 { prototypes::id::TestExampleInterface },
25705 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25706 JSJitInfo::Method,
25707 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25708 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25709 false, /* isInfallible. False in setters. */
25710 false, /* isMovable. Not relevant for setters. */
25711 false, /* isEliminatable. Not relevant for setters. */
25712 false, /* isAlwaysInSlot. Only relevant for getters. */
25713 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25714 false, /* isTypedMethod. Only relevant for methods. */
25715 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25716};
25717
25718MOZ_CAN_RUN_SCRIPT static bool
25719passNullableUnionWithDefaultValue17(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25720{
25721 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue17");
25722 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25725( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue17", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25723 "TestExampleInterface", "passNullableUnionWithDefaultValue17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25725( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue17", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25724 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25725( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue17", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25725 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25725( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue17", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25726
25727 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25728 Nullable<DoubleOrSupportedType > arg0;
25729 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25730 arg0.SetNull();
25731 } else {
25732 if (!(args.hasDefined(0))) {
25733 arg0.SetValue().RawSetAsSupportedType() = SupportedType::Text_html;
25734 } else {
25735 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25736 return false;
25737 }
25738 }
25739 }
25740 // NOTE: This assert does NOT call the function.
25741 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue17(Constify(arg0)))>, "Should be returning void here");
25742 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue17(Constify(arg0));
25743 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25743); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25743; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25744 args.rval().setUndefined();
25745 return true;
25746}
25747
25748static const JSJitInfo passNullableUnionWithDefaultValue17_methodinfo = {
25749 { (JSJitGetterOp)passNullableUnionWithDefaultValue17 },
25750 { prototypes::id::TestExampleInterface },
25751 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25752 JSJitInfo::Method,
25753 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25754 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25755 false, /* isInfallible. False in setters. */
25756 false, /* isMovable. Not relevant for setters. */
25757 false, /* isEliminatable. Not relevant for setters. */
25758 false, /* isAlwaysInSlot. Only relevant for getters. */
25759 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25760 false, /* isTypedMethod. Only relevant for methods. */
25761 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25762};
25763
25764MOZ_CAN_RUN_SCRIPT static bool
25765passNullableUnionWithDefaultValue18(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25766{
25767 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue18");
25768 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25771( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue18", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25769 "TestExampleInterface", "passNullableUnionWithDefaultValue18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25771( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue18", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25770 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25771( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue18", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25771 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25771( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue18", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25772
25773 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25774 Nullable<DoubleOrSupportedType > arg0;
25775 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25776 arg0.SetNull();
25777 } else {
25778 if (!(args.hasDefined(0))) {
25779 arg0.SetValue().RawSetAsDouble() = 1.0;
25780 } else {
25781 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25782 return false;
25783 }
25784 }
25785 }
25786 // NOTE: This assert does NOT call the function.
25787 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue18(Constify(arg0)))>, "Should be returning void here");
25788 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue18(Constify(arg0));
25789 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25789); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25789; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25790 args.rval().setUndefined();
25791 return true;
25792}
25793
25794static const JSJitInfo passNullableUnionWithDefaultValue18_methodinfo = {
25795 { (JSJitGetterOp)passNullableUnionWithDefaultValue18 },
25796 { prototypes::id::TestExampleInterface },
25797 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25798 JSJitInfo::Method,
25799 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25800 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25801 false, /* isInfallible. False in setters. */
25802 false, /* isMovable. Not relevant for setters. */
25803 false, /* isEliminatable. Not relevant for setters. */
25804 false, /* isAlwaysInSlot. Only relevant for getters. */
25805 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25806 false, /* isTypedMethod. Only relevant for methods. */
25807 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25808};
25809
25810MOZ_CAN_RUN_SCRIPT static bool
25811passNullableUnionWithDefaultValue19(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25812{
25813 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue19");
25814 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25817( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue19", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25815 "TestExampleInterface", "passNullableUnionWithDefaultValue19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25817( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue19", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25816 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25817( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue19", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25817 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25817( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue19", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25818
25819 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25820 Nullable<DoubleOrSupportedType > arg0;
25821 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25822 arg0.SetNull();
25823 } else {
25824 if (!(args.hasDefined(0))) {
25825 arg0.SetValue().RawSetAsDouble() = 1.5;
25826 } else {
25827 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25828 return false;
25829 }
25830 }
25831 }
25832 // NOTE: This assert does NOT call the function.
25833 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue19(Constify(arg0)))>, "Should be returning void here");
25834 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue19(Constify(arg0));
25835 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25835); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25835; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25836 args.rval().setUndefined();
25837 return true;
25838}
25839
25840static const JSJitInfo passNullableUnionWithDefaultValue19_methodinfo = {
25841 { (JSJitGetterOp)passNullableUnionWithDefaultValue19 },
25842 { prototypes::id::TestExampleInterface },
25843 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25844 JSJitInfo::Method,
25845 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25846 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25847 false, /* isInfallible. False in setters. */
25848 false, /* isMovable. Not relevant for setters. */
25849 false, /* isEliminatable. Not relevant for setters. */
25850 false, /* isAlwaysInSlot. Only relevant for getters. */
25851 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25852 false, /* isTypedMethod. Only relevant for methods. */
25853 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25854};
25855
25856MOZ_CAN_RUN_SCRIPT static bool
25857passNullableUnionWithDefaultValue20(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25858{
25859 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue20");
25860 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25863( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue20", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25861 "TestExampleInterface", "passNullableUnionWithDefaultValue20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25863( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue20", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25862 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25863( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue20", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25863 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25863( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue20", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25864
25865 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25866 Nullable<DoubleOrSupportedType > arg0;
25867 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
25868 arg0.SetNull();
25869 } else {
25870 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25871 return false;
25872 }
25873 }
25874 // NOTE: This assert does NOT call the function.
25875 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue20(Constify(arg0)))>, "Should be returning void here");
25876 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue20(Constify(arg0));
25877 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25877); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25877; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25878 args.rval().setUndefined();
25879 return true;
25880}
25881
25882static const JSJitInfo passNullableUnionWithDefaultValue20_methodinfo = {
25883 { (JSJitGetterOp)passNullableUnionWithDefaultValue20 },
25884 { prototypes::id::TestExampleInterface },
25885 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25886 JSJitInfo::Method,
25887 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25888 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25889 false, /* isInfallible. False in setters. */
25890 false, /* isMovable. Not relevant for setters. */
25891 false, /* isEliminatable. Not relevant for setters. */
25892 false, /* isAlwaysInSlot. Only relevant for getters. */
25893 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25894 false, /* isTypedMethod. Only relevant for methods. */
25895 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25896};
25897
25898MOZ_CAN_RUN_SCRIPT static bool
25899passNullableUnionWithDefaultValue21(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25900{
25901 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue21");
25902 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25905( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue21", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25903 "TestExampleInterface", "passNullableUnionWithDefaultValue21", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25905( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue21", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25904 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25905( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue21", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25905 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25905( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue21", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25906
25907 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25908 Nullable<DoubleOrUSVString > arg0;
25909 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25910 arg0.SetNull();
25911 } else {
25912 if (!(args.hasDefined(0))) {
25913 arg0.SetValue().SetStringLiteral(u"abc");
25914 } else {
25915 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25916 return false;
25917 }
25918 }
25919 }
25920 // NOTE: This assert does NOT call the function.
25921 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue21(Constify(arg0)))>, "Should be returning void here");
25922 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue21(Constify(arg0));
25923 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25923); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25923; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25924 args.rval().setUndefined();
25925 return true;
25926}
25927
25928static const JSJitInfo passNullableUnionWithDefaultValue21_methodinfo = {
25929 { (JSJitGetterOp)passNullableUnionWithDefaultValue21 },
25930 { prototypes::id::TestExampleInterface },
25931 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25932 JSJitInfo::Method,
25933 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25934 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25935 false, /* isInfallible. False in setters. */
25936 false, /* isMovable. Not relevant for setters. */
25937 false, /* isEliminatable. Not relevant for setters. */
25938 false, /* isAlwaysInSlot. Only relevant for getters. */
25939 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25940 false, /* isTypedMethod. Only relevant for methods. */
25941 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25942};
25943
25944MOZ_CAN_RUN_SCRIPT static bool
25945passNullableUnionWithDefaultValue22(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25946{
25947 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue22");
25948 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25951( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue22", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25949 "TestExampleInterface", "passNullableUnionWithDefaultValue22", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25951( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue22", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25950 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25951( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue22", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25951 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25951( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue22", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25952
25953 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
25954 Nullable<DoubleOrUSVString > arg0;
25955 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
25956 arg0.SetNull();
25957 } else {
25958 if (!(args.hasDefined(0))) {
25959 arg0.SetValue().RawSetAsDouble() = 1.0;
25960 } else {
25961 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
25962 return false;
25963 }
25964 }
25965 }
25966 // NOTE: This assert does NOT call the function.
25967 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue22(Constify(arg0)))>, "Should be returning void here");
25968 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue22(Constify(arg0));
25969 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 25969); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25969; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25970 args.rval().setUndefined();
25971 return true;
25972}
25973
25974static const JSJitInfo passNullableUnionWithDefaultValue22_methodinfo = {
25975 { (JSJitGetterOp)passNullableUnionWithDefaultValue22 },
25976 { prototypes::id::TestExampleInterface },
25977 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
25978 JSJitInfo::Method,
25979 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25980 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25981 false, /* isInfallible. False in setters. */
25982 false, /* isMovable. Not relevant for setters. */
25983 false, /* isEliminatable. Not relevant for setters. */
25984 false, /* isAlwaysInSlot. Only relevant for getters. */
25985 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25986 false, /* isTypedMethod. Only relevant for methods. */
25987 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25988};
25989
25990MOZ_CAN_RUN_SCRIPT static bool
25991passNullableUnionWithDefaultValue23(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25992{
25993 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue23");
25994 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25997( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue23", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25995 "TestExampleInterface", "passNullableUnionWithDefaultValue23", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25997( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue23", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25996 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25997( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue23", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25997 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25997( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue23", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25998
25999 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26000 Nullable<DoubleOrUSVString > arg0;
26001 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
26002 arg0.SetNull();
26003 } else {
26004 if (!(args.hasDefined(0))) {
26005 arg0.SetValue().RawSetAsDouble() = 1.5;
26006 } else {
26007 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
26008 return false;
26009 }
26010 }
26011 }
26012 // NOTE: This assert does NOT call the function.
26013 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue23(Constify(arg0)))>, "Should be returning void here");
26014 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue23(Constify(arg0));
26015 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26015); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26015; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26016 args.rval().setUndefined();
26017 return true;
26018}
26019
26020static const JSJitInfo passNullableUnionWithDefaultValue23_methodinfo = {
26021 { (JSJitGetterOp)passNullableUnionWithDefaultValue23 },
26022 { prototypes::id::TestExampleInterface },
26023 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26024 JSJitInfo::Method,
26025 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26026 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26027 false, /* isInfallible. False in setters. */
26028 false, /* isMovable. Not relevant for setters. */
26029 false, /* isEliminatable. Not relevant for setters. */
26030 false, /* isAlwaysInSlot. Only relevant for getters. */
26031 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26032 false, /* isTypedMethod. Only relevant for methods. */
26033 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26034};
26035
26036MOZ_CAN_RUN_SCRIPT static bool
26037passNullableUnionWithDefaultValue24(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26038{
26039 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue24");
26040 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26043( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue24", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26041 "TestExampleInterface", "passNullableUnionWithDefaultValue24", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26043( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue24", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26042 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26043( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue24", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26043 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26043( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue24", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26044
26045 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26046 Nullable<DoubleOrUSVString > arg0;
26047 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
26048 arg0.SetNull();
26049 } else {
26050 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
26051 return false;
26052 }
26053 }
26054 // NOTE: This assert does NOT call the function.
26055 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue24(Constify(arg0)))>, "Should be returning void here");
26056 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue24(Constify(arg0));
26057 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26057); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26057; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26058 args.rval().setUndefined();
26059 return true;
26060}
26061
26062static const JSJitInfo passNullableUnionWithDefaultValue24_methodinfo = {
26063 { (JSJitGetterOp)passNullableUnionWithDefaultValue24 },
26064 { prototypes::id::TestExampleInterface },
26065 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26066 JSJitInfo::Method,
26067 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26068 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26069 false, /* isInfallible. False in setters. */
26070 false, /* isMovable. Not relevant for setters. */
26071 false, /* isEliminatable. Not relevant for setters. */
26072 false, /* isAlwaysInSlot. Only relevant for getters. */
26073 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26074 false, /* isTypedMethod. Only relevant for methods. */
26075 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26076};
26077
26078MOZ_CAN_RUN_SCRIPT static bool
26079passNullableUnionWithDefaultValue25(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26080{
26081 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue25");
26082 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26085( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue25", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26083 "TestExampleInterface", "passNullableUnionWithDefaultValue25", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26085( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue25", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26084 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26085( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue25", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26085 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26085( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue25", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26086
26087 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26088 Nullable<DoubleOrUTF8String > arg0;
26089 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
26090 arg0.SetNull();
26091 } else {
26092 if (!(args.hasDefined(0))) {
26093 arg0.SetValue().SetStringLiteral("");
26094 } else {
26095 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
26096 return false;
26097 }
26098 }
26099 }
26100 // NOTE: This assert does NOT call the function.
26101 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue25(Constify(arg0)))>, "Should be returning void here");
26102 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue25(Constify(arg0));
26103 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26103); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26103; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26104 args.rval().setUndefined();
26105 return true;
26106}
26107
26108static const JSJitInfo passNullableUnionWithDefaultValue25_methodinfo = {
26109 { (JSJitGetterOp)passNullableUnionWithDefaultValue25 },
26110 { prototypes::id::TestExampleInterface },
26111 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26112 JSJitInfo::Method,
26113 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26114 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26115 false, /* isInfallible. False in setters. */
26116 false, /* isMovable. Not relevant for setters. */
26117 false, /* isEliminatable. Not relevant for setters. */
26118 false, /* isAlwaysInSlot. Only relevant for getters. */
26119 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26120 false, /* isTypedMethod. Only relevant for methods. */
26121 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26122};
26123
26124MOZ_CAN_RUN_SCRIPT static bool
26125passNullableUnionWithDefaultValue26(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26126{
26127 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue26");
26128 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26131( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue26", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26129 "TestExampleInterface", "passNullableUnionWithDefaultValue26", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26131( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue26", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26130 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26131( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue26", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26131 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26131( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue26", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26132
26133 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26134 Nullable<DoubleOrUTF8String > arg0;
26135 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
26136 arg0.SetNull();
26137 } else {
26138 if (!(args.hasDefined(0))) {
26139 arg0.SetValue().RawSetAsDouble() = 1.0;
26140 } else {
26141 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
26142 return false;
26143 }
26144 }
26145 }
26146 // NOTE: This assert does NOT call the function.
26147 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue26(Constify(arg0)))>, "Should be returning void here");
26148 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue26(Constify(arg0));
26149 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26149); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26149; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26150 args.rval().setUndefined();
26151 return true;
26152}
26153
26154static const JSJitInfo passNullableUnionWithDefaultValue26_methodinfo = {
26155 { (JSJitGetterOp)passNullableUnionWithDefaultValue26 },
26156 { prototypes::id::TestExampleInterface },
26157 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26158 JSJitInfo::Method,
26159 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26160 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26161 false, /* isInfallible. False in setters. */
26162 false, /* isMovable. Not relevant for setters. */
26163 false, /* isEliminatable. Not relevant for setters. */
26164 false, /* isAlwaysInSlot. Only relevant for getters. */
26165 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26166 false, /* isTypedMethod. Only relevant for methods. */
26167 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26168};
26169
26170MOZ_CAN_RUN_SCRIPT static bool
26171passNullableUnionWithDefaultValue27(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26172{
26173 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue27");
26174 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26177( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue27", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26175 "TestExampleInterface", "passNullableUnionWithDefaultValue27", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26177( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue27", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26176 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26177( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue27", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26177 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26177( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue27", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26178
26179 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26180 Nullable<DoubleOrUTF8String > arg0;
26181 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
26182 arg0.SetNull();
26183 } else {
26184 if (!(args.hasDefined(0))) {
26185 arg0.SetValue().RawSetAsDouble() = 1.5;
26186 } else {
26187 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
26188 return false;
26189 }
26190 }
26191 }
26192 // NOTE: This assert does NOT call the function.
26193 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue27(Constify(arg0)))>, "Should be returning void here");
26194 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue27(Constify(arg0));
26195 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26195); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26195; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26196 args.rval().setUndefined();
26197 return true;
26198}
26199
26200static const JSJitInfo passNullableUnionWithDefaultValue27_methodinfo = {
26201 { (JSJitGetterOp)passNullableUnionWithDefaultValue27 },
26202 { prototypes::id::TestExampleInterface },
26203 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26204 JSJitInfo::Method,
26205 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26206 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26207 false, /* isInfallible. False in setters. */
26208 false, /* isMovable. Not relevant for setters. */
26209 false, /* isEliminatable. Not relevant for setters. */
26210 false, /* isAlwaysInSlot. Only relevant for getters. */
26211 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26212 false, /* isTypedMethod. Only relevant for methods. */
26213 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26214};
26215
26216MOZ_CAN_RUN_SCRIPT static bool
26217passNullableUnionWithDefaultValue28(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26218{
26219 BindingCallContext cx(cx_, "TestExampleInterface.passNullableUnionWithDefaultValue28");
26220 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26223( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue28", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26221 "TestExampleInterface", "passNullableUnionWithDefaultValue28", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26223( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue28", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26222 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26223( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue28", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26223 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26223( cx, "TestExampleInterface"
, "passNullableUnionWithDefaultValue28", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26224
26225 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26226 Nullable<DoubleOrUTF8String > arg0;
26227 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
26228 arg0.SetNull();
26229 } else {
26230 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", false)) {
26231 return false;
26232 }
26233 }
26234 // NOTE: This assert does NOT call the function.
26235 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue28(Constify(arg0)))>, "Should be returning void here");
26236 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue28(Constify(arg0));
26237 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26237); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26237; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26238 args.rval().setUndefined();
26239 return true;
26240}
26241
26242static const JSJitInfo passNullableUnionWithDefaultValue28_methodinfo = {
26243 { (JSJitGetterOp)passNullableUnionWithDefaultValue28 },
26244 { prototypes::id::TestExampleInterface },
26245 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26246 JSJitInfo::Method,
26247 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26248 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26249 false, /* isInfallible. False in setters. */
26250 false, /* isMovable. Not relevant for setters. */
26251 false, /* isEliminatable. Not relevant for setters. */
26252 false, /* isAlwaysInSlot. Only relevant for getters. */
26253 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26254 false, /* isTypedMethod. Only relevant for methods. */
26255 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26256};
26257
26258MOZ_CAN_RUN_SCRIPT static bool
26259passSequenceOfUnions(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26260{
26261 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfUnions");
26262 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26265( cx, "TestExampleInterface"
, "passSequenceOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26263 "TestExampleInterface", "passSequenceOfUnions", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26265( cx, "TestExampleInterface"
, "passSequenceOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26264 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26265( cx, "TestExampleInterface"
, "passSequenceOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26265 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26265( cx, "TestExampleInterface"
, "passSequenceOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26266
26267 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26268 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfUnions", 1)) {
26269 return false;
26270 }
26271 binding_detail::AutoSequence<OwningCanvasPatternOrCanvasGradient> arg0;
26272 if (args[0].isObject()) {
26273 JS::ForOfIterator iter(cx);
26274 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
26275 return false;
26276 }
26277 if (!iter.valueIsIterable()) {
26278 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
26279 return false;
26280 }
26281 binding_detail::AutoSequence<OwningCanvasPatternOrCanvasGradient> &arr = arg0;
26282 JS::Rooted<JS::Value> temp(cx);
26283 while (true) {
26284 bool done;
26285 if (!iter.next(&temp, &done)) {
26286 return false;
26287 }
26288 if (done) {
26289 break;
26290 }
26291 OwningCanvasPatternOrCanvasGradient* slotPtr = arr.AppendElement(mozilla::fallible);
26292 if (!slotPtr) {
26293 JS_ReportOutOfMemory(cx);
26294 return false;
26295 }
26296 OwningCanvasPatternOrCanvasGradient& slot = *slotPtr;
26297 if (!slot.Init(cx, temp, "Element of argument 1", false)) {
26298 return false;
26299 }
26300 }
26301 } else {
26302 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
26303 return false;
26304 }
26305 // NOTE: This assert does NOT call the function.
26306 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfUnions(Constify(arg0)))>, "Should be returning void here");
26307 MOZ_KnownLive(self)(self)->PassSequenceOfUnions(Constify(arg0));
26308 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26308); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26308; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26309 args.rval().setUndefined();
26310 return true;
26311}
26312
26313static const JSJitInfo passSequenceOfUnions_methodinfo = {
26314 { (JSJitGetterOp)passSequenceOfUnions },
26315 { prototypes::id::TestExampleInterface },
26316 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26317 JSJitInfo::Method,
26318 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26319 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26320 false, /* isInfallible. False in setters. */
26321 false, /* isMovable. Not relevant for setters. */
26322 false, /* isEliminatable. Not relevant for setters. */
26323 false, /* isAlwaysInSlot. Only relevant for getters. */
26324 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26325 false, /* isTypedMethod. Only relevant for methods. */
26326 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26327};
26328
26329MOZ_CAN_RUN_SCRIPT static bool
26330passSequenceOfUnions2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26331{
26332 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfUnions2");
26333 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26336( cx, "TestExampleInterface"
, "passSequenceOfUnions2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26334 "TestExampleInterface", "passSequenceOfUnions2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26336( cx, "TestExampleInterface"
, "passSequenceOfUnions2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26335 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26336( cx, "TestExampleInterface"
, "passSequenceOfUnions2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26336 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26336( cx, "TestExampleInterface"
, "passSequenceOfUnions2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26337
26338 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26339 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfUnions2", 1)) {
26340 return false;
26341 }
26342 binding_detail::AutoSequence<OwningObjectOrLong> arg0;
26343 SequenceRooter<OwningObjectOrLong> arg0_holder(cx, &arg0);
26344 if (args[0].isObject()) {
26345 JS::ForOfIterator iter(cx);
26346 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
26347 return false;
26348 }
26349 if (!iter.valueIsIterable()) {
26350 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
26351 return false;
26352 }
26353 binding_detail::AutoSequence<OwningObjectOrLong> &arr = arg0;
26354 JS::Rooted<JS::Value> temp(cx);
26355 while (true) {
26356 bool done;
26357 if (!iter.next(&temp, &done)) {
26358 return false;
26359 }
26360 if (done) {
26361 break;
26362 }
26363 OwningObjectOrLong* slotPtr = arr.AppendElement(mozilla::fallible);
26364 if (!slotPtr) {
26365 JS_ReportOutOfMemory(cx);
26366 return false;
26367 }
26368 OwningObjectOrLong& slot = *slotPtr;
26369 if (!slot.Init(cx, temp, "Element of argument 1", false)) {
26370 return false;
26371 }
26372 }
26373 } else {
26374 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
26375 return false;
26376 }
26377 // NOTE: This assert does NOT call the function.
26378 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfUnions2(cx, Constify(arg0)))>, "Should be returning void here");
26379 MOZ_KnownLive(self)(self)->PassSequenceOfUnions2(cx, Constify(arg0));
26380 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26380); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26380; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26381 args.rval().setUndefined();
26382 return true;
26383}
26384
26385static const JSJitInfo passSequenceOfUnions2_methodinfo = {
26386 { (JSJitGetterOp)passSequenceOfUnions2 },
26387 { prototypes::id::TestExampleInterface },
26388 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26389 JSJitInfo::Method,
26390 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26391 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26392 false, /* isInfallible. False in setters. */
26393 false, /* isMovable. Not relevant for setters. */
26394 false, /* isEliminatable. Not relevant for setters. */
26395 false, /* isAlwaysInSlot. Only relevant for getters. */
26396 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26397 false, /* isTypedMethod. Only relevant for methods. */
26398 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26399};
26400
26401MOZ_CAN_RUN_SCRIPT static bool
26402passVariadicUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26403{
26404 BindingCallContext cx(cx_, "TestExampleInterface.passVariadicUnion");
26405 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26408( cx, "TestExampleInterface"
, "passVariadicUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26406 "TestExampleInterface", "passVariadicUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26408( cx, "TestExampleInterface"
, "passVariadicUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26407 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26408( cx, "TestExampleInterface"
, "passVariadicUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26408 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26408( cx, "TestExampleInterface"
, "passVariadicUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26409
26410 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26411 AutoSequence<OwningCanvasPatternOrCanvasGradient> arg0;
26412 if (args.length() > 0) {
26413 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
26414 JS_ReportOutOfMemory(cx);
26415 return false;
26416 }
26417 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
26418 // OK to do infallible append here, since we ensured capacity already.
26419 OwningCanvasPatternOrCanvasGradient& slot = *arg0.AppendElement();
26420 if (!slot.Init(cx, args[variadicArg], "Argument 1", false)) {
26421 return false;
26422 }
26423 }
26424 }
26425 // NOTE: This assert does NOT call the function.
26426 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicUnion(Constify(arg0)))>, "Should be returning void here");
26427 MOZ_KnownLive(self)(self)->PassVariadicUnion(Constify(arg0));
26428 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26428); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26428; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26429 args.rval().setUndefined();
26430 return true;
26431}
26432
26433static const JSJitInfo passVariadicUnion_methodinfo = {
26434 { (JSJitGetterOp)passVariadicUnion },
26435 { prototypes::id::TestExampleInterface },
26436 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26437 JSJitInfo::Method,
26438 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26439 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26440 false, /* isInfallible. False in setters. */
26441 false, /* isMovable. Not relevant for setters. */
26442 false, /* isEliminatable. Not relevant for setters. */
26443 false, /* isAlwaysInSlot. Only relevant for getters. */
26444 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26445 false, /* isTypedMethod. Only relevant for methods. */
26446 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26447};
26448
26449MOZ_CAN_RUN_SCRIPT static bool
26450passSequenceOfNullableUnions(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26451{
26452 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfNullableUnions");
26453 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26456( cx, "TestExampleInterface"
, "passSequenceOfNullableUnions", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26454 "TestExampleInterface", "passSequenceOfNullableUnions", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26456( cx, "TestExampleInterface"
, "passSequenceOfNullableUnions", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26455 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26456( cx, "TestExampleInterface"
, "passSequenceOfNullableUnions", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26456 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26456( cx, "TestExampleInterface"
, "passSequenceOfNullableUnions", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26457
26458 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26459 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfNullableUnions", 1)) {
26460 return false;
26461 }
26462 binding_detail::AutoSequence<Nullable<OwningCanvasPatternOrCanvasGradient >> arg0;
26463 if (args[0].isObject()) {
26464 JS::ForOfIterator iter(cx);
26465 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
26466 return false;
26467 }
26468 if (!iter.valueIsIterable()) {
26469 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
26470 return false;
26471 }
26472 binding_detail::AutoSequence<Nullable<OwningCanvasPatternOrCanvasGradient >> &arr = arg0;
26473 JS::Rooted<JS::Value> temp(cx);
26474 while (true) {
26475 bool done;
26476 if (!iter.next(&temp, &done)) {
26477 return false;
26478 }
26479 if (done) {
26480 break;
26481 }
26482 Nullable<OwningCanvasPatternOrCanvasGradient >* slotPtr = arr.AppendElement(mozilla::fallible);
26483 if (!slotPtr) {
26484 JS_ReportOutOfMemory(cx);
26485 return false;
26486 }
26487 Nullable<OwningCanvasPatternOrCanvasGradient >& slot = *slotPtr;
26488 if (temp.isNullOrUndefined()) {
26489 slot.SetNull();
26490 } else {
26491 if (!slot.SetValue().Init(cx, temp, "Element of argument 1", false)) {
26492 return false;
26493 }
26494 }
26495 }
26496 } else {
26497 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
26498 return false;
26499 }
26500 // NOTE: This assert does NOT call the function.
26501 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableUnions(Constify(arg0)))>, "Should be returning void here");
26502 MOZ_KnownLive(self)(self)->PassSequenceOfNullableUnions(Constify(arg0));
26503 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26503); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26503; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26504 args.rval().setUndefined();
26505 return true;
26506}
26507
26508static const JSJitInfo passSequenceOfNullableUnions_methodinfo = {
26509 { (JSJitGetterOp)passSequenceOfNullableUnions },
26510 { prototypes::id::TestExampleInterface },
26511 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26512 JSJitInfo::Method,
26513 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26514 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26515 false, /* isInfallible. False in setters. */
26516 false, /* isMovable. Not relevant for setters. */
26517 false, /* isEliminatable. Not relevant for setters. */
26518 false, /* isAlwaysInSlot. Only relevant for getters. */
26519 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26520 false, /* isTypedMethod. Only relevant for methods. */
26521 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26522};
26523
26524MOZ_CAN_RUN_SCRIPT static bool
26525passVariadicNullableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26526{
26527 BindingCallContext cx(cx_, "TestExampleInterface.passVariadicNullableUnion");
26528 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26531( cx, "TestExampleInterface"
, "passVariadicNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26529 "TestExampleInterface", "passVariadicNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26531( cx, "TestExampleInterface"
, "passVariadicNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26530 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26531( cx, "TestExampleInterface"
, "passVariadicNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26531 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26531( cx, "TestExampleInterface"
, "passVariadicNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26532
26533 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26534 AutoSequence<Nullable<OwningCanvasPatternOrCanvasGradient >> arg0;
26535 if (args.length() > 0) {
26536 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
26537 JS_ReportOutOfMemory(cx);
26538 return false;
26539 }
26540 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
26541 // OK to do infallible append here, since we ensured capacity already.
26542 Nullable<OwningCanvasPatternOrCanvasGradient >& slot = *arg0.AppendElement();
26543 if (args[variadicArg].isNullOrUndefined()) {
26544 slot.SetNull();
26545 } else {
26546 if (!slot.SetValue().Init(cx, args[variadicArg], "Argument 1", false)) {
26547 return false;
26548 }
26549 }
26550 }
26551 }
26552 // NOTE: This assert does NOT call the function.
26553 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicNullableUnion(Constify(arg0)))>, "Should be returning void here");
26554 MOZ_KnownLive(self)(self)->PassVariadicNullableUnion(Constify(arg0));
26555 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26555); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26555; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26556 args.rval().setUndefined();
26557 return true;
26558}
26559
26560static const JSJitInfo passVariadicNullableUnion_methodinfo = {
26561 { (JSJitGetterOp)passVariadicNullableUnion },
26562 { prototypes::id::TestExampleInterface },
26563 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26564 JSJitInfo::Method,
26565 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26566 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26567 false, /* isInfallible. False in setters. */
26568 false, /* isMovable. Not relevant for setters. */
26569 false, /* isEliminatable. Not relevant for setters. */
26570 false, /* isAlwaysInSlot. Only relevant for getters. */
26571 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26572 false, /* isTypedMethod. Only relevant for methods. */
26573 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26574};
26575
26576MOZ_CAN_RUN_SCRIPT static bool
26577passRecordOfUnions(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26578{
26579 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfUnions");
26580 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26583( cx, "TestExampleInterface"
, "passRecordOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26581 "TestExampleInterface", "passRecordOfUnions", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26583( cx, "TestExampleInterface"
, "passRecordOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26582 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26583( cx, "TestExampleInterface"
, "passRecordOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26583 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26583( cx, "TestExampleInterface"
, "passRecordOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26584
26585 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26586 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfUnions", 1)) {
26587 return false;
26588 }
26589 Record<nsString, OwningCanvasPatternOrCanvasGradient> arg0;
26590 if (args[0].isObject()) {
26591 auto& recordEntries = arg0.Entries();
26592
26593 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
26594 JS::RootedVector<jsid> ids(cx);
26595 if (!js::GetPropertyKeys(cx, recordObj,
26596 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
26597 return false;
26598 }
26599 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
26600 JS_ReportOutOfMemory(cx);
26601 return false;
26602 }
26603 JS::Rooted<JS::Value> propNameValue(cx);
26604 JS::Rooted<JS::Value> temp(cx);
26605 JS::Rooted<jsid> curId(cx);
26606 JS::Rooted<JS::Value> idVal(cx);
26607 // Use a hashset to keep track of ids seen, to avoid
26608 // introducing nasty O(N^2) behavior scanning for them all the
26609 // time. Ideally we'd use a data structure with O(1) lookup
26610 // _and_ ordering for the MozMap, but we don't have one lying
26611 // around.
26612 nsTHashtable<nsStringHashKey> idsSeen;
26613 for (size_t i = 0; i < ids.length(); ++i) {
26614 curId = ids[i];
26615
26616 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
26617 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
26618 &desc)) {
26619 return false;
26620 }
26621
26622 if (desc.isNothing() || !desc->enumerable()) {
26623 continue;
26624 }
26625
26626 idVal = js::IdToValue(curId);
26627 nsString propName;
26628 // This will just throw if idVal is a Symbol, like the spec says
26629 // to do.
26630 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
26631 return false;
26632 }
26633
26634 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
26635 return false;
26636 }
26637
26638 Record<nsString, OwningCanvasPatternOrCanvasGradient>::EntryType* entry;
26639 if (!idsSeen.EnsureInserted(propName)) {
26640 // Find the existing entry.
26641 auto idx = recordEntries.IndexOf(propName);
26642 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?" ")"
, "../TestExampleGenBinding.cpp", 26643); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 26643; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
26643 "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?" ")"
, "../TestExampleGenBinding.cpp", 26643); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 26643; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
26644 // Now blow it away to make it look like it was just added
26645 // to the array, because it's not obvious that it's
26646 // safe to write to its already-initialized mValue via our
26647 // normal codegen conversions. For example, the value
26648 // could be a union and this would change its type, but
26649 // codegen assumes we won't do that.
26650 entry = recordEntries.ReconstructElementAt(idx);
26651 } else {
26652 // Safe to do an infallible append here, because we did a
26653 // SetCapacity above to the right capacity.
26654 entry = recordEntries.AppendElement();
26655 }
26656 entry->mKey = propName;
26657 OwningCanvasPatternOrCanvasGradient& slot = entry->mValue;
26658 if (!slot.Init(cx, temp, "Value in argument 1", false)) {
26659 return false;
26660 }
26661 }
26662 } else {
26663 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
26664 return false;
26665 }
26666 // NOTE: This assert does NOT call the function.
26667 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfUnions(Constify(arg0)))>, "Should be returning void here");
26668 MOZ_KnownLive(self)(self)->PassRecordOfUnions(Constify(arg0));
26669 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26669); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26669; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26670 args.rval().setUndefined();
26671 return true;
26672}
26673
26674static const JSJitInfo passRecordOfUnions_methodinfo = {
26675 { (JSJitGetterOp)passRecordOfUnions },
26676 { prototypes::id::TestExampleInterface },
26677 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26678 JSJitInfo::Method,
26679 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26680 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26681 false, /* isInfallible. False in setters. */
26682 false, /* isMovable. Not relevant for setters. */
26683 false, /* isEliminatable. Not relevant for setters. */
26684 false, /* isAlwaysInSlot. Only relevant for getters. */
26685 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26686 false, /* isTypedMethod. Only relevant for methods. */
26687 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26688};
26689
26690MOZ_CAN_RUN_SCRIPT static bool
26691receiveUnion(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26692{
26693 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26696( cx, "TestExampleInterface"
, "receiveUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26694 "TestExampleInterface", "receiveUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26696( cx, "TestExampleInterface"
, "receiveUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26695 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26696( cx, "TestExampleInterface"
, "receiveUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26696 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26696( cx, "TestExampleInterface"
, "receiveUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26697
26698 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26699 OwningCanvasPatternOrCanvasGradient result;
26700 // NOTE: This assert does NOT call the function.
26701 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUnion(result))>, "Should be returning void here");
26702 MOZ_KnownLive(self)(self)->ReceiveUnion(result);
26703 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26703); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26703; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26704 if (!result.ToJSVal(cx, obj, args.rval())) {
26705 return false;
26706 }
26707 return true;
26708}
26709
26710static const JSJitInfo receiveUnion_methodinfo = {
26711 { (JSJitGetterOp)receiveUnion },
26712 { prototypes::id::TestExampleInterface },
26713 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26714 JSJitInfo::Method,
26715 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26716 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
26717 false, /* isInfallible. False in setters. */
26718 false, /* isMovable. Not relevant for setters. */
26719 false, /* isEliminatable. Not relevant for setters. */
26720 false, /* isAlwaysInSlot. Only relevant for getters. */
26721 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26722 false, /* isTypedMethod. Only relevant for methods. */
26723 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26724};
26725
26726MOZ_CAN_RUN_SCRIPT static bool
26727receiveUnion2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26728{
26729 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26732( cx, "TestExampleInterface"
, "receiveUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26730 "TestExampleInterface", "receiveUnion2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26732( cx, "TestExampleInterface"
, "receiveUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26731 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26732( cx, "TestExampleInterface"
, "receiveUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26732 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26732( cx, "TestExampleInterface"
, "receiveUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26733
26734 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26735 RootedUnion<OwningObjectOrLong> result(cx);
26736 // NOTE: This assert does NOT call the function.
26737 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUnion2(cx, result))>, "Should be returning void here");
26738 MOZ_KnownLive(self)(self)->ReceiveUnion2(cx, result);
26739 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26739); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26739; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26740 if (!result.ToJSVal(cx, obj, args.rval())) {
26741 return false;
26742 }
26743 return true;
26744}
26745
26746static const JSJitInfo receiveUnion2_methodinfo = {
26747 { (JSJitGetterOp)receiveUnion2 },
26748 { prototypes::id::TestExampleInterface },
26749 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26750 JSJitInfo::Method,
26751 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26752 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
26753 false, /* isInfallible. False in setters. */
26754 false, /* isMovable. Not relevant for setters. */
26755 false, /* isEliminatable. Not relevant for setters. */
26756 false, /* isAlwaysInSlot. Only relevant for getters. */
26757 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26758 false, /* isTypedMethod. Only relevant for methods. */
26759 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26760};
26761
26762MOZ_CAN_RUN_SCRIPT static bool
26763receiveUnionContainingNull(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26764{
26765 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26768( cx, "TestExampleInterface"
, "receiveUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26766 "TestExampleInterface", "receiveUnionContainingNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26768( cx, "TestExampleInterface"
, "receiveUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26767 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26768( cx, "TestExampleInterface"
, "receiveUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26768 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26768( cx, "TestExampleInterface"
, "receiveUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26769
26770 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26771 OwningCanvasPatternOrNullOrCanvasGradient result;
26772 // NOTE: This assert does NOT call the function.
26773 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUnionContainingNull(result))>, "Should be returning void here");
26774 MOZ_KnownLive(self)(self)->ReceiveUnionContainingNull(result);
26775 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26775); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26775; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26776 if (!result.ToJSVal(cx, obj, args.rval())) {
26777 return false;
26778 }
26779 return true;
26780}
26781
26782static const JSJitInfo receiveUnionContainingNull_methodinfo = {
26783 { (JSJitGetterOp)receiveUnionContainingNull },
26784 { prototypes::id::TestExampleInterface },
26785 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26786 JSJitInfo::Method,
26787 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26788 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
26789 false, /* isInfallible. False in setters. */
26790 false, /* isMovable. Not relevant for setters. */
26791 false, /* isEliminatable. Not relevant for setters. */
26792 false, /* isAlwaysInSlot. Only relevant for getters. */
26793 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26794 false, /* isTypedMethod. Only relevant for methods. */
26795 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26796};
26797
26798MOZ_CAN_RUN_SCRIPT static bool
26799receiveNullableUnion(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26800{
26801 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26804( cx, "TestExampleInterface"
, "receiveNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26802 "TestExampleInterface", "receiveNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26804( cx, "TestExampleInterface"
, "receiveNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26803 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26804( cx, "TestExampleInterface"
, "receiveNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26804 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26804( cx, "TestExampleInterface"
, "receiveNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26805
26806 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26807 Nullable<OwningCanvasPatternOrCanvasGradient> result;
26808 // NOTE: This assert does NOT call the function.
26809 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableUnion(result))>, "Should be returning void here");
26810 MOZ_KnownLive(self)(self)->ReceiveNullableUnion(result);
26811 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26811); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26811; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26812 if (result.IsNull()) {
26813 args.rval().setNull();
26814 return true;
26815 }
26816 if (!result.Value().ToJSVal(cx, obj, args.rval())) {
26817 return false;
26818 }
26819 return true;
26820}
26821
26822static const JSJitInfo receiveNullableUnion_methodinfo = {
26823 { (JSJitGetterOp)receiveNullableUnion },
26824 { prototypes::id::TestExampleInterface },
26825 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26826 JSJitInfo::Method,
26827 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26828 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
26829 false, /* isInfallible. False in setters. */
26830 false, /* isMovable. Not relevant for setters. */
26831 false, /* isEliminatable. Not relevant for setters. */
26832 false, /* isAlwaysInSlot. Only relevant for getters. */
26833 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26834 false, /* isTypedMethod. Only relevant for methods. */
26835 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26836};
26837
26838MOZ_CAN_RUN_SCRIPT static bool
26839receiveNullableUnion2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26840{
26841 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26844( cx, "TestExampleInterface"
, "receiveNullableUnion2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26842 "TestExampleInterface", "receiveNullableUnion2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26844( cx, "TestExampleInterface"
, "receiveNullableUnion2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26843 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26844( cx, "TestExampleInterface"
, "receiveNullableUnion2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26844 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26844( cx, "TestExampleInterface"
, "receiveNullableUnion2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26845
26846 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26847 NullableRootedUnion<OwningObjectOrLong> result(cx);
26848 // NOTE: This assert does NOT call the function.
26849 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableUnion2(cx, result))>, "Should be returning void here");
26850 MOZ_KnownLive(self)(self)->ReceiveNullableUnion2(cx, result);
26851 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26851); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26851; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26852 if (result.IsNull()) {
26853 args.rval().setNull();
26854 return true;
26855 }
26856 if (!result.Value().ToJSVal(cx, obj, args.rval())) {
26857 return false;
26858 }
26859 return true;
26860}
26861
26862static const JSJitInfo receiveNullableUnion2_methodinfo = {
26863 { (JSJitGetterOp)receiveNullableUnion2 },
26864 { prototypes::id::TestExampleInterface },
26865 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26866 JSJitInfo::Method,
26867 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26868 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
26869 false, /* isInfallible. False in setters. */
26870 false, /* isMovable. Not relevant for setters. */
26871 false, /* isEliminatable. Not relevant for setters. */
26872 false, /* isAlwaysInSlot. Only relevant for getters. */
26873 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26874 false, /* isTypedMethod. Only relevant for methods. */
26875 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26876};
26877
26878MOZ_CAN_RUN_SCRIPT static bool
26879receiveUnionWithUndefined(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26880{
26881 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26884( cx, "TestExampleInterface"
, "receiveUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26882 "TestExampleInterface", "receiveUnionWithUndefined", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26884( cx, "TestExampleInterface"
, "receiveUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26883 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26884( cx, "TestExampleInterface"
, "receiveUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26884 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26884( cx, "TestExampleInterface"
, "receiveUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26885
26886 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26887 OwningUndefinedOrCanvasPattern result;
26888 // NOTE: This assert does NOT call the function.
26889 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUnionWithUndefined(result))>, "Should be returning void here");
26890 MOZ_KnownLive(self)(self)->ReceiveUnionWithUndefined(result);
26891 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26891); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26891; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26892 if (!result.ToJSVal(cx, obj, args.rval())) {
26893 return false;
26894 }
26895 return true;
26896}
26897
26898static const JSJitInfo receiveUnionWithUndefined_methodinfo = {
26899 { (JSJitGetterOp)receiveUnionWithUndefined },
26900 { prototypes::id::TestExampleInterface },
26901 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26902 JSJitInfo::Method,
26903 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26904 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
26905 false, /* isInfallible. False in setters. */
26906 false, /* isMovable. Not relevant for setters. */
26907 false, /* isEliminatable. Not relevant for setters. */
26908 false, /* isAlwaysInSlot. Only relevant for getters. */
26909 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26910 false, /* isTypedMethod. Only relevant for methods. */
26911 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26912};
26913
26914MOZ_CAN_RUN_SCRIPT static bool
26915receiveUnionWithNullableUndefined(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26916{
26917 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26920( cx, "TestExampleInterface"
, "receiveUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26918 "TestExampleInterface", "receiveUnionWithNullableUndefined", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26920( cx, "TestExampleInterface"
, "receiveUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26919 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26920( cx, "TestExampleInterface"
, "receiveUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26920 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26920( cx, "TestExampleInterface"
, "receiveUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26921
26922 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26923 OwningUndefinedOrNullOrCanvasPattern result;
26924 // NOTE: This assert does NOT call the function.
26925 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUnionWithNullableUndefined(result))>, "Should be returning void here");
26926 MOZ_KnownLive(self)(self)->ReceiveUnionWithNullableUndefined(result);
26927 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26927); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26927; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26928 if (!result.ToJSVal(cx, obj, args.rval())) {
26929 return false;
26930 }
26931 return true;
26932}
26933
26934static const JSJitInfo receiveUnionWithNullableUndefined_methodinfo = {
26935 { (JSJitGetterOp)receiveUnionWithNullableUndefined },
26936 { prototypes::id::TestExampleInterface },
26937 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26938 JSJitInfo::Method,
26939 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26940 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
26941 false, /* isInfallible. False in setters. */
26942 false, /* isMovable. Not relevant for setters. */
26943 false, /* isEliminatable. Not relevant for setters. */
26944 false, /* isAlwaysInSlot. Only relevant for getters. */
26945 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26946 false, /* isTypedMethod. Only relevant for methods. */
26947 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26948};
26949
26950MOZ_CAN_RUN_SCRIPT static bool
26951receiveUnionWithUndefinedAndNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26952{
26953 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26956( cx, "TestExampleInterface"
, "receiveUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26954 "TestExampleInterface", "receiveUnionWithUndefinedAndNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26956( cx, "TestExampleInterface"
, "receiveUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26955 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26956( cx, "TestExampleInterface"
, "receiveUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26956 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26956( cx, "TestExampleInterface"
, "receiveUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26957
26958 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26959 OwningUndefinedOrCanvasPatternOrNull result;
26960 // NOTE: This assert does NOT call the function.
26961 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUnionWithUndefinedAndNullable(result))>, "Should be returning void here");
26962 MOZ_KnownLive(self)(self)->ReceiveUnionWithUndefinedAndNullable(result);
26963 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26963); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26963; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26964 if (!result.ToJSVal(cx, obj, args.rval())) {
26965 return false;
26966 }
26967 return true;
26968}
26969
26970static const JSJitInfo receiveUnionWithUndefinedAndNullable_methodinfo = {
26971 { (JSJitGetterOp)receiveUnionWithUndefinedAndNullable },
26972 { prototypes::id::TestExampleInterface },
26973 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
26974 JSJitInfo::Method,
26975 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26976 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
26977 false, /* isInfallible. False in setters. */
26978 false, /* isMovable. Not relevant for setters. */
26979 false, /* isEliminatable. Not relevant for setters. */
26980 false, /* isAlwaysInSlot. Only relevant for getters. */
26981 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26982 false, /* isTypedMethod. Only relevant for methods. */
26983 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26984};
26985
26986MOZ_CAN_RUN_SCRIPT static bool
26987receiveNullableUnionWithUndefined(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26988{
26989 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26992( cx, "TestExampleInterface"
, "receiveNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26990 "TestExampleInterface", "receiveNullableUnionWithUndefined", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26992( cx, "TestExampleInterface"
, "receiveNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26991 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26992( cx, "TestExampleInterface"
, "receiveNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
26992 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26992( cx, "TestExampleInterface"
, "receiveNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
26993
26994 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
26995 Nullable<OwningUndefinedOrCanvasPattern> result;
26996 // NOTE: This assert does NOT call the function.
26997 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableUnionWithUndefined(result))>, "Should be returning void here");
26998 MOZ_KnownLive(self)(self)->ReceiveNullableUnionWithUndefined(result);
26999 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 26999); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26999; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27000 if (result.IsNull()) {
27001 args.rval().setNull();
27002 return true;
27003 }
27004 if (!result.Value().ToJSVal(cx, obj, args.rval())) {
27005 return false;
27006 }
27007 return true;
27008}
27009
27010static const JSJitInfo receiveNullableUnionWithUndefined_methodinfo = {
27011 { (JSJitGetterOp)receiveNullableUnionWithUndefined },
27012 { prototypes::id::TestExampleInterface },
27013 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27014 JSJitInfo::Method,
27015 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27016 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
27017 false, /* isInfallible. False in setters. */
27018 false, /* isMovable. Not relevant for setters. */
27019 false, /* isEliminatable. Not relevant for setters. */
27020 false, /* isAlwaysInSlot. Only relevant for getters. */
27021 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27022 false, /* isTypedMethod. Only relevant for methods. */
27023 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27024};
27025
27026MOZ_CAN_RUN_SCRIPT static bool
27027get_writableUnion(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
27028{
27029 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27032( cx, "TestExampleInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27030 "TestExampleInterface", "writableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27032( cx, "TestExampleInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27031 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject27032( cx, "TestExampleInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27032 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27032( cx, "TestExampleInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27033
27034 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27035 OwningCanvasPatternOrCanvasGradient result;
27036 // NOTE: This assert does NOT call the function.
27037 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableUnion(result))>, "Should be returning void here");
27038 MOZ_KnownLive(self)(self)->GetWritableUnion(result);
27039 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27039); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27039; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27040 if (!result.ToJSVal(cx, obj, args.rval())) {
27041 return false;
27042 }
27043 return true;
27044}
27045
27046MOZ_CAN_RUN_SCRIPT static bool
27047set_writableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
27048{
27049 BindingCallContext cx(cx_, "TestExampleInterface.writableUnion setter");
27050 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27053( cx, "TestExampleInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27051 "TestExampleInterface", "writableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27053( cx, "TestExampleInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27052 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject27053( cx, "TestExampleInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27053 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27053( cx, "TestExampleInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27054
27055 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27056 CanvasPatternOrCanvasGradient arg0;
27057 if (!arg0.Init(cx, args[0], "Value being assigned", false)) {
27058 return false;
27059 }
27060 // NOTE: This assert does NOT call the function.
27061 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnion(Constify(arg0)))>, "Should be returning void here");
27062 MOZ_KnownLive(self)(self)->SetWritableUnion(Constify(arg0));
27063 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27063); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27063; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27064
27065 return true;
27066}
27067
27068static const JSJitInfo writableUnion_getterinfo = {
27069 { get_writableUnion },
27070 { prototypes::id::TestExampleInterface },
27071 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27072 JSJitInfo::Getter,
27073 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27074 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
27075 false, /* isInfallible. False in setters. */
27076 false, /* isMovable. Not relevant for setters. */
27077 false, /* isEliminatable. Not relevant for setters. */
27078 false, /* isAlwaysInSlot. Only relevant for getters. */
27079 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27080 false, /* isTypedMethod. Only relevant for methods. */
27081 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27082};
27083static const JSJitInfo writableUnion_setterinfo = {
27084 { (JSJitGetterOp)set_writableUnion },
27085 { prototypes::id::TestExampleInterface },
27086 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27087 JSJitInfo::Setter,
27088 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27089 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27090 false, /* isInfallible. False in setters. */
27091 false, /* isMovable. Not relevant for setters. */
27092 false, /* isEliminatable. Not relevant for setters. */
27093 false, /* isAlwaysInSlot. Only relevant for getters. */
27094 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27095 false, /* isTypedMethod. Only relevant for methods. */
27096 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27097};
27098
27099MOZ_CAN_RUN_SCRIPT static bool
27100get_writableUnionContainingNull(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
27101{
27102 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27105( cx, "TestExampleInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27103 "TestExampleInterface", "writableUnionContainingNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27105( cx, "TestExampleInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27104 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject27105( cx, "TestExampleInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27105 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27105( cx, "TestExampleInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27106
27107 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27108 OwningCanvasPatternOrNullOrCanvasGradient result;
27109 // NOTE: This assert does NOT call the function.
27110 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableUnionContainingNull(result))>, "Should be returning void here");
27111 MOZ_KnownLive(self)(self)->GetWritableUnionContainingNull(result);
27112 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27112); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27112; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27113 if (!result.ToJSVal(cx, obj, args.rval())) {
27114 return false;
27115 }
27116 return true;
27117}
27118
27119MOZ_CAN_RUN_SCRIPT static bool
27120set_writableUnionContainingNull(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
27121{
27122 BindingCallContext cx(cx_, "TestExampleInterface.writableUnionContainingNull setter");
27123 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27126( cx, "TestExampleInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27124 "TestExampleInterface", "writableUnionContainingNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27126( cx, "TestExampleInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27125 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject27126( cx, "TestExampleInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27126 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27126( cx, "TestExampleInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27127
27128 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27129 CanvasPatternOrNullOrCanvasGradient arg0;
27130 if (!arg0.Init(cx, args[0], "Value being assigned", false)) {
27131 return false;
27132 }
27133 // NOTE: This assert does NOT call the function.
27134 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnionContainingNull(Constify(arg0)))>, "Should be returning void here");
27135 MOZ_KnownLive(self)(self)->SetWritableUnionContainingNull(Constify(arg0));
27136 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27136); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27136; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27137
27138 return true;
27139}
27140
27141static const JSJitInfo writableUnionContainingNull_getterinfo = {
27142 { get_writableUnionContainingNull },
27143 { prototypes::id::TestExampleInterface },
27144 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27145 JSJitInfo::Getter,
27146 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27147 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
27148 false, /* isInfallible. False in setters. */
27149 false, /* isMovable. Not relevant for setters. */
27150 false, /* isEliminatable. Not relevant for setters. */
27151 false, /* isAlwaysInSlot. Only relevant for getters. */
27152 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27153 false, /* isTypedMethod. Only relevant for methods. */
27154 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27155};
27156static const JSJitInfo writableUnionContainingNull_setterinfo = {
27157 { (JSJitGetterOp)set_writableUnionContainingNull },
27158 { prototypes::id::TestExampleInterface },
27159 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27160 JSJitInfo::Setter,
27161 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27162 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27163 false, /* isInfallible. False in setters. */
27164 false, /* isMovable. Not relevant for setters. */
27165 false, /* isEliminatable. Not relevant for setters. */
27166 false, /* isAlwaysInSlot. Only relevant for getters. */
27167 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27168 false, /* isTypedMethod. Only relevant for methods. */
27169 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27170};
27171
27172MOZ_CAN_RUN_SCRIPT static bool
27173get_writableNullableUnion(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
27174{
27175 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27178( cx, "TestExampleInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27176 "TestExampleInterface", "writableNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27178( cx, "TestExampleInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27177 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject27178( cx, "TestExampleInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27178 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27178( cx, "TestExampleInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27179
27180 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27181 Nullable<OwningCanvasPatternOrCanvasGradient> result;
27182 // NOTE: This assert does NOT call the function.
27183 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableNullableUnion(result))>, "Should be returning void here");
27184 MOZ_KnownLive(self)(self)->GetWritableNullableUnion(result);
27185 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27185); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27185; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27186 if (result.IsNull()) {
27187 args.rval().setNull();
27188 return true;
27189 }
27190 if (!result.Value().ToJSVal(cx, obj, args.rval())) {
27191 return false;
27192 }
27193 return true;
27194}
27195
27196MOZ_CAN_RUN_SCRIPT static bool
27197set_writableNullableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
27198{
27199 BindingCallContext cx(cx_, "TestExampleInterface.writableNullableUnion setter");
27200 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27203( cx, "TestExampleInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27201 "TestExampleInterface", "writableNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27203( cx, "TestExampleInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27202 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject27203( cx, "TestExampleInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27203 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27203( cx, "TestExampleInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27204
27205 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27206 Nullable<CanvasPatternOrCanvasGradient > arg0;
27207 if (args[0].isNullOrUndefined()) {
27208 arg0.SetNull();
27209 } else {
27210 if (!arg0.SetValue().Init(cx, args[0], "Value being assigned", false)) {
27211 return false;
27212 }
27213 }
27214 // NOTE: This assert does NOT call the function.
27215 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableUnion(Constify(arg0)))>, "Should be returning void here");
27216 MOZ_KnownLive(self)(self)->SetWritableNullableUnion(Constify(arg0));
27217 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27217); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27217; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27218
27219 return true;
27220}
27221
27222static const JSJitInfo writableNullableUnion_getterinfo = {
27223 { get_writableNullableUnion },
27224 { prototypes::id::TestExampleInterface },
27225 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27226 JSJitInfo::Getter,
27227 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27228 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
27229 false, /* isInfallible. False in setters. */
27230 false, /* isMovable. Not relevant for setters. */
27231 false, /* isEliminatable. Not relevant for setters. */
27232 false, /* isAlwaysInSlot. Only relevant for getters. */
27233 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27234 false, /* isTypedMethod. Only relevant for methods. */
27235 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27236};
27237static const JSJitInfo writableNullableUnion_setterinfo = {
27238 { (JSJitGetterOp)set_writableNullableUnion },
27239 { prototypes::id::TestExampleInterface },
27240 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27241 JSJitInfo::Setter,
27242 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27243 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27244 false, /* isInfallible. False in setters. */
27245 false, /* isMovable. Not relevant for setters. */
27246 false, /* isEliminatable. Not relevant for setters. */
27247 false, /* isAlwaysInSlot. Only relevant for getters. */
27248 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27249 false, /* isTypedMethod. Only relevant for methods. */
27250 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27251};
27252
27253MOZ_CAN_RUN_SCRIPT static bool
27254get_writableUnionWithUndefined(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
27255{
27256 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27259( cx, "TestExampleInterface"
, "writableUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27257 "TestExampleInterface", "writableUnionWithUndefined", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27259( cx, "TestExampleInterface"
, "writableUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27258 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject27259( cx, "TestExampleInterface"
, "writableUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27259 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27259( cx, "TestExampleInterface"
, "writableUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27260
27261 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27262 OwningUndefinedOrCanvasPattern result;
27263 // NOTE: This assert does NOT call the function.
27264 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableUnionWithUndefined(result))>, "Should be returning void here");
27265 MOZ_KnownLive(self)(self)->GetWritableUnionWithUndefined(result);
27266 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27266); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27266; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27267 if (!result.ToJSVal(cx, obj, args.rval())) {
27268 return false;
27269 }
27270 return true;
27271}
27272
27273MOZ_CAN_RUN_SCRIPT static bool
27274set_writableUnionWithUndefined(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
27275{
27276 BindingCallContext cx(cx_, "TestExampleInterface.writableUnionWithUndefined setter");
27277 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27280( cx, "TestExampleInterface"
, "writableUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27278 "TestExampleInterface", "writableUnionWithUndefined", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27280( cx, "TestExampleInterface"
, "writableUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27279 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject27280( cx, "TestExampleInterface"
, "writableUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27280 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27280( cx, "TestExampleInterface"
, "writableUnionWithUndefined", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27281
27282 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27283 UndefinedOrCanvasPattern arg0;
27284 if (!arg0.Init(cx, args[0], "Value being assigned", false)) {
27285 return false;
27286 }
27287 // NOTE: This assert does NOT call the function.
27288 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnionWithUndefined(Constify(arg0)))>, "Should be returning void here");
27289 MOZ_KnownLive(self)(self)->SetWritableUnionWithUndefined(Constify(arg0));
27290 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27290); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27290; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27291
27292 return true;
27293}
27294
27295static const JSJitInfo writableUnionWithUndefined_getterinfo = {
27296 { get_writableUnionWithUndefined },
27297 { prototypes::id::TestExampleInterface },
27298 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27299 JSJitInfo::Getter,
27300 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27301 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
27302 false, /* isInfallible. False in setters. */
27303 false, /* isMovable. Not relevant for setters. */
27304 false, /* isEliminatable. Not relevant for setters. */
27305 false, /* isAlwaysInSlot. Only relevant for getters. */
27306 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27307 false, /* isTypedMethod. Only relevant for methods. */
27308 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27309};
27310static const JSJitInfo writableUnionWithUndefined_setterinfo = {
27311 { (JSJitGetterOp)set_writableUnionWithUndefined },
27312 { prototypes::id::TestExampleInterface },
27313 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27314 JSJitInfo::Setter,
27315 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27316 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27317 false, /* isInfallible. False in setters. */
27318 false, /* isMovable. Not relevant for setters. */
27319 false, /* isEliminatable. Not relevant for setters. */
27320 false, /* isAlwaysInSlot. Only relevant for getters. */
27321 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27322 false, /* isTypedMethod. Only relevant for methods. */
27323 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27324};
27325
27326MOZ_CAN_RUN_SCRIPT static bool
27327get_writableUnionWithNullableUndefined(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
27328{
27329 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27332( cx, "TestExampleInterface"
, "writableUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27330 "TestExampleInterface", "writableUnionWithNullableUndefined", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27332( cx, "TestExampleInterface"
, "writableUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27331 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject27332( cx, "TestExampleInterface"
, "writableUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27332 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27332( cx, "TestExampleInterface"
, "writableUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27333
27334 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27335 OwningUndefinedOrNullOrCanvasPattern result;
27336 // NOTE: This assert does NOT call the function.
27337 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableUnionWithNullableUndefined(result))>, "Should be returning void here");
27338 MOZ_KnownLive(self)(self)->GetWritableUnionWithNullableUndefined(result);
27339 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27339); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27339; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27340 if (!result.ToJSVal(cx, obj, args.rval())) {
27341 return false;
27342 }
27343 return true;
27344}
27345
27346MOZ_CAN_RUN_SCRIPT static bool
27347set_writableUnionWithNullableUndefined(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
27348{
27349 BindingCallContext cx(cx_, "TestExampleInterface.writableUnionWithNullableUndefined setter");
27350 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27353( cx, "TestExampleInterface"
, "writableUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27351 "TestExampleInterface", "writableUnionWithNullableUndefined", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27353( cx, "TestExampleInterface"
, "writableUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27352 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject27353( cx, "TestExampleInterface"
, "writableUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27353 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27353( cx, "TestExampleInterface"
, "writableUnionWithNullableUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27354
27355 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27356 UndefinedOrNullOrCanvasPattern arg0;
27357 if (!arg0.Init(cx, args[0], "Value being assigned", false)) {
27358 return false;
27359 }
27360 // NOTE: This assert does NOT call the function.
27361 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnionWithNullableUndefined(Constify(arg0)))>, "Should be returning void here");
27362 MOZ_KnownLive(self)(self)->SetWritableUnionWithNullableUndefined(Constify(arg0));
27363 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27363); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27363; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27364
27365 return true;
27366}
27367
27368static const JSJitInfo writableUnionWithNullableUndefined_getterinfo = {
27369 { get_writableUnionWithNullableUndefined },
27370 { prototypes::id::TestExampleInterface },
27371 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27372 JSJitInfo::Getter,
27373 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27374 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
27375 false, /* isInfallible. False in setters. */
27376 false, /* isMovable. Not relevant for setters. */
27377 false, /* isEliminatable. Not relevant for setters. */
27378 false, /* isAlwaysInSlot. Only relevant for getters. */
27379 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27380 false, /* isTypedMethod. Only relevant for methods. */
27381 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27382};
27383static const JSJitInfo writableUnionWithNullableUndefined_setterinfo = {
27384 { (JSJitGetterOp)set_writableUnionWithNullableUndefined },
27385 { prototypes::id::TestExampleInterface },
27386 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27387 JSJitInfo::Setter,
27388 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27389 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27390 false, /* isInfallible. False in setters. */
27391 false, /* isMovable. Not relevant for setters. */
27392 false, /* isEliminatable. Not relevant for setters. */
27393 false, /* isAlwaysInSlot. Only relevant for getters. */
27394 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27395 false, /* isTypedMethod. Only relevant for methods. */
27396 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27397};
27398
27399MOZ_CAN_RUN_SCRIPT static bool
27400get_writableUnionWithUndefinedAndNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
27401{
27402 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27405( cx, "TestExampleInterface"
, "writableUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27403 "TestExampleInterface", "writableUnionWithUndefinedAndNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27405( cx, "TestExampleInterface"
, "writableUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27404 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject27405( cx, "TestExampleInterface"
, "writableUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27405 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27405( cx, "TestExampleInterface"
, "writableUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27406
27407 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27408 OwningUndefinedOrCanvasPatternOrNull result;
27409 // NOTE: This assert does NOT call the function.
27410 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableUnionWithUndefinedAndNullable(result))>, "Should be returning void here");
27411 MOZ_KnownLive(self)(self)->GetWritableUnionWithUndefinedAndNullable(result);
27412 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27412); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27412; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27413 if (!result.ToJSVal(cx, obj, args.rval())) {
27414 return false;
27415 }
27416 return true;
27417}
27418
27419MOZ_CAN_RUN_SCRIPT static bool
27420set_writableUnionWithUndefinedAndNullable(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
27421{
27422 BindingCallContext cx(cx_, "TestExampleInterface.writableUnionWithUndefinedAndNullable setter");
27423 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27426( cx, "TestExampleInterface"
, "writableUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27424 "TestExampleInterface", "writableUnionWithUndefinedAndNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27426( cx, "TestExampleInterface"
, "writableUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27425 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject27426( cx, "TestExampleInterface"
, "writableUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27426 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27426( cx, "TestExampleInterface"
, "writableUnionWithUndefinedAndNullable", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27427
27428 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27429 UndefinedOrCanvasPatternOrNull arg0;
27430 if (!arg0.Init(cx, args[0], "Value being assigned", false)) {
27431 return false;
27432 }
27433 // NOTE: This assert does NOT call the function.
27434 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnionWithUndefinedAndNullable(Constify(arg0)))>, "Should be returning void here");
27435 MOZ_KnownLive(self)(self)->SetWritableUnionWithUndefinedAndNullable(Constify(arg0));
27436 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27436); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27436; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27437
27438 return true;
27439}
27440
27441static const JSJitInfo writableUnionWithUndefinedAndNullable_getterinfo = {
27442 { get_writableUnionWithUndefinedAndNullable },
27443 { prototypes::id::TestExampleInterface },
27444 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27445 JSJitInfo::Getter,
27446 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27447 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
27448 false, /* isInfallible. False in setters. */
27449 false, /* isMovable. Not relevant for setters. */
27450 false, /* isEliminatable. Not relevant for setters. */
27451 false, /* isAlwaysInSlot. Only relevant for getters. */
27452 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27453 false, /* isTypedMethod. Only relevant for methods. */
27454 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27455};
27456static const JSJitInfo writableUnionWithUndefinedAndNullable_setterinfo = {
27457 { (JSJitGetterOp)set_writableUnionWithUndefinedAndNullable },
27458 { prototypes::id::TestExampleInterface },
27459 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27460 JSJitInfo::Setter,
27461 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27462 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27463 false, /* isInfallible. False in setters. */
27464 false, /* isMovable. Not relevant for setters. */
27465 false, /* isEliminatable. Not relevant for setters. */
27466 false, /* isAlwaysInSlot. Only relevant for getters. */
27467 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27468 false, /* isTypedMethod. Only relevant for methods. */
27469 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27470};
27471
27472MOZ_CAN_RUN_SCRIPT static bool
27473get_writableNullableUnionWithUndefined(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
27474{
27475 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27478( cx, "TestExampleInterface"
, "writableNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27476 "TestExampleInterface", "writableNullableUnionWithUndefined", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27478( cx, "TestExampleInterface"
, "writableNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27477 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject27478( cx, "TestExampleInterface"
, "writableNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27478 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27478( cx, "TestExampleInterface"
, "writableNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27479
27480 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27481 Nullable<OwningUndefinedOrCanvasPattern> result;
27482 // NOTE: This assert does NOT call the function.
27483 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableNullableUnionWithUndefined(result))>, "Should be returning void here");
27484 MOZ_KnownLive(self)(self)->GetWritableNullableUnionWithUndefined(result);
27485 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27485); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27485; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27486 if (result.IsNull()) {
27487 args.rval().setNull();
27488 return true;
27489 }
27490 if (!result.Value().ToJSVal(cx, obj, args.rval())) {
27491 return false;
27492 }
27493 return true;
27494}
27495
27496MOZ_CAN_RUN_SCRIPT static bool
27497set_writableNullableUnionWithUndefined(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
27498{
27499 BindingCallContext cx(cx_, "TestExampleInterface.writableNullableUnionWithUndefined setter");
27500 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27503( cx, "TestExampleInterface"
, "writableNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27501 "TestExampleInterface", "writableNullableUnionWithUndefined", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27503( cx, "TestExampleInterface"
, "writableNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27502 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject27503( cx, "TestExampleInterface"
, "writableNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27503 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27503( cx, "TestExampleInterface"
, "writableNullableUnionWithUndefined", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27504
27505 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27506 Nullable<UndefinedOrCanvasPattern > arg0;
27507 if (args[0].isNull()) {
27508 arg0.SetNull();
27509 } else {
27510 if (!arg0.SetValue().Init(cx, args[0], "Value being assigned", false)) {
27511 return false;
27512 }
27513 }
27514 // NOTE: This assert does NOT call the function.
27515 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableUnionWithUndefined(Constify(arg0)))>, "Should be returning void here");
27516 MOZ_KnownLive(self)(self)->SetWritableNullableUnionWithUndefined(Constify(arg0));
27517 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27517); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27517; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27518
27519 return true;
27520}
27521
27522static const JSJitInfo writableNullableUnionWithUndefined_getterinfo = {
27523 { get_writableNullableUnionWithUndefined },
27524 { prototypes::id::TestExampleInterface },
27525 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27526 JSJitInfo::Getter,
27527 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27528 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
27529 false, /* isInfallible. False in setters. */
27530 false, /* isMovable. Not relevant for setters. */
27531 false, /* isEliminatable. Not relevant for setters. */
27532 false, /* isAlwaysInSlot. Only relevant for getters. */
27533 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27534 false, /* isTypedMethod. Only relevant for methods. */
27535 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27536};
27537static const JSJitInfo writableNullableUnionWithUndefined_setterinfo = {
27538 { (JSJitGetterOp)set_writableNullableUnionWithUndefined },
27539 { prototypes::id::TestExampleInterface },
27540 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27541 JSJitInfo::Setter,
27542 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27543 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27544 false, /* isInfallible. False in setters. */
27545 false, /* isMovable. Not relevant for setters. */
27546 false, /* isEliminatable. Not relevant for setters. */
27547 false, /* isAlwaysInSlot. Only relevant for getters. */
27548 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27549 false, /* isTypedMethod. Only relevant for methods. */
27550 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27551};
27552
27553MOZ_CAN_RUN_SCRIPT static bool
27554passPromise(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27555{
27556 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27559( cx, "TestExampleInterface"
, "passPromise", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27557 "TestExampleInterface", "passPromise", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27559( cx, "TestExampleInterface"
, "passPromise", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27558 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27559( cx, "TestExampleInterface"
, "passPromise", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27559 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27559( cx, "TestExampleInterface"
, "passPromise", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27560
27561 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27562 if (!args.requireAtLeast(cx, "TestExampleInterface.passPromise", 1)) {
27563 return false;
27564 }
27565 OwningNonNull<Promise> arg0;
27566 { // Scope for our GlobalObject, FastErrorResult, JSAutoRealm,
27567 // etc.
27568
27569 JS::Rooted<JSObject*> globalObj(cx);
27570 globalObj = JS::CurrentGlobalOrNull(cx);
27571 JSAutoRealm ar(cx, globalObj);
27572 GlobalObject promiseGlobal(cx, globalObj);
27573 if (promiseGlobal.Failed()) {
27574 return false;
27575 }
27576
27577 JS::Rooted<JS::Value> valueToResolve(cx, args[0]);
27578 if (!JS_WrapValue(cx, &valueToResolve)) {
27579 return false;
27580 }
27581 binding_detail::FastErrorResult promiseRv;
27582 nsCOMPtr<nsIGlobalObject> global =
27583 do_QueryInterface(promiseGlobal.GetAsSupports());
27584 if (!global) {
27585 promiseRv.Throw(NS_ERROR_UNEXPECTED);
27586 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)"
")", "../TestExampleGenBinding.cpp", 27586); AnnotateMozCrashReason
("MOZ_DIAGNOSTIC_ASSERT" "(" "false" ") (" "promiseRv.MaybeSetPendingException(cx)"
")"); do { *((volatile int*)__null) = 27586; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
27587 return false;
27588 }
27589 arg0 = Promise::Resolve(global, cx, valueToResolve,
27590 promiseRv);
27591 if (promiseRv.MaybeSetPendingException(cx)) {
27592 return false;
27593 }
27594 }
27595 // NOTE: This assert does NOT call the function.
27596 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassPromise(NonNullHelper(arg0)))>, "Should be returning void here");
27597 MOZ_KnownLive(self)(self)->PassPromise(NonNullHelper(arg0));
27598 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27598); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27598; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27599 args.rval().setUndefined();
27600 return true;
27601}
27602
27603static const JSJitInfo passPromise_methodinfo = {
27604 { (JSJitGetterOp)passPromise },
27605 { prototypes::id::TestExampleInterface },
27606 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27607 JSJitInfo::Method,
27608 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27609 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27610 false, /* isInfallible. False in setters. */
27611 false, /* isMovable. Not relevant for setters. */
27612 false, /* isEliminatable. Not relevant for setters. */
27613 false, /* isAlwaysInSlot. Only relevant for getters. */
27614 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27615 false, /* isTypedMethod. Only relevant for methods. */
27616 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27617};
27618
27619MOZ_CAN_RUN_SCRIPT static bool
27620passOptionalPromise(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27621{
27622 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27625( cx, "TestExampleInterface"
, "passOptionalPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27623 "TestExampleInterface", "passOptionalPromise", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27625( cx, "TestExampleInterface"
, "passOptionalPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27624 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27625( cx, "TestExampleInterface"
, "passOptionalPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27625 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27625( cx, "TestExampleInterface"
, "passOptionalPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27626
27627 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27628 Optional<OwningNonNull<Promise>> arg0;
27629 if (args.hasDefined(0)) {
27630 arg0.Construct();
27631 { // Scope for our GlobalObject, FastErrorResult, JSAutoRealm,
27632 // etc.
27633
27634 JS::Rooted<JSObject*> globalObj(cx);
27635 globalObj = JS::CurrentGlobalOrNull(cx);
27636 JSAutoRealm ar(cx, globalObj);
27637 GlobalObject promiseGlobal(cx, globalObj);
27638 if (promiseGlobal.Failed()) {
27639 return false;
27640 }
27641
27642 JS::Rooted<JS::Value> valueToResolve(cx, args[0]);
27643 if (!JS_WrapValue(cx, &valueToResolve)) {
27644 return false;
27645 }
27646 binding_detail::FastErrorResult promiseRv;
27647 nsCOMPtr<nsIGlobalObject> global =
27648 do_QueryInterface(promiseGlobal.GetAsSupports());
27649 if (!global) {
27650 promiseRv.Throw(NS_ERROR_UNEXPECTED);
27651 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)"
")", "../TestExampleGenBinding.cpp", 27651); AnnotateMozCrashReason
("MOZ_DIAGNOSTIC_ASSERT" "(" "false" ") (" "promiseRv.MaybeSetPendingException(cx)"
")"); do { *((volatile int*)__null) = 27651; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
27652 return false;
27653 }
27654 arg0.Value() = Promise::Resolve(global, cx, valueToResolve,
27655 promiseRv);
27656 if (promiseRv.MaybeSetPendingException(cx)) {
27657 return false;
27658 }
27659 }
27660 }
27661 // NOTE: This assert does NOT call the function.
27662 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalPromise(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
27663 MOZ_KnownLive(self)(self)->PassOptionalPromise(NonNullHelper(Constify(arg0)));
27664 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27664); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27664; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27665 args.rval().setUndefined();
27666 return true;
27667}
27668
27669static const JSJitInfo passOptionalPromise_methodinfo = {
27670 { (JSJitGetterOp)passOptionalPromise },
27671 { prototypes::id::TestExampleInterface },
27672 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27673 JSJitInfo::Method,
27674 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27675 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27676 false, /* isInfallible. False in setters. */
27677 false, /* isMovable. Not relevant for setters. */
27678 false, /* isEliminatable. Not relevant for setters. */
27679 false, /* isAlwaysInSlot. Only relevant for getters. */
27680 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27681 false, /* isTypedMethod. Only relevant for methods. */
27682 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27683};
27684
27685MOZ_CAN_RUN_SCRIPT static bool
27686passPromiseSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27687{
27688 BindingCallContext cx(cx_, "TestExampleInterface.passPromiseSequence");
27689 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27692( cx, "TestExampleInterface"
, "passPromiseSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27690 "TestExampleInterface", "passPromiseSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27692( cx, "TestExampleInterface"
, "passPromiseSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27691 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27692( cx, "TestExampleInterface"
, "passPromiseSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27692 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27692( cx, "TestExampleInterface"
, "passPromiseSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27693
27694 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27695 if (!args.requireAtLeast(cx, "TestExampleInterface.passPromiseSequence", 1)) {
27696 return false;
27697 }
27698 binding_detail::AutoSequence<OwningNonNull<Promise>> arg0;
27699 if (args[0].isObject()) {
27700 JS::ForOfIterator iter(cx);
27701 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
27702 return false;
27703 }
27704 if (!iter.valueIsIterable()) {
27705 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
27706 return false;
27707 }
27708 binding_detail::AutoSequence<OwningNonNull<Promise>> &arr = arg0;
27709 JS::Rooted<JS::Value> temp(cx);
27710 while (true) {
27711 bool done;
27712 if (!iter.next(&temp, &done)) {
27713 return false;
27714 }
27715 if (done) {
27716 break;
27717 }
27718 OwningNonNull<Promise>* slotPtr = arr.AppendElement(mozilla::fallible);
27719 if (!slotPtr) {
27720 JS_ReportOutOfMemory(cx);
27721 return false;
27722 }
27723 OwningNonNull<Promise>& slot = *slotPtr;
27724 { // Scope for our GlobalObject, FastErrorResult, JSAutoRealm,
27725 // etc.
27726
27727 JS::Rooted<JSObject*> globalObj(cx);
27728 globalObj = JS::CurrentGlobalOrNull(cx);
27729 JSAutoRealm ar(cx, globalObj);
27730 GlobalObject promiseGlobal(cx, globalObj);
27731 if (promiseGlobal.Failed()) {
27732 return false;
27733 }
27734
27735 JS::Rooted<JS::Value> valueToResolve(cx, temp);
27736 if (!JS_WrapValue(cx, &valueToResolve)) {
27737 return false;
27738 }
27739 binding_detail::FastErrorResult promiseRv;
27740 nsCOMPtr<nsIGlobalObject> global =
27741 do_QueryInterface(promiseGlobal.GetAsSupports());
27742 if (!global) {
27743 promiseRv.Throw(NS_ERROR_UNEXPECTED);
27744 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)"
")", "../TestExampleGenBinding.cpp", 27744); AnnotateMozCrashReason
("MOZ_DIAGNOSTIC_ASSERT" "(" "false" ") (" "promiseRv.MaybeSetPendingException(cx)"
")"); do { *((volatile int*)__null) = 27744; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
27745 return false;
27746 }
27747 slot = Promise::Resolve(global, cx, valueToResolve,
27748 promiseRv);
27749 if (promiseRv.MaybeSetPendingException(cx)) {
27750 return false;
27751 }
27752 }
27753 }
27754 } else {
27755 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
27756 return false;
27757 }
27758 // NOTE: This assert does NOT call the function.
27759 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassPromiseSequence(Constify(arg0)))>, "Should be returning void here");
27760 MOZ_KnownLive(self)(self)->PassPromiseSequence(Constify(arg0));
27761 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27761); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27761; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27762 args.rval().setUndefined();
27763 return true;
27764}
27765
27766static const JSJitInfo passPromiseSequence_methodinfo = {
27767 { (JSJitGetterOp)passPromiseSequence },
27768 { prototypes::id::TestExampleInterface },
27769 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27770 JSJitInfo::Method,
27771 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27772 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27773 false, /* isInfallible. False in setters. */
27774 false, /* isMovable. Not relevant for setters. */
27775 false, /* isEliminatable. Not relevant for setters. */
27776 false, /* isAlwaysInSlot. Only relevant for getters. */
27777 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27778 false, /* isTypedMethod. Only relevant for methods. */
27779 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27780};
27781
27782MOZ_CAN_RUN_SCRIPT static bool
27783receivePromise(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27784{
27785 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27788( cx, "TestExampleInterface"
, "receivePromise", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27786 "TestExampleInterface", "receivePromise", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27788( cx, "TestExampleInterface"
, "receivePromise", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27787 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27788( cx, "TestExampleInterface"
, "receivePromise", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27788 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27788( cx, "TestExampleInterface"
, "receivePromise", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27789
27790 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27791 auto result(StrongOrRawPtr<Promise>(MOZ_KnownLive(self)(self)->ReceivePromise()));
27792 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27792); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27792; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27793 if (!ToJSValue(cx, result, args.rval())) {
27794 return false;
27795 }
27796 return true;
27797}
27798
27799MOZ_CAN_RUN_SCRIPT static bool
27800receivePromise_promiseWrapper(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27801{
27802 bool ok = receivePromise(cx, obj, void_self, args);
27803 if (ok) {
27804 return true;
27805 }
27806 return ConvertExceptionToPromise(cx, args.rval());
27807}
27808
27809static const JSJitInfo receivePromise_methodinfo = {
27810 { (JSJitGetterOp)receivePromise_promiseWrapper },
27811 { prototypes::id::TestExampleInterface },
27812 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27813 JSJitInfo::Method,
27814 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27815 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
27816 false, /* isInfallible. False in setters. */
27817 false, /* isMovable. Not relevant for setters. */
27818 false, /* isEliminatable. Not relevant for setters. */
27819 false, /* isAlwaysInSlot. Only relevant for getters. */
27820 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27821 false, /* isTypedMethod. Only relevant for methods. */
27822 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27823};
27824
27825MOZ_CAN_RUN_SCRIPT static bool
27826receiveAddrefedPromise(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27827{
27828 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27831( cx, "TestExampleInterface"
, "receiveAddrefedPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27829 "TestExampleInterface", "receiveAddrefedPromise", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27831( cx, "TestExampleInterface"
, "receiveAddrefedPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27830 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27831( cx, "TestExampleInterface"
, "receiveAddrefedPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27831 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27831( cx, "TestExampleInterface"
, "receiveAddrefedPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27832
27833 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
27834 auto result(StrongOrRawPtr<Promise>(MOZ_KnownLive(self)(self)->ReceiveAddrefedPromise()));
27835 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 27835); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27835; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27836 if (!ToJSValue(cx, result, args.rval())) {
27837 return false;
27838 }
27839 return true;
27840}
27841
27842MOZ_CAN_RUN_SCRIPT static bool
27843receiveAddrefedPromise_promiseWrapper(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27844{
27845 bool ok = receiveAddrefedPromise(cx, obj, void_self, args);
27846 if (ok) {
27847 return true;
27848 }
27849 return ConvertExceptionToPromise(cx, args.rval());
27850}
27851
27852static const JSJitInfo receiveAddrefedPromise_methodinfo = {
27853 { (JSJitGetterOp)receiveAddrefedPromise_promiseWrapper },
27854 { prototypes::id::TestExampleInterface },
27855 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
27856 JSJitInfo::Method,
27857 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27858 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
27859 false, /* isInfallible. False in setters. */
27860 false, /* isMovable. Not relevant for setters. */
27861 false, /* isEliminatable. Not relevant for setters. */
27862 false, /* isAlwaysInSlot. Only relevant for getters. */
27863 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27864 false, /* isTypedMethod. Only relevant for methods. */
27865 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27866};
27867
27868namespace BooleanObservableArray_Binding {
27869class ObservableArrayProxyHandler : public mozilla::dom::ObservableArrayProxyHandler
27870{
27871protected:
27872 bool
27873 OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const override;
27874
27875 bool
27876 SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const override;
27877
27878public:
27879 static const ObservableArrayProxyHandler*
27880 getInstance();
27881};
27882
27883bool
27884ObservableArrayProxyHandler::OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const
27885{
27886 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 27886); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 27886; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
27887
27888 BindingCallContext cx(aCx, "ObservableArray OnDeleteItem");
27889 bool decl;
27890 if (!ValueToPrimitive<bool, eDefault>(cx, aValue, "Element in ObservableArray backing list", &decl)) {
27891 MOZ_ASSERT_UNREACHABLE("The item in ObservableArray backing list is not Boolean?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(false)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("false" " (" "MOZ_ASSERT_UNREACHABLE: "
"The item in ObservableArray backing list is not Boolean?" ")"
, "../TestExampleGenBinding.cpp", 27891); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "false" ") (" "MOZ_ASSERT_UNREACHABLE: " "The item in ObservableArray backing list is not Boolean?"
")"); do { *((volatile int*)__null) = 27891; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
27892 return false;
27893 }
27894
27895 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
27896 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
27897 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 27897); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 27897; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
27898
27899 ErrorResult rv;
27900 MOZ_KnownLive(interface)(interface)->OnDeleteBooleanObservableArray(decl, aIndex, rv);
27901 return !rv.MaybeSetPendingException(cx);
27902}
27903
27904bool
27905ObservableArrayProxyHandler::SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const
27906{
27907 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 27907); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 27907; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
27908 uint32_t oldLen;
27909 if (!JS::GetArrayLength(aCx, aBackingList, &oldLen)) {
27910 return false;
27911 }
27912
27913 if (aIndex > oldLen) {
27914 return aResult.failBadIndex();
27915 }
27916
27917 BindingCallContext cx(aCx, "ObservableArray SetIndexedValue");
27918 bool decl;
27919 if (!ValueToPrimitive<bool, eDefault>(cx, aValue, "Element in ObservableArray backing list", &decl)) {
27920 return false;
27921 }
27922
27923 if (aIndex < oldLen) {
27924 JS::Rooted<JS::Value> value(aCx);
27925 if (!JS_GetElement(aCx, aBackingList, aIndex, &value)) {
27926 return false;
27927 }
27928
27929 if (!OnDeleteItem(aCx, aProxy, value, aIndex)) {
27930 return false;
27931 }
27932 }
27933
27934 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
27935 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
27936 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 27936); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 27936; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
27937
27938 ErrorResult rv;
27939 MOZ_KnownLive(interface)(interface)->OnSetBooleanObservableArray(decl, aIndex, rv);
27940 if (rv.MaybeSetPendingException(cx)) {
27941 return false;
27942 }
27943
27944 if (!JS_SetElement(aCx, aBackingList, aIndex, aValue)) {
27945 return false;
27946 }
27947
27948 return aResult.succeed();
27949}
27950
27951const ObservableArrayProxyHandler*
27952ObservableArrayProxyHandler::getInstance()
27953{
27954 static const ObservableArrayProxyHandler instance;
27955 return &instance;
27956}
27957} // namespace BooleanObservableArray_Binding
27958
27959namespace BooleanObservableArrayHelpers {
27960bool
27961ElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, ErrorResult& aRv)
27962{
27963 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 27963); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 27963; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
27964 AutoJSAPI jsapi;
27965 jsapi.Init();
27966 JSContext* cx = jsapi.cx();
27967 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
27968 // all we want is to wrap into _some_ scope and then unwrap to find
27969 // the reflector, and wrapping has no side-effects.
27970 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
27971 if (!scope) {
27972 aRv.Throw(NS_ERROR_UNEXPECTED);
27973 return bool(0);
27974 }
27975 JSAutoRealm tempRealm(cx, scope);
27976 JS::Rooted<JS::Value> v(cx);
27977 if(!ToJSValue(cx, self, &v)) {
27978 aRv.Throw(NS_ERROR_UNEXPECTED);
27979 return bool(0);
27980 }
27981 // This is a reflector, but due to trying to name things
27982 // similarly across method generators, it's called obj here.
27983 JS::Rooted<JSObject*> obj(cx);
27984 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
27985 JSAutoRealm reflectorRealm(cx, obj);
27986
27987 JS::Rooted<JSObject*> backingObj(cx);
27988 bool created = false;
27989 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 9),
27990 &backingObj, &created, BooleanObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
27991 self)) {
27992 aRv.Throw(NS_ERROR_UNEXPECTED);
27993 return bool(0);
27994 }
27995 if (created) {
27996 PreserveWrapper(self);
27997 }
27998 JS::Rooted<JS::Value> result(cx);
27999 aRv.MightThrowJSException();
28000 if (!JS_GetElement(cx, backingObj, aIndex, &result)) {
28001 aRv.StealExceptionFromJSContext(cx);
28002 return bool(0);
28003 }
28004 if (result.isUndefined()) {
28005 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
28006 return bool(0);
28007 }
28008 bool rvalDecl;
28009 if (!ValueToPrimitive<bool, eDefault>(cx, result, "Return value of ElementAt", &rvalDecl)) {
28010 aRv.NoteJSContextException(cx);
28011 return bool(0);
28012 }
28013 return rvalDecl;
28014}
28015
28016void
28017ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, bool aValue, ErrorResult& aRv)
28018{
28019 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28019); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28019; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28020 AutoJSAPI jsapi;
28021 jsapi.Init();
28022 JSContext* cx = jsapi.cx();
28023 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
28024 // all we want is to wrap into _some_ scope and then unwrap to find
28025 // the reflector, and wrapping has no side-effects.
28026 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
28027 if (!scope) {
28028 aRv.Throw(NS_ERROR_UNEXPECTED);
28029 return;
28030 }
28031 JSAutoRealm tempRealm(cx, scope);
28032 JS::Rooted<JS::Value> v(cx);
28033 if(!ToJSValue(cx, self, &v)) {
28034 aRv.Throw(NS_ERROR_UNEXPECTED);
28035 return;
28036 }
28037 // This is a reflector, but due to trying to name things
28038 // similarly across method generators, it's called obj here.
28039 JS::Rooted<JSObject*> obj(cx);
28040 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28041 JSAutoRealm reflectorRealm(cx, obj);
28042 JS::RootedVector<JS::Value> argv(cx);
28043 if (!argv.resize(1)) {
28044 aRv.Throw(NS_ERROR_UNEXPECTED);
28045 return;
28046 }
28047 do {
28048 argv[0].setBoolean(aValue);
28049 break;
28050 } while (false);
28051
28052 JS::Rooted<JSObject*> backingObj(cx);
28053 bool created = false;
28054 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 9),
28055 &backingObj, &created, BooleanObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28056 self)) {
28057 aRv.Throw(NS_ERROR_UNEXPECTED);
28058 return;
28059 }
28060 if (created) {
28061 PreserveWrapper(self);
28062 }
28063 uint32_t length;
28064 aRv.MightThrowJSException();
28065 if (!JS::GetArrayLength(cx, backingObj, &length)) {
28066 aRv.StealExceptionFromJSContext(cx);
28067 return;
28068 }
28069 if (aIndex > length) {
28070 aRv.ThrowRangeError("Invalid index");
28071 return;
28072 }
28073 aRv.MightThrowJSException();
28074 if (!JS_SetElement(cx, backingObj, aIndex, argv[0])) {
28075 aRv.StealExceptionFromJSContext(cx);
28076 return;
28077 }
28078}
28079
28080void
28081AppendElement(mozilla::dom::TestExampleInterface* self, bool aValue, ErrorResult& aRv)
28082{
28083 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28083); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28083; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28084 AutoJSAPI jsapi;
28085 jsapi.Init();
28086 JSContext* cx = jsapi.cx();
28087 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
28088 // all we want is to wrap into _some_ scope and then unwrap to find
28089 // the reflector, and wrapping has no side-effects.
28090 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
28091 if (!scope) {
28092 aRv.Throw(NS_ERROR_UNEXPECTED);
28093 return;
28094 }
28095 JSAutoRealm tempRealm(cx, scope);
28096 JS::Rooted<JS::Value> v(cx);
28097 if(!ToJSValue(cx, self, &v)) {
28098 aRv.Throw(NS_ERROR_UNEXPECTED);
28099 return;
28100 }
28101 // This is a reflector, but due to trying to name things
28102 // similarly across method generators, it's called obj here.
28103 JS::Rooted<JSObject*> obj(cx);
28104 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28105 JSAutoRealm reflectorRealm(cx, obj);
28106 JS::RootedVector<JS::Value> argv(cx);
28107 if (!argv.resize(1)) {
28108 aRv.Throw(NS_ERROR_UNEXPECTED);
28109 return;
28110 }
28111 do {
28112 argv[0].setBoolean(aValue);
28113 break;
28114 } while (false);
28115
28116 JS::Rooted<JSObject*> backingObj(cx);
28117 bool created = false;
28118 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 9),
28119 &backingObj, &created, BooleanObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28120 self)) {
28121 aRv.Throw(NS_ERROR_UNEXPECTED);
28122 return;
28123 }
28124 if (created) {
28125 PreserveWrapper(self);
28126 }
28127 uint32_t length;
28128 aRv.MightThrowJSException();
28129 if (!JS::GetArrayLength(cx, backingObj, &length)) {
28130 aRv.StealExceptionFromJSContext(cx);
28131 return;
28132 }
28133 aRv.MightThrowJSException();
28134 if (!JS_SetElement(cx, backingObj, length, argv[0])) {
28135 aRv.StealExceptionFromJSContext(cx);
28136 return;
28137 }
28138}
28139
28140void
28141RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
28142{
28143 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28143); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28143; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28144 AutoJSAPI jsapi;
28145 jsapi.Init();
28146 JSContext* cx = jsapi.cx();
28147 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
28148 // all we want is to wrap into _some_ scope and then unwrap to find
28149 // the reflector, and wrapping has no side-effects.
28150 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
28151 if (!scope) {
28152 aRv.Throw(NS_ERROR_UNEXPECTED);
28153 return;
28154 }
28155 JSAutoRealm tempRealm(cx, scope);
28156 JS::Rooted<JS::Value> v(cx);
28157 if(!ToJSValue(cx, self, &v)) {
28158 aRv.Throw(NS_ERROR_UNEXPECTED);
28159 return;
28160 }
28161 // This is a reflector, but due to trying to name things
28162 // similarly across method generators, it's called obj here.
28163 JS::Rooted<JSObject*> obj(cx);
28164 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28165 JSAutoRealm reflectorRealm(cx, obj);
28166
28167 JS::Rooted<JSObject*> backingObj(cx);
28168 bool created = false;
28169 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 9),
28170 &backingObj, &created, BooleanObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28171 self)) {
28172 aRv.Throw(NS_ERROR_UNEXPECTED);
28173 return;
28174 }
28175 if (created) {
28176 PreserveWrapper(self);
28177 }
28178 uint32_t length;
28179 aRv.MightThrowJSException();
28180 if (!JS::GetArrayLength(cx, backingObj, &length)) {
28181 aRv.StealExceptionFromJSContext(cx);
28182 return;
28183 }
28184 if (length == 0) {
28185 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
28186 return;
28187 }
28188 aRv.MightThrowJSException();
28189 if (!JS::SetArrayLength(cx, backingObj, length - 1)) {
28190 aRv.StealExceptionFromJSContext(cx);
28191 return;
28192 }
28193}
28194
28195uint32_t
28196Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
28197{
28198 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28198); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28198; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28199 AutoJSAPI jsapi;
28200 jsapi.Init();
28201 JSContext* cx = jsapi.cx();
28202 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
28203 // all we want is to wrap into _some_ scope and then unwrap to find
28204 // the reflector, and wrapping has no side-effects.
28205 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
28206 if (!scope) {
28207 aRv.Throw(NS_ERROR_UNEXPECTED);
28208 return uint32_t(0);
28209 }
28210 JSAutoRealm tempRealm(cx, scope);
28211 JS::Rooted<JS::Value> v(cx);
28212 if(!ToJSValue(cx, self, &v)) {
28213 aRv.Throw(NS_ERROR_UNEXPECTED);
28214 return uint32_t(0);
28215 }
28216 // This is a reflector, but due to trying to name things
28217 // similarly across method generators, it's called obj here.
28218 JS::Rooted<JSObject*> obj(cx);
28219 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28220 JSAutoRealm reflectorRealm(cx, obj);
28221
28222 JS::Rooted<JSObject*> backingObj(cx);
28223 bool created = false;
28224 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 9),
28225 &backingObj, &created, BooleanObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28226 self)) {
28227 aRv.Throw(NS_ERROR_UNEXPECTED);
28228 return uint32_t(0);
28229 }
28230 if (created) {
28231 PreserveWrapper(self);
28232 }
28233 uint32_t retVal;
28234 aRv.MightThrowJSException();
28235 if (!JS::GetArrayLength(cx, backingObj, &retVal)) {
28236 aRv.StealExceptionFromJSContext(cx);
28237 return uint32_t(0);
28238 }
28239 return retVal;
28240}
28241} // namespace BooleanObservableArrayHelpers
28242
28243MOZ_CAN_RUN_SCRIPT static bool
28244get_booleanObservableArray(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
28245{
28246 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28249( cx, "TestExampleInterface"
, "booleanObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28247 "TestExampleInterface", "booleanObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28249( cx, "TestExampleInterface"
, "booleanObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28248 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject28249( cx, "TestExampleInterface"
, "booleanObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28249 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28249( cx, "TestExampleInterface"
, "booleanObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
28250
28251 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
28252 JS::Rooted<JSObject*> backingObj(cx);
28253 bool created = false;
28254 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 9),
28255 &backingObj, &created, BooleanObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28256 self)) {
28257 return false;
28258 }
28259 if (created) {
28260 PreserveWrapper(self);
28261 }
28262 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 28262); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28262; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28263 args.rval().setObject(*backingObj);
28264 return true;
28265}
28266
28267MOZ_CAN_RUN_SCRIPT static bool
28268set_booleanObservableArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
28269{
28270 BindingCallContext cx(cx_, "TestExampleInterface.booleanObservableArray setter");
28271 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28274( cx, "TestExampleInterface"
, "booleanObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28272 "TestExampleInterface", "booleanObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28274( cx, "TestExampleInterface"
, "booleanObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28273 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject28274( cx, "TestExampleInterface"
, "booleanObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28274 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28274( cx, "TestExampleInterface"
, "booleanObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
28275
28276 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
28277 binding_detail::AutoSequence<bool> arg0;
28278 if (args[0].isObject()) {
28279 JS::ForOfIterator iter(cx);
28280 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
28281 return false;
28282 }
28283 if (!iter.valueIsIterable()) {
28284 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
28285 return false;
28286 }
28287 binding_detail::AutoSequence<bool> &arr = arg0;
28288 JS::Rooted<JS::Value> temp(cx);
28289 while (true) {
28290 bool done;
28291 if (!iter.next(&temp, &done)) {
28292 return false;
28293 }
28294 if (done) {
28295 break;
28296 }
28297 bool* slotPtr = arr.AppendElement(mozilla::fallible);
28298 if (!slotPtr) {
28299 JS_ReportOutOfMemory(cx);
28300 return false;
28301 }
28302 bool& slot = *slotPtr;
28303 if (!ValueToPrimitive<bool, eDefault>(cx, temp, "Element of value being assigned", &slot)) {
28304 return false;
28305 }
28306 }
28307 } else {
28308 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
28309 return false;
28310 }
28311 if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
28312 JS_ReportErrorASCII(cx, "Accessing from Xray wrapper is not supported.");
28313 return false;
28314 }
28315
28316 JS::Rooted<JSObject*> backingObj(cx);
28317 bool created = false;
28318 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 9),
28319 &backingObj, &created, BooleanObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28320 self)) {
28321 return false;
28322 }
28323 if (created) {
28324 PreserveWrapper(self);
28325 }
28326
28327 const ObservableArrayProxyHandler* handler = GetObservableArrayProxyHandler(backingObj);
28328 if (!handler->SetLength(cx, backingObj, 0)) {
28329 return false;
28330 }
28331
28332 JS::Rooted<JS::Value> val(cx);
28333 for (size_t i = 0; i < arg0.Length(); i++) {
28334 val.setBoolean(arg0.ElementAt(i));
28335 if (!JS_SetElement(cx, backingObj, i, val)) {
28336 return false;
28337 }
28338 }
28339
28340 return true;
28341}
28342
28343static const JSJitInfo booleanObservableArray_getterinfo = {
28344 { get_booleanObservableArray },
28345 { prototypes::id::TestExampleInterface },
28346 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
28347 JSJitInfo::Getter,
28348 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28349 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
28350 false, /* isInfallible. False in setters. */
28351 false, /* isMovable. Not relevant for setters. */
28352 false, /* isEliminatable. Not relevant for setters. */
28353 false, /* isAlwaysInSlot. Only relevant for getters. */
28354 true, /* isLazilyCachedInSlot. Only relevant for getters. */
28355 false, /* isTypedMethod. Only relevant for methods. */
28356 (DOM_INSTANCE_RESERVED_SLOTS1 + 9) /* Reserved slot index, if we're stored in a slot, else 0. */
28357};
28358static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 9) <= JSJitInfo::maxSlotIndex, "We won't fit");
28359static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 9) < 22, "There is no slot for us");
28360static const JSJitInfo booleanObservableArray_setterinfo = {
28361 { (JSJitGetterOp)set_booleanObservableArray },
28362 { prototypes::id::TestExampleInterface },
28363 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
28364 JSJitInfo::Setter,
28365 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28366 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28367 false, /* isInfallible. False in setters. */
28368 false, /* isMovable. Not relevant for setters. */
28369 false, /* isEliminatable. Not relevant for setters. */
28370 false, /* isAlwaysInSlot. Only relevant for getters. */
28371 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28372 false, /* isTypedMethod. Only relevant for methods. */
28373 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28374};
28375
28376namespace ObjectObservableArray_Binding {
28377class ObservableArrayProxyHandler : public mozilla::dom::ObservableArrayProxyHandler
28378{
28379protected:
28380 bool
28381 OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const override;
28382
28383 bool
28384 SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const override;
28385
28386public:
28387 static const ObservableArrayProxyHandler*
28388 getInstance();
28389};
28390
28391bool
28392ObservableArrayProxyHandler::OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const
28393{
28394 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 28394); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 28394; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
28395
28396 BindingCallContext cx(aCx, "ObservableArray OnDeleteItem");
28397 JS::Rooted<JSObject*> decl(cx);
28398 if (aValue.isObject()) {
28399 decl = &aValue.toObject();
28400 } else {
28401 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element in ObservableArray backing list");
28402 MOZ_ASSERT_UNREACHABLE("The item in ObservableArray backing list is not Object?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(false)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("false" " (" "MOZ_ASSERT_UNREACHABLE: "
"The item in ObservableArray backing list is not Object?" ")"
, "../TestExampleGenBinding.cpp", 28402); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "false" ") (" "MOZ_ASSERT_UNREACHABLE: " "The item in ObservableArray backing list is not Object?"
")"); do { *((volatile int*)__null) = 28402; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
28403 return false;
28404 }
28405
28406 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
28407 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
28408 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 28408); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 28408; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
28409
28410 ErrorResult rv;
28411 MOZ_KnownLive(interface)(interface)->OnDeleteObjectObservableArray(cx, decl, aIndex, rv);
28412 return !rv.MaybeSetPendingException(cx);
28413}
28414
28415bool
28416ObservableArrayProxyHandler::SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const
28417{
28418 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 28418); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 28418; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
28419 uint32_t oldLen;
28420 if (!JS::GetArrayLength(aCx, aBackingList, &oldLen)) {
28421 return false;
28422 }
28423
28424 if (aIndex > oldLen) {
28425 return aResult.failBadIndex();
28426 }
28427
28428 BindingCallContext cx(aCx, "ObservableArray SetIndexedValue");
28429 JS::Rooted<JSObject*> decl(cx);
28430 if (aValue.isObject()) {
28431 decl = &aValue.toObject();
28432 } else {
28433 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element in ObservableArray backing list");
28434 return false;
28435 }
28436
28437 if (aIndex < oldLen) {
28438 JS::Rooted<JS::Value> value(aCx);
28439 if (!JS_GetElement(aCx, aBackingList, aIndex, &value)) {
28440 return false;
28441 }
28442
28443 if (!OnDeleteItem(aCx, aProxy, value, aIndex)) {
28444 return false;
28445 }
28446 }
28447
28448 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
28449 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
28450 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 28450); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 28450; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
28451
28452 ErrorResult rv;
28453 MOZ_KnownLive(interface)(interface)->OnSetObjectObservableArray(cx, decl, aIndex, rv);
28454 if (rv.MaybeSetPendingException(cx)) {
28455 return false;
28456 }
28457
28458 if (!JS_SetElement(aCx, aBackingList, aIndex, aValue)) {
28459 return false;
28460 }
28461
28462 return aResult.succeed();
28463}
28464
28465const ObservableArrayProxyHandler*
28466ObservableArrayProxyHandler::getInstance()
28467{
28468 static const ObservableArrayProxyHandler instance;
28469 return &instance;
28470}
28471} // namespace ObjectObservableArray_Binding
28472
28473namespace ObjectObservableArrayHelpers {
28474void
28475ElementAt(mozilla::dom::TestExampleInterface* self, JSContext* cx, uint32_t aIndex, JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv)
28476{
28477 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28477); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28477; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28478 JS::Rooted<JS::Value> v(cx);
28479 if(!ToJSValue(cx, self, &v)) {
28480 aRv.Throw(NS_ERROR_UNEXPECTED);
28481 return;
28482 }
28483 // This is a reflector, but due to trying to name things
28484 // similarly across method generators, it's called obj here.
28485 JS::Rooted<JSObject*> obj(cx);
28486 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28487 JS::Rooted<JS::Value> result(cx);
28488 {
28489 JSAutoRealm reflectorRealm(cx, obj);
28490
28491 JS::Rooted<JSObject*> backingObj(cx);
28492 bool created = false;
28493 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 10),
28494 &backingObj, &created, ObjectObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28495 self)) {
28496 aRv.Throw(NS_ERROR_UNEXPECTED);
28497 return;
28498 }
28499 if (created) {
28500 PreserveWrapper(self);
28501 }
28502 aRv.MightThrowJSException();
28503 if (!JS_GetElement(cx, backingObj, aIndex, &result)) {
28504 aRv.StealExceptionFromJSContext(cx);
28505 return;
28506 }
28507 if (result.isUndefined()) {
28508 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
28509 return;
28510 }
28511 }
28512 if (!JS_WrapValue(cx, &result)) {
28513 aRv.NoteJSContextException(cx);
28514 return;
28515 }
28516 JS::Rooted<JSObject*> rvalDecl(cx);
28517 rvalDecl = &result.toObject();
28518 aRetVal.set(rvalDecl);
28519}
28520
28521void
28522ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, JS::Handle<JSObject*> aValue, ErrorResult& aRv)
28523{
28524 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28524); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28524; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28525 AutoJSAPI jsapi;
28526 jsapi.Init();
28527 JSContext* cx = jsapi.cx();
28528 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
28529 // all we want is to wrap into _some_ scope and then unwrap to find
28530 // the reflector, and wrapping has no side-effects.
28531 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
28532 if (!scope) {
28533 aRv.Throw(NS_ERROR_UNEXPECTED);
28534 return;
28535 }
28536 JSAutoRealm tempRealm(cx, scope);
28537 JS::Rooted<JS::Value> v(cx);
28538 if(!ToJSValue(cx, self, &v)) {
28539 aRv.Throw(NS_ERROR_UNEXPECTED);
28540 return;
28541 }
28542 // This is a reflector, but due to trying to name things
28543 // similarly across method generators, it's called obj here.
28544 JS::Rooted<JSObject*> obj(cx);
28545 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28546 JSAutoRealm reflectorRealm(cx, obj);
28547 JS::RootedVector<JS::Value> argv(cx);
28548 if (!argv.resize(1)) {
28549 aRv.Throw(NS_ERROR_UNEXPECTED);
28550 return;
28551 }
28552 do {
28553 JS::ExposeObjectToActiveJS(aValue);
28554 argv[0].setObject(*aValue);
28555 if (!MaybeWrapObjectValue(cx, argv[0])) {
28556 aRv.Throw(NS_ERROR_UNEXPECTED);
28557 return;
28558 }
28559 break;
28560 } while (false);
28561
28562 JS::Rooted<JSObject*> backingObj(cx);
28563 bool created = false;
28564 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 10),
28565 &backingObj, &created, ObjectObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28566 self)) {
28567 aRv.Throw(NS_ERROR_UNEXPECTED);
28568 return;
28569 }
28570 if (created) {
28571 PreserveWrapper(self);
28572 }
28573 uint32_t length;
28574 aRv.MightThrowJSException();
28575 if (!JS::GetArrayLength(cx, backingObj, &length)) {
28576 aRv.StealExceptionFromJSContext(cx);
28577 return;
28578 }
28579 if (aIndex > length) {
28580 aRv.ThrowRangeError("Invalid index");
28581 return;
28582 }
28583 aRv.MightThrowJSException();
28584 if (!JS_SetElement(cx, backingObj, aIndex, argv[0])) {
28585 aRv.StealExceptionFromJSContext(cx);
28586 return;
28587 }
28588}
28589
28590void
28591AppendElement(mozilla::dom::TestExampleInterface* self, JS::Handle<JSObject*> aValue, ErrorResult& aRv)
28592{
28593 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28593); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28593; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28594 AutoJSAPI jsapi;
28595 jsapi.Init();
28596 JSContext* cx = jsapi.cx();
28597 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
28598 // all we want is to wrap into _some_ scope and then unwrap to find
28599 // the reflector, and wrapping has no side-effects.
28600 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
28601 if (!scope) {
28602 aRv.Throw(NS_ERROR_UNEXPECTED);
28603 return;
28604 }
28605 JSAutoRealm tempRealm(cx, scope);
28606 JS::Rooted<JS::Value> v(cx);
28607 if(!ToJSValue(cx, self, &v)) {
28608 aRv.Throw(NS_ERROR_UNEXPECTED);
28609 return;
28610 }
28611 // This is a reflector, but due to trying to name things
28612 // similarly across method generators, it's called obj here.
28613 JS::Rooted<JSObject*> obj(cx);
28614 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28615 JSAutoRealm reflectorRealm(cx, obj);
28616 JS::RootedVector<JS::Value> argv(cx);
28617 if (!argv.resize(1)) {
28618 aRv.Throw(NS_ERROR_UNEXPECTED);
28619 return;
28620 }
28621 do {
28622 JS::ExposeObjectToActiveJS(aValue);
28623 argv[0].setObject(*aValue);
28624 if (!MaybeWrapObjectValue(cx, argv[0])) {
28625 aRv.Throw(NS_ERROR_UNEXPECTED);
28626 return;
28627 }
28628 break;
28629 } while (false);
28630
28631 JS::Rooted<JSObject*> backingObj(cx);
28632 bool created = false;
28633 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 10),
28634 &backingObj, &created, ObjectObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28635 self)) {
28636 aRv.Throw(NS_ERROR_UNEXPECTED);
28637 return;
28638 }
28639 if (created) {
28640 PreserveWrapper(self);
28641 }
28642 uint32_t length;
28643 aRv.MightThrowJSException();
28644 if (!JS::GetArrayLength(cx, backingObj, &length)) {
28645 aRv.StealExceptionFromJSContext(cx);
28646 return;
28647 }
28648 aRv.MightThrowJSException();
28649 if (!JS_SetElement(cx, backingObj, length, argv[0])) {
28650 aRv.StealExceptionFromJSContext(cx);
28651 return;
28652 }
28653}
28654
28655void
28656RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
28657{
28658 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28658); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28658; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28659 AutoJSAPI jsapi;
28660 jsapi.Init();
28661 JSContext* cx = jsapi.cx();
28662 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
28663 // all we want is to wrap into _some_ scope and then unwrap to find
28664 // the reflector, and wrapping has no side-effects.
28665 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
28666 if (!scope) {
28667 aRv.Throw(NS_ERROR_UNEXPECTED);
28668 return;
28669 }
28670 JSAutoRealm tempRealm(cx, scope);
28671 JS::Rooted<JS::Value> v(cx);
28672 if(!ToJSValue(cx, self, &v)) {
28673 aRv.Throw(NS_ERROR_UNEXPECTED);
28674 return;
28675 }
28676 // This is a reflector, but due to trying to name things
28677 // similarly across method generators, it's called obj here.
28678 JS::Rooted<JSObject*> obj(cx);
28679 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28680 JSAutoRealm reflectorRealm(cx, obj);
28681
28682 JS::Rooted<JSObject*> backingObj(cx);
28683 bool created = false;
28684 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 10),
28685 &backingObj, &created, ObjectObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28686 self)) {
28687 aRv.Throw(NS_ERROR_UNEXPECTED);
28688 return;
28689 }
28690 if (created) {
28691 PreserveWrapper(self);
28692 }
28693 uint32_t length;
28694 aRv.MightThrowJSException();
28695 if (!JS::GetArrayLength(cx, backingObj, &length)) {
28696 aRv.StealExceptionFromJSContext(cx);
28697 return;
28698 }
28699 if (length == 0) {
28700 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
28701 return;
28702 }
28703 aRv.MightThrowJSException();
28704 if (!JS::SetArrayLength(cx, backingObj, length - 1)) {
28705 aRv.StealExceptionFromJSContext(cx);
28706 return;
28707 }
28708}
28709
28710uint32_t
28711Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
28712{
28713 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28713); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28713; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28714 AutoJSAPI jsapi;
28715 jsapi.Init();
28716 JSContext* cx = jsapi.cx();
28717 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
28718 // all we want is to wrap into _some_ scope and then unwrap to find
28719 // the reflector, and wrapping has no side-effects.
28720 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
28721 if (!scope) {
28722 aRv.Throw(NS_ERROR_UNEXPECTED);
28723 return uint32_t(0);
28724 }
28725 JSAutoRealm tempRealm(cx, scope);
28726 JS::Rooted<JS::Value> v(cx);
28727 if(!ToJSValue(cx, self, &v)) {
28728 aRv.Throw(NS_ERROR_UNEXPECTED);
28729 return uint32_t(0);
28730 }
28731 // This is a reflector, but due to trying to name things
28732 // similarly across method generators, it's called obj here.
28733 JS::Rooted<JSObject*> obj(cx);
28734 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28735 JSAutoRealm reflectorRealm(cx, obj);
28736
28737 JS::Rooted<JSObject*> backingObj(cx);
28738 bool created = false;
28739 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 10),
28740 &backingObj, &created, ObjectObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28741 self)) {
28742 aRv.Throw(NS_ERROR_UNEXPECTED);
28743 return uint32_t(0);
28744 }
28745 if (created) {
28746 PreserveWrapper(self);
28747 }
28748 uint32_t retVal;
28749 aRv.MightThrowJSException();
28750 if (!JS::GetArrayLength(cx, backingObj, &retVal)) {
28751 aRv.StealExceptionFromJSContext(cx);
28752 return uint32_t(0);
28753 }
28754 return retVal;
28755}
28756} // namespace ObjectObservableArrayHelpers
28757
28758MOZ_CAN_RUN_SCRIPT static bool
28759get_objectObservableArray(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
28760{
28761 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28764( cx, "TestExampleInterface"
, "objectObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28762 "TestExampleInterface", "objectObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28764( cx, "TestExampleInterface"
, "objectObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28763 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject28764( cx, "TestExampleInterface"
, "objectObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28764 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28764( cx, "TestExampleInterface"
, "objectObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
28765
28766 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
28767 JS::Rooted<JSObject*> backingObj(cx);
28768 bool created = false;
28769 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 10),
28770 &backingObj, &created, ObjectObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28771 self)) {
28772 return false;
28773 }
28774 if (created) {
28775 PreserveWrapper(self);
28776 }
28777 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 28777); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28777; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28778 args.rval().setObject(*backingObj);
28779 return true;
28780}
28781
28782MOZ_CAN_RUN_SCRIPT static bool
28783set_objectObservableArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
28784{
28785 BindingCallContext cx(cx_, "TestExampleInterface.objectObservableArray setter");
28786 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28789( cx, "TestExampleInterface"
, "objectObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28787 "TestExampleInterface", "objectObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28789( cx, "TestExampleInterface"
, "objectObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28788 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject28789( cx, "TestExampleInterface"
, "objectObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28789 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28789( cx, "TestExampleInterface"
, "objectObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
28790
28791 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
28792 binding_detail::AutoSequence<JSObject*> arg0;
28793 SequenceRooter<JSObject*> arg0_holder(cx, &arg0);
28794 if (args[0].isObject()) {
28795 JS::ForOfIterator iter(cx);
28796 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
28797 return false;
28798 }
28799 if (!iter.valueIsIterable()) {
28800 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
28801 return false;
28802 }
28803 binding_detail::AutoSequence<JSObject*> &arr = arg0;
28804 JS::Rooted<JS::Value> temp(cx);
28805 while (true) {
28806 bool done;
28807 if (!iter.next(&temp, &done)) {
28808 return false;
28809 }
28810 if (done) {
28811 break;
28812 }
28813 JSObject** slotPtr = arr.AppendElement(nullptr, mozilla::fallible);
28814 if (!slotPtr) {
28815 JS_ReportOutOfMemory(cx);
28816 return false;
28817 }
28818 JSObject*& slot = *slotPtr;
28819 if (temp.isObject()) {
28820 slot = &temp.toObject();
28821 } else {
28822 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of value being assigned");
28823 return false;
28824 }
28825 }
28826 } else {
28827 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
28828 return false;
28829 }
28830 if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
28831 JS_ReportErrorASCII(cx, "Accessing from Xray wrapper is not supported.");
28832 return false;
28833 }
28834
28835 JS::Rooted<JSObject*> backingObj(cx);
28836 bool created = false;
28837 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 10),
28838 &backingObj, &created, ObjectObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
28839 self)) {
28840 return false;
28841 }
28842 if (created) {
28843 PreserveWrapper(self);
28844 }
28845
28846 const ObservableArrayProxyHandler* handler = GetObservableArrayProxyHandler(backingObj);
28847 if (!handler->SetLength(cx, backingObj, 0)) {
28848 return false;
28849 }
28850
28851 JS::Rooted<JS::Value> val(cx);
28852 for (size_t i = 0; i < arg0.Length(); i++) {
28853 JS::ExposeObjectToActiveJS(arg0.ElementAt(i));
28854 val.setObject(*arg0.ElementAt(i));
28855 if (!MaybeWrapObjectValue(cx, &val)) {
28856 return false;
28857 }
28858 if (!JS_SetElement(cx, backingObj, i, val)) {
28859 return false;
28860 }
28861 }
28862
28863 return true;
28864}
28865
28866static const JSJitInfo objectObservableArray_getterinfo = {
28867 { get_objectObservableArray },
28868 { prototypes::id::TestExampleInterface },
28869 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
28870 JSJitInfo::Getter,
28871 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28872 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
28873 false, /* isInfallible. False in setters. */
28874 false, /* isMovable. Not relevant for setters. */
28875 false, /* isEliminatable. Not relevant for setters. */
28876 false, /* isAlwaysInSlot. Only relevant for getters. */
28877 true, /* isLazilyCachedInSlot. Only relevant for getters. */
28878 false, /* isTypedMethod. Only relevant for methods. */
28879 (DOM_INSTANCE_RESERVED_SLOTS1 + 10) /* Reserved slot index, if we're stored in a slot, else 0. */
28880};
28881static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 10) <= JSJitInfo::maxSlotIndex, "We won't fit");
28882static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 10) < 22, "There is no slot for us");
28883static const JSJitInfo objectObservableArray_setterinfo = {
28884 { (JSJitGetterOp)set_objectObservableArray },
28885 { prototypes::id::TestExampleInterface },
28886 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
28887 JSJitInfo::Setter,
28888 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28889 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28890 false, /* isInfallible. False in setters. */
28891 false, /* isMovable. Not relevant for setters. */
28892 false, /* isEliminatable. Not relevant for setters. */
28893 false, /* isAlwaysInSlot. Only relevant for getters. */
28894 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28895 false, /* isTypedMethod. Only relevant for methods. */
28896 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28897};
28898
28899namespace AnyObservableArray_Binding {
28900class ObservableArrayProxyHandler : public mozilla::dom::ObservableArrayProxyHandler
28901{
28902protected:
28903 bool
28904 OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const override;
28905
28906 bool
28907 SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const override;
28908
28909public:
28910 static const ObservableArrayProxyHandler*
28911 getInstance();
28912};
28913
28914bool
28915ObservableArrayProxyHandler::OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const
28916{
28917 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 28917); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 28917; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
28918
28919 BindingCallContext cx(aCx, "ObservableArray OnDeleteItem");
28920 JS::Rooted<JS::Value> decl(cx);
28921 decl = aValue;
28922
28923 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
28924 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
28925 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 28925); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 28925; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
28926
28927 ErrorResult rv;
28928 MOZ_KnownLive(interface)(interface)->OnDeleteAnyObservableArray(cx, decl, aIndex, rv);
28929 return !rv.MaybeSetPendingException(cx);
28930}
28931
28932bool
28933ObservableArrayProxyHandler::SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const
28934{
28935 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 28935); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 28935; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
28936 uint32_t oldLen;
28937 if (!JS::GetArrayLength(aCx, aBackingList, &oldLen)) {
28938 return false;
28939 }
28940
28941 if (aIndex > oldLen) {
28942 return aResult.failBadIndex();
28943 }
28944
28945 BindingCallContext cx(aCx, "ObservableArray SetIndexedValue");
28946 JS::Rooted<JS::Value> decl(cx);
28947 decl = aValue;
28948
28949 if (aIndex < oldLen) {
28950 JS::Rooted<JS::Value> value(aCx);
28951 if (!JS_GetElement(aCx, aBackingList, aIndex, &value)) {
28952 return false;
28953 }
28954
28955 if (!OnDeleteItem(aCx, aProxy, value, aIndex)) {
28956 return false;
28957 }
28958 }
28959
28960 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
28961 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
28962 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 28962); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 28962; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
28963
28964 ErrorResult rv;
28965 MOZ_KnownLive(interface)(interface)->OnSetAnyObservableArray(cx, decl, aIndex, rv);
28966 if (rv.MaybeSetPendingException(cx)) {
28967 return false;
28968 }
28969
28970 if (!JS_SetElement(aCx, aBackingList, aIndex, aValue)) {
28971 return false;
28972 }
28973
28974 return aResult.succeed();
28975}
28976
28977const ObservableArrayProxyHandler*
28978ObservableArrayProxyHandler::getInstance()
28979{
28980 static const ObservableArrayProxyHandler instance;
28981 return &instance;
28982}
28983} // namespace AnyObservableArray_Binding
28984
28985namespace AnyObservableArrayHelpers {
28986void
28987ElementAt(mozilla::dom::TestExampleInterface* self, JSContext* cx, uint32_t aIndex, JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv)
28988{
28989 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 28989); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 28989; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
28990 JS::Rooted<JS::Value> v(cx);
28991 if(!ToJSValue(cx, self, &v)) {
28992 aRv.Throw(NS_ERROR_UNEXPECTED);
28993 return;
28994 }
28995 // This is a reflector, but due to trying to name things
28996 // similarly across method generators, it's called obj here.
28997 JS::Rooted<JSObject*> obj(cx);
28998 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
28999 JS::Rooted<JS::Value> result(cx);
29000 {
29001 JSAutoRealm reflectorRealm(cx, obj);
29002
29003 JS::Rooted<JSObject*> backingObj(cx);
29004 bool created = false;
29005 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 11),
29006 &backingObj, &created, AnyObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29007 self)) {
29008 aRv.Throw(NS_ERROR_UNEXPECTED);
29009 return;
29010 }
29011 if (created) {
29012 PreserveWrapper(self);
29013 }
29014 aRv.MightThrowJSException();
29015 if (!JS_GetElement(cx, backingObj, aIndex, &result)) {
29016 aRv.StealExceptionFromJSContext(cx);
29017 return;
29018 }
29019 if (result.isUndefined()) {
29020 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
29021 return;
29022 }
29023 }
29024 if (!JS_WrapValue(cx, &result)) {
29025 aRv.NoteJSContextException(cx);
29026 return;
29027 }
29028 JS::Rooted<JS::Value> rvalDecl(cx);
29029 rvalDecl = result;
29030 aRetVal.set(rvalDecl);
29031}
29032
29033void
29034ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, JS::Handle<JS::Value> aValue, ErrorResult& aRv)
29035{
29036 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 29036); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 29036; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
29037 AutoJSAPI jsapi;
29038 jsapi.Init();
29039 JSContext* cx = jsapi.cx();
29040 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
29041 // all we want is to wrap into _some_ scope and then unwrap to find
29042 // the reflector, and wrapping has no side-effects.
29043 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
29044 if (!scope) {
29045 aRv.Throw(NS_ERROR_UNEXPECTED);
29046 return;
29047 }
29048 JSAutoRealm tempRealm(cx, scope);
29049 JS::Rooted<JS::Value> v(cx);
29050 if(!ToJSValue(cx, self, &v)) {
29051 aRv.Throw(NS_ERROR_UNEXPECTED);
29052 return;
29053 }
29054 // This is a reflector, but due to trying to name things
29055 // similarly across method generators, it's called obj here.
29056 JS::Rooted<JSObject*> obj(cx);
29057 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
29058 JSAutoRealm reflectorRealm(cx, obj);
29059 JS::RootedVector<JS::Value> argv(cx);
29060 if (!argv.resize(1)) {
29061 aRv.Throw(NS_ERROR_UNEXPECTED);
29062 return;
29063 }
29064 do {
29065 JS::ExposeValueToActiveJS(aValue);
29066 argv[0].set(aValue);
29067 if (!MaybeWrapValue(cx, argv[0])) {
29068 aRv.Throw(NS_ERROR_UNEXPECTED);
29069 return;
29070 }
29071 break;
29072 } while (false);
29073
29074 JS::Rooted<JSObject*> backingObj(cx);
29075 bool created = false;
29076 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 11),
29077 &backingObj, &created, AnyObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29078 self)) {
29079 aRv.Throw(NS_ERROR_UNEXPECTED);
29080 return;
29081 }
29082 if (created) {
29083 PreserveWrapper(self);
29084 }
29085 uint32_t length;
29086 aRv.MightThrowJSException();
29087 if (!JS::GetArrayLength(cx, backingObj, &length)) {
29088 aRv.StealExceptionFromJSContext(cx);
29089 return;
29090 }
29091 if (aIndex > length) {
29092 aRv.ThrowRangeError("Invalid index");
29093 return;
29094 }
29095 aRv.MightThrowJSException();
29096 if (!JS_SetElement(cx, backingObj, aIndex, argv[0])) {
29097 aRv.StealExceptionFromJSContext(cx);
29098 return;
29099 }
29100}
29101
29102void
29103AppendElement(mozilla::dom::TestExampleInterface* self, JS::Handle<JS::Value> aValue, ErrorResult& aRv)
29104{
29105 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 29105); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 29105; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
29106 AutoJSAPI jsapi;
29107 jsapi.Init();
29108 JSContext* cx = jsapi.cx();
29109 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
29110 // all we want is to wrap into _some_ scope and then unwrap to find
29111 // the reflector, and wrapping has no side-effects.
29112 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
29113 if (!scope) {
29114 aRv.Throw(NS_ERROR_UNEXPECTED);
29115 return;
29116 }
29117 JSAutoRealm tempRealm(cx, scope);
29118 JS::Rooted<JS::Value> v(cx);
29119 if(!ToJSValue(cx, self, &v)) {
29120 aRv.Throw(NS_ERROR_UNEXPECTED);
29121 return;
29122 }
29123 // This is a reflector, but due to trying to name things
29124 // similarly across method generators, it's called obj here.
29125 JS::Rooted<JSObject*> obj(cx);
29126 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
29127 JSAutoRealm reflectorRealm(cx, obj);
29128 JS::RootedVector<JS::Value> argv(cx);
29129 if (!argv.resize(1)) {
29130 aRv.Throw(NS_ERROR_UNEXPECTED);
29131 return;
29132 }
29133 do {
29134 JS::ExposeValueToActiveJS(aValue);
29135 argv[0].set(aValue);
29136 if (!MaybeWrapValue(cx, argv[0])) {
29137 aRv.Throw(NS_ERROR_UNEXPECTED);
29138 return;
29139 }
29140 break;
29141 } while (false);
29142
29143 JS::Rooted<JSObject*> backingObj(cx);
29144 bool created = false;
29145 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 11),
29146 &backingObj, &created, AnyObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29147 self)) {
29148 aRv.Throw(NS_ERROR_UNEXPECTED);
29149 return;
29150 }
29151 if (created) {
29152 PreserveWrapper(self);
29153 }
29154 uint32_t length;
29155 aRv.MightThrowJSException();
29156 if (!JS::GetArrayLength(cx, backingObj, &length)) {
29157 aRv.StealExceptionFromJSContext(cx);
29158 return;
29159 }
29160 aRv.MightThrowJSException();
29161 if (!JS_SetElement(cx, backingObj, length, argv[0])) {
29162 aRv.StealExceptionFromJSContext(cx);
29163 return;
29164 }
29165}
29166
29167void
29168RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
29169{
29170 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 29170); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 29170; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
29171 AutoJSAPI jsapi;
29172 jsapi.Init();
29173 JSContext* cx = jsapi.cx();
29174 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
29175 // all we want is to wrap into _some_ scope and then unwrap to find
29176 // the reflector, and wrapping has no side-effects.
29177 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
29178 if (!scope) {
29179 aRv.Throw(NS_ERROR_UNEXPECTED);
29180 return;
29181 }
29182 JSAutoRealm tempRealm(cx, scope);
29183 JS::Rooted<JS::Value> v(cx);
29184 if(!ToJSValue(cx, self, &v)) {
29185 aRv.Throw(NS_ERROR_UNEXPECTED);
29186 return;
29187 }
29188 // This is a reflector, but due to trying to name things
29189 // similarly across method generators, it's called obj here.
29190 JS::Rooted<JSObject*> obj(cx);
29191 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
29192 JSAutoRealm reflectorRealm(cx, obj);
29193
29194 JS::Rooted<JSObject*> backingObj(cx);
29195 bool created = false;
29196 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 11),
29197 &backingObj, &created, AnyObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29198 self)) {
29199 aRv.Throw(NS_ERROR_UNEXPECTED);
29200 return;
29201 }
29202 if (created) {
29203 PreserveWrapper(self);
29204 }
29205 uint32_t length;
29206 aRv.MightThrowJSException();
29207 if (!JS::GetArrayLength(cx, backingObj, &length)) {
29208 aRv.StealExceptionFromJSContext(cx);
29209 return;
29210 }
29211 if (length == 0) {
29212 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
29213 return;
29214 }
29215 aRv.MightThrowJSException();
29216 if (!JS::SetArrayLength(cx, backingObj, length - 1)) {
29217 aRv.StealExceptionFromJSContext(cx);
29218 return;
29219 }
29220}
29221
29222uint32_t
29223Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
29224{
29225 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 29225); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 29225; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
29226 AutoJSAPI jsapi;
29227 jsapi.Init();
29228 JSContext* cx = jsapi.cx();
29229 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
29230 // all we want is to wrap into _some_ scope and then unwrap to find
29231 // the reflector, and wrapping has no side-effects.
29232 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
29233 if (!scope) {
29234 aRv.Throw(NS_ERROR_UNEXPECTED);
29235 return uint32_t(0);
29236 }
29237 JSAutoRealm tempRealm(cx, scope);
29238 JS::Rooted<JS::Value> v(cx);
29239 if(!ToJSValue(cx, self, &v)) {
29240 aRv.Throw(NS_ERROR_UNEXPECTED);
29241 return uint32_t(0);
29242 }
29243 // This is a reflector, but due to trying to name things
29244 // similarly across method generators, it's called obj here.
29245 JS::Rooted<JSObject*> obj(cx);
29246 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
29247 JSAutoRealm reflectorRealm(cx, obj);
29248
29249 JS::Rooted<JSObject*> backingObj(cx);
29250 bool created = false;
29251 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 11),
29252 &backingObj, &created, AnyObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29253 self)) {
29254 aRv.Throw(NS_ERROR_UNEXPECTED);
29255 return uint32_t(0);
29256 }
29257 if (created) {
29258 PreserveWrapper(self);
29259 }
29260 uint32_t retVal;
29261 aRv.MightThrowJSException();
29262 if (!JS::GetArrayLength(cx, backingObj, &retVal)) {
29263 aRv.StealExceptionFromJSContext(cx);
29264 return uint32_t(0);
29265 }
29266 return retVal;
29267}
29268} // namespace AnyObservableArrayHelpers
29269
29270MOZ_CAN_RUN_SCRIPT static bool
29271get_anyObservableArray(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
29272{
29273 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29276( cx, "TestExampleInterface"
, "anyObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
29274 "TestExampleInterface", "anyObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29276( cx, "TestExampleInterface"
, "anyObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
29275 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject29276( cx, "TestExampleInterface"
, "anyObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
29276 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29276( cx, "TestExampleInterface"
, "anyObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
29277
29278 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
29279 JS::Rooted<JSObject*> backingObj(cx);
29280 bool created = false;
29281 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 11),
29282 &backingObj, &created, AnyObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29283 self)) {
29284 return false;
29285 }
29286 if (created) {
29287 PreserveWrapper(self);
29288 }
29289 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 29289); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29289; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29290 args.rval().setObject(*backingObj);
29291 return true;
29292}
29293
29294MOZ_CAN_RUN_SCRIPT static bool
29295set_anyObservableArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
29296{
29297 BindingCallContext cx(cx_, "TestExampleInterface.anyObservableArray setter");
29298 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29301( cx, "TestExampleInterface"
, "anyObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
29299 "TestExampleInterface", "anyObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29301( cx, "TestExampleInterface"
, "anyObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
29300 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject29301( cx, "TestExampleInterface"
, "anyObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
29301 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29301( cx, "TestExampleInterface"
, "anyObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
29302
29303 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
29304 binding_detail::AutoSequence<JS::Value> arg0;
29305 SequenceRooter<JS::Value> arg0_holder(cx, &arg0);
29306 if (args[0].isObject()) {
29307 JS::ForOfIterator iter(cx);
29308 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
29309 return false;
29310 }
29311 if (!iter.valueIsIterable()) {
29312 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
29313 return false;
29314 }
29315 binding_detail::AutoSequence<JS::Value> &arr = arg0;
29316 JS::Rooted<JS::Value> temp(cx);
29317 while (true) {
29318 bool done;
29319 if (!iter.next(&temp, &done)) {
29320 return false;
29321 }
29322 if (done) {
29323 break;
29324 }
29325 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
29326 if (!slotPtr) {
29327 JS_ReportOutOfMemory(cx);
29328 return false;
29329 }
29330 JS::Value& slot = *slotPtr;
29331 slot = temp;
29332 }
29333 } else {
29334 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
29335 return false;
29336 }
29337 if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
29338 JS_ReportErrorASCII(cx, "Accessing from Xray wrapper is not supported.");
29339 return false;
29340 }
29341
29342 JS::Rooted<JSObject*> backingObj(cx);
29343 bool created = false;
29344 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 11),
29345 &backingObj, &created, AnyObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29346 self)) {
29347 return false;
29348 }
29349 if (created) {
29350 PreserveWrapper(self);
29351 }
29352
29353 const ObservableArrayProxyHandler* handler = GetObservableArrayProxyHandler(backingObj);
29354 if (!handler->SetLength(cx, backingObj, 0)) {
29355 return false;
29356 }
29357
29358 JS::Rooted<JS::Value> val(cx);
29359 for (size_t i = 0; i < arg0.Length(); i++) {
29360 JS::ExposeValueToActiveJS(arg0.ElementAt(i));
29361 val.set(arg0.ElementAt(i));
29362 if (!MaybeWrapValue(cx, &val)) {
29363 return false;
29364 }
29365 if (!JS_SetElement(cx, backingObj, i, val)) {
29366 return false;
29367 }
29368 }
29369
29370 return true;
29371}
29372
29373static const JSJitInfo anyObservableArray_getterinfo = {
29374 { get_anyObservableArray },
29375 { prototypes::id::TestExampleInterface },
29376 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
29377 JSJitInfo::Getter,
29378 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29379 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
29380 false, /* isInfallible. False in setters. */
29381 false, /* isMovable. Not relevant for setters. */
29382 false, /* isEliminatable. Not relevant for setters. */
29383 false, /* isAlwaysInSlot. Only relevant for getters. */
29384 true, /* isLazilyCachedInSlot. Only relevant for getters. */
29385 false, /* isTypedMethod. Only relevant for methods. */
29386 (DOM_INSTANCE_RESERVED_SLOTS1 + 11) /* Reserved slot index, if we're stored in a slot, else 0. */
29387};
29388static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 11) <= JSJitInfo::maxSlotIndex, "We won't fit");
29389static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 11) < 22, "There is no slot for us");
29390static const JSJitInfo anyObservableArray_setterinfo = {
29391 { (JSJitGetterOp)set_anyObservableArray },
29392 { prototypes::id::TestExampleInterface },
29393 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
29394 JSJitInfo::Setter,
29395 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29396 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29397 false, /* isInfallible. False in setters. */
29398 false, /* isMovable. Not relevant for setters. */
29399 false, /* isEliminatable. Not relevant for setters. */
29400 false, /* isAlwaysInSlot. Only relevant for getters. */
29401 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29402 false, /* isTypedMethod. Only relevant for methods. */
29403 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29404};
29405
29406namespace InterfaceObservableArray_Binding {
29407class ObservableArrayProxyHandler : public mozilla::dom::ObservableArrayProxyHandler
29408{
29409protected:
29410 bool
29411 OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const override;
29412
29413 bool
29414 SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const override;
29415
29416public:
29417 static const ObservableArrayProxyHandler*
29418 getInstance();
29419};
29420
29421bool
29422ObservableArrayProxyHandler::OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const
29423{
29424 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 29424); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 29424; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
29425
29426 BindingCallContext cx(aCx, "ObservableArray OnDeleteItem");
29427 NonNull<mozilla::dom::TestInterface> decl;
29428 if (aValue.isObject()) {
29429 {
29430 // Our JSContext should be in the right global to do unwrapping in.
29431 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(aValue, decl, cx);
29432 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
29433 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element in ObservableArray backing list", "TestInterface");
29434 MOZ_ASSERT_UNREACHABLE("The item in ObservableArray backing list is not TestInterface (Wrapper)?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(false)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("false" " (" "MOZ_ASSERT_UNREACHABLE: "
"The item in ObservableArray backing list is not TestInterface (Wrapper)?"
")", "../TestExampleGenBinding.cpp", 29434); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "false" ") (" "MOZ_ASSERT_UNREACHABLE: " "The item in ObservableArray backing list is not TestInterface (Wrapper)?"
")"); do { *((volatile int*)__null) = 29434; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
29435 return false;
29436 }
29437 }
29438 } else {
29439 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element in ObservableArray backing list");
29440 MOZ_ASSERT_UNREACHABLE("The item in ObservableArray backing list is not TestInterface (Wrapper)?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(false)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("false" " (" "MOZ_ASSERT_UNREACHABLE: "
"The item in ObservableArray backing list is not TestInterface (Wrapper)?"
")", "../TestExampleGenBinding.cpp", 29440); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "false" ") (" "MOZ_ASSERT_UNREACHABLE: " "The item in ObservableArray backing list is not TestInterface (Wrapper)?"
")"); do { *((volatile int*)__null) = 29440; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
29441 return false;
29442 }
29443
29444 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
29445 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
29446 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 29446); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 29446; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
29447
29448 ErrorResult rv;
29449 MOZ_KnownLive(interface)(interface)->OnDeleteInterfaceObservableArray(decl, aIndex, rv);
29450 return !rv.MaybeSetPendingException(cx);
29451}
29452
29453bool
29454ObservableArrayProxyHandler::SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const
29455{
29456 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 29456); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 29456; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
29457 uint32_t oldLen;
29458 if (!JS::GetArrayLength(aCx, aBackingList, &oldLen)) {
29459 return false;
29460 }
29461
29462 if (aIndex > oldLen) {
29463 return aResult.failBadIndex();
29464 }
29465
29466 BindingCallContext cx(aCx, "ObservableArray SetIndexedValue");
29467 NonNull<mozilla::dom::TestInterface> decl;
29468 if (aValue.isObject()) {
29469 {
29470 // Our JSContext should be in the right global to do unwrapping in.
29471 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(aValue, decl, cx);
29472 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
29473 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element in ObservableArray backing list", "TestInterface");
29474 return false;
29475 }
29476 }
29477 } else {
29478 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element in ObservableArray backing list");
29479 return false;
29480 }
29481
29482 if (aIndex < oldLen) {
29483 JS::Rooted<JS::Value> value(aCx);
29484 if (!JS_GetElement(aCx, aBackingList, aIndex, &value)) {
29485 return false;
29486 }
29487
29488 if (!OnDeleteItem(aCx, aProxy, value, aIndex)) {
29489 return false;
29490 }
29491 }
29492
29493 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
29494 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
29495 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 29495); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 29495; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
29496
29497 ErrorResult rv;
29498 MOZ_KnownLive(interface)(interface)->OnSetInterfaceObservableArray(decl, aIndex, rv);
29499 if (rv.MaybeSetPendingException(cx)) {
29500 return false;
29501 }
29502
29503 if (!JS_SetElement(aCx, aBackingList, aIndex, aValue)) {
29504 return false;
29505 }
29506
29507 return aResult.succeed();
29508}
29509
29510const ObservableArrayProxyHandler*
29511ObservableArrayProxyHandler::getInstance()
29512{
29513 static const ObservableArrayProxyHandler instance;
29514 return &instance;
29515}
29516} // namespace InterfaceObservableArray_Binding
29517
29518namespace InterfaceObservableArrayHelpers {
29519already_AddRefed<TestInterface>
29520ElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, ErrorResult& aRv)
29521{
29522 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 29522); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 29522; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
29523 AutoJSAPI jsapi;
29524 jsapi.Init();
29525 JSContext* cx = jsapi.cx();
29526 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
29527 // all we want is to wrap into _some_ scope and then unwrap to find
29528 // the reflector, and wrapping has no side-effects.
29529 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
29530 if (!scope) {
29531 aRv.Throw(NS_ERROR_UNEXPECTED);
29532 return nullptr;
29533 }
29534 JSAutoRealm tempRealm(cx, scope);
29535 JS::Rooted<JS::Value> v(cx);
29536 if(!ToJSValue(cx, self, &v)) {
29537 aRv.Throw(NS_ERROR_UNEXPECTED);
29538 return nullptr;
29539 }
29540 // This is a reflector, but due to trying to name things
29541 // similarly across method generators, it's called obj here.
29542 JS::Rooted<JSObject*> obj(cx);
29543 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
29544 JSAutoRealm reflectorRealm(cx, obj);
29545
29546 JS::Rooted<JSObject*> backingObj(cx);
29547 bool created = false;
29548 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 12),
29549 &backingObj, &created, InterfaceObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29550 self)) {
29551 aRv.Throw(NS_ERROR_UNEXPECTED);
29552 return nullptr;
29553 }
29554 if (created) {
29555 PreserveWrapper(self);
29556 }
29557 JS::Rooted<JS::Value> result(cx);
29558 aRv.MightThrowJSException();
29559 if (!JS_GetElement(cx, backingObj, aIndex, &result)) {
29560 aRv.StealExceptionFromJSContext(cx);
29561 return nullptr;
29562 }
29563 if (result.isUndefined()) {
29564 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
29565 return nullptr;
29566 }
29567 RefPtr<mozilla::dom::TestInterface> rvalDecl;
29568 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
29569 {
29570 // Our JSContext should be in the right global to do unwrapping in.
29571 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(result, rvalDecl, cx);
29572 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
29573 aRv.Throw(NS_ERROR_UNEXPECTED);
29574 return nullptr;
29575 }
29576 }
29577 return rvalDecl.forget();
29578}
29579
29580void
29581ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, TestInterface& aValue, ErrorResult& aRv)
29582{
29583 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 29583); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 29583; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
29584 AutoJSAPI jsapi;
29585 jsapi.Init();
29586 JSContext* cx = jsapi.cx();
29587 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
29588 // all we want is to wrap into _some_ scope and then unwrap to find
29589 // the reflector, and wrapping has no side-effects.
29590 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
29591 if (!scope) {
29592 aRv.Throw(NS_ERROR_UNEXPECTED);
29593 return;
29594 }
29595 JSAutoRealm tempRealm(cx, scope);
29596 JS::Rooted<JS::Value> v(cx);
29597 if(!ToJSValue(cx, self, &v)) {
29598 aRv.Throw(NS_ERROR_UNEXPECTED);
29599 return;
29600 }
29601 // This is a reflector, but due to trying to name things
29602 // similarly across method generators, it's called obj here.
29603 JS::Rooted<JSObject*> obj(cx);
29604 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
29605 JSAutoRealm reflectorRealm(cx, obj);
29606 JS::RootedVector<JS::Value> argv(cx);
29607 if (!argv.resize(1)) {
29608 aRv.Throw(NS_ERROR_UNEXPECTED);
29609 return;
29610 }
29611 do {
29612 if (!GetOrCreateDOMReflector(cx, aValue, argv[0])) {
29613 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 29613); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 29613; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
29614 aRv.Throw(NS_ERROR_UNEXPECTED);
29615 return;
29616 }
29617 break;
29618 } while (false);
29619
29620 JS::Rooted<JSObject*> backingObj(cx);
29621 bool created = false;
29622 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 12),
29623 &backingObj, &created, InterfaceObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29624 self)) {
29625 aRv.Throw(NS_ERROR_UNEXPECTED);
29626 return;
29627 }
29628 if (created) {
29629 PreserveWrapper(self);
29630 }
29631 uint32_t length;
29632 aRv.MightThrowJSException();
29633 if (!JS::GetArrayLength(cx, backingObj, &length)) {
29634 aRv.StealExceptionFromJSContext(cx);
29635 return;
29636 }
29637 if (aIndex > length) {
29638 aRv.ThrowRangeError("Invalid index");
29639 return;
29640 }
29641 aRv.MightThrowJSException();
29642 if (!JS_SetElement(cx, backingObj, aIndex, argv[0])) {
29643 aRv.StealExceptionFromJSContext(cx);
29644 return;
29645 }
29646}
29647
29648void
29649AppendElement(mozilla::dom::TestExampleInterface* self, TestInterface& aValue, ErrorResult& aRv)
29650{
29651 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 29651); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 29651; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
29652 AutoJSAPI jsapi;
29653 jsapi.Init();
29654 JSContext* cx = jsapi.cx();
29655 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
29656 // all we want is to wrap into _some_ scope and then unwrap to find
29657 // the reflector, and wrapping has no side-effects.
29658 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
29659 if (!scope) {
29660 aRv.Throw(NS_ERROR_UNEXPECTED);
29661 return;
29662 }
29663 JSAutoRealm tempRealm(cx, scope);
29664 JS::Rooted<JS::Value> v(cx);
29665 if(!ToJSValue(cx, self, &v)) {
29666 aRv.Throw(NS_ERROR_UNEXPECTED);
29667 return;
29668 }
29669 // This is a reflector, but due to trying to name things
29670 // similarly across method generators, it's called obj here.
29671 JS::Rooted<JSObject*> obj(cx);
29672 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
29673 JSAutoRealm reflectorRealm(cx, obj);
29674 JS::RootedVector<JS::Value> argv(cx);
29675 if (!argv.resize(1)) {
29676 aRv.Throw(NS_ERROR_UNEXPECTED);
29677 return;
29678 }
29679 do {
29680 if (!GetOrCreateDOMReflector(cx, aValue, argv[0])) {
29681 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 29681); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 29681; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
29682 aRv.Throw(NS_ERROR_UNEXPECTED);
29683 return;
29684 }
29685 break;
29686 } while (false);
29687
29688 JS::Rooted<JSObject*> backingObj(cx);
29689 bool created = false;
29690 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 12),
29691 &backingObj, &created, InterfaceObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29692 self)) {
29693 aRv.Throw(NS_ERROR_UNEXPECTED);
29694 return;
29695 }
29696 if (created) {
29697 PreserveWrapper(self);
29698 }
29699 uint32_t length;
29700 aRv.MightThrowJSException();
29701 if (!JS::GetArrayLength(cx, backingObj, &length)) {
29702 aRv.StealExceptionFromJSContext(cx);
29703 return;
29704 }
29705 aRv.MightThrowJSException();
29706 if (!JS_SetElement(cx, backingObj, length, argv[0])) {
29707 aRv.StealExceptionFromJSContext(cx);
29708 return;
29709 }
29710}
29711
29712void
29713RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
29714{
29715 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 29715); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 29715; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
29716 AutoJSAPI jsapi;
29717 jsapi.Init();
29718 JSContext* cx = jsapi.cx();
29719 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
29720 // all we want is to wrap into _some_ scope and then unwrap to find
29721 // the reflector, and wrapping has no side-effects.
29722 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
29723 if (!scope) {
29724 aRv.Throw(NS_ERROR_UNEXPECTED);
29725 return;
29726 }
29727 JSAutoRealm tempRealm(cx, scope);
29728 JS::Rooted<JS::Value> v(cx);
29729 if(!ToJSValue(cx, self, &v)) {
29730 aRv.Throw(NS_ERROR_UNEXPECTED);
29731 return;
29732 }
29733 // This is a reflector, but due to trying to name things
29734 // similarly across method generators, it's called obj here.
29735 JS::Rooted<JSObject*> obj(cx);
29736 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
29737 JSAutoRealm reflectorRealm(cx, obj);
29738
29739 JS::Rooted<JSObject*> backingObj(cx);
29740 bool created = false;
29741 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 12),
29742 &backingObj, &created, InterfaceObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29743 self)) {
29744 aRv.Throw(NS_ERROR_UNEXPECTED);
29745 return;
29746 }
29747 if (created) {
29748 PreserveWrapper(self);
29749 }
29750 uint32_t length;
29751 aRv.MightThrowJSException();
29752 if (!JS::GetArrayLength(cx, backingObj, &length)) {
29753 aRv.StealExceptionFromJSContext(cx);
29754 return;
29755 }
29756 if (length == 0) {
29757 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
29758 return;
29759 }
29760 aRv.MightThrowJSException();
29761 if (!JS::SetArrayLength(cx, backingObj, length - 1)) {
29762 aRv.StealExceptionFromJSContext(cx);
29763 return;
29764 }
29765}
29766
29767uint32_t
29768Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
29769{
29770 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 29770); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 29770; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
29771 AutoJSAPI jsapi;
29772 jsapi.Init();
29773 JSContext* cx = jsapi.cx();
29774 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
29775 // all we want is to wrap into _some_ scope and then unwrap to find
29776 // the reflector, and wrapping has no side-effects.
29777 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
29778 if (!scope) {
29779 aRv.Throw(NS_ERROR_UNEXPECTED);
29780 return uint32_t(0);
29781 }
29782 JSAutoRealm tempRealm(cx, scope);
29783 JS::Rooted<JS::Value> v(cx);
29784 if(!ToJSValue(cx, self, &v)) {
29785 aRv.Throw(NS_ERROR_UNEXPECTED);
29786 return uint32_t(0);
29787 }
29788 // This is a reflector, but due to trying to name things
29789 // similarly across method generators, it's called obj here.
29790 JS::Rooted<JSObject*> obj(cx);
29791 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
29792 JSAutoRealm reflectorRealm(cx, obj);
29793
29794 JS::Rooted<JSObject*> backingObj(cx);
29795 bool created = false;
29796 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 12),
29797 &backingObj, &created, InterfaceObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29798 self)) {
29799 aRv.Throw(NS_ERROR_UNEXPECTED);
29800 return uint32_t(0);
29801 }
29802 if (created) {
29803 PreserveWrapper(self);
29804 }
29805 uint32_t retVal;
29806 aRv.MightThrowJSException();
29807 if (!JS::GetArrayLength(cx, backingObj, &retVal)) {
29808 aRv.StealExceptionFromJSContext(cx);
29809 return uint32_t(0);
29810 }
29811 return retVal;
29812}
29813} // namespace InterfaceObservableArrayHelpers
29814
29815MOZ_CAN_RUN_SCRIPT static bool
29816get_interfaceObservableArray(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
29817{
29818 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29821( cx, "TestExampleInterface"
, "interfaceObservableArray", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29819 "TestExampleInterface", "interfaceObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29821( cx, "TestExampleInterface"
, "interfaceObservableArray", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29820 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject29821( cx, "TestExampleInterface"
, "interfaceObservableArray", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29821 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29821( cx, "TestExampleInterface"
, "interfaceObservableArray", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29822
29823 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
29824 JS::Rooted<JSObject*> backingObj(cx);
29825 bool created = false;
29826 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 12),
29827 &backingObj, &created, InterfaceObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29828 self)) {
29829 return false;
29830 }
29831 if (created) {
29832 PreserveWrapper(self);
29833 }
29834 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 29834); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29834; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29835 args.rval().setObject(*backingObj);
29836 return true;
29837}
29838
29839MOZ_CAN_RUN_SCRIPT static bool
29840set_interfaceObservableArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
29841{
29842 BindingCallContext cx(cx_, "TestExampleInterface.interfaceObservableArray setter");
29843 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29846( cx, "TestExampleInterface"
, "interfaceObservableArray", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29844 "TestExampleInterface", "interfaceObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29846( cx, "TestExampleInterface"
, "interfaceObservableArray", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29845 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject29846( cx, "TestExampleInterface"
, "interfaceObservableArray", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29846 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29846( cx, "TestExampleInterface"
, "interfaceObservableArray", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29847
29848 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
29849 binding_detail::AutoSequence<OwningNonNull<mozilla::dom::TestInterface>> arg0;
29850 if (args[0].isObject()) {
29851 JS::ForOfIterator iter(cx);
29852 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
29853 return false;
29854 }
29855 if (!iter.valueIsIterable()) {
29856 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
29857 return false;
29858 }
29859 binding_detail::AutoSequence<OwningNonNull<mozilla::dom::TestInterface>> &arr = arg0;
29860 JS::Rooted<JS::Value> temp(cx);
29861 while (true) {
29862 bool done;
29863 if (!iter.next(&temp, &done)) {
29864 return false;
29865 }
29866 if (done) {
29867 break;
29868 }
29869 OwningNonNull<mozilla::dom::TestInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
29870 if (!slotPtr) {
29871 JS_ReportOutOfMemory(cx);
29872 return false;
29873 }
29874 OwningNonNull<mozilla::dom::TestInterface>& slot = *slotPtr;
29875 if (temp.isObject()) {
29876 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
29877 {
29878 // Our JSContext should be in the right global to do unwrapping in.
29879 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
29880 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
29881 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of value being assigned", "TestInterface");
29882 return false;
29883 }
29884 }
29885 } else {
29886 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of value being assigned");
29887 return false;
29888 }
29889 }
29890 } else {
29891 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
29892 return false;
29893 }
29894 if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
29895 JS_ReportErrorASCII(cx, "Accessing from Xray wrapper is not supported.");
29896 return false;
29897 }
29898
29899 JS::Rooted<JSObject*> backingObj(cx);
29900 bool created = false;
29901 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 12),
29902 &backingObj, &created, InterfaceObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
29903 self)) {
29904 return false;
29905 }
29906 if (created) {
29907 PreserveWrapper(self);
29908 }
29909
29910 const ObservableArrayProxyHandler* handler = GetObservableArrayProxyHandler(backingObj);
29911 if (!handler->SetLength(cx, backingObj, 0)) {
29912 return false;
29913 }
29914
29915 JS::Rooted<JS::Value> val(cx);
29916 for (size_t i = 0; i < arg0.Length(); i++) {
29917 if (!GetOrCreateDOMReflector(cx, arg0.ElementAt(i), &val)) {
29918 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 29918); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 29918; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
29919 return false;
29920 }
29921 if (!JS_SetElement(cx, backingObj, i, val)) {
29922 return false;
29923 }
29924 }
29925
29926 return true;
29927}
29928
29929static const JSJitInfo interfaceObservableArray_getterinfo = {
29930 { get_interfaceObservableArray },
29931 { prototypes::id::TestExampleInterface },
29932 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
29933 JSJitInfo::Getter,
29934 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29935 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
29936 false, /* isInfallible. False in setters. */
29937 false, /* isMovable. Not relevant for setters. */
29938 false, /* isEliminatable. Not relevant for setters. */
29939 false, /* isAlwaysInSlot. Only relevant for getters. */
29940 true, /* isLazilyCachedInSlot. Only relevant for getters. */
29941 false, /* isTypedMethod. Only relevant for methods. */
29942 (DOM_INSTANCE_RESERVED_SLOTS1 + 12) /* Reserved slot index, if we're stored in a slot, else 0. */
29943};
29944static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 12) <= JSJitInfo::maxSlotIndex, "We won't fit");
29945static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 12) < 22, "There is no slot for us");
29946static const JSJitInfo interfaceObservableArray_setterinfo = {
29947 { (JSJitGetterOp)set_interfaceObservableArray },
29948 { prototypes::id::TestExampleInterface },
29949 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
29950 JSJitInfo::Setter,
29951 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29952 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29953 false, /* isInfallible. False in setters. */
29954 false, /* isMovable. Not relevant for setters. */
29955 false, /* isEliminatable. Not relevant for setters. */
29956 false, /* isAlwaysInSlot. Only relevant for getters. */
29957 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29958 false, /* isTypedMethod. Only relevant for methods. */
29959 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29960};
29961
29962namespace NullableObservableArray_Binding {
29963class ObservableArrayProxyHandler : public mozilla::dom::ObservableArrayProxyHandler
29964{
29965protected:
29966 bool
29967 OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const override;
29968
29969 bool
29970 SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const override;
29971
29972public:
29973 static const ObservableArrayProxyHandler*
29974 getInstance();
29975};
29976
29977bool
29978ObservableArrayProxyHandler::OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JS::Value> aValue, uint32_t aIndex) const
29979{
29980 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 29980); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 29980; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
29981
29982 BindingCallContext cx(aCx, "ObservableArray OnDeleteItem");
29983 Nullable<int32_t> decl;
29984 if (aValue.isNullOrUndefined()) {
29985 decl.SetNull();
29986 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, aValue, "Element in ObservableArray backing list", &decl.SetValue())) {
29987 MOZ_ASSERT_UNREACHABLE("The item in ObservableArray backing list is not LongOrNull?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(false)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("false" " (" "MOZ_ASSERT_UNREACHABLE: "
"The item in ObservableArray backing list is not LongOrNull?"
")", "../TestExampleGenBinding.cpp", 29987); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "false" ") (" "MOZ_ASSERT_UNREACHABLE: " "The item in ObservableArray backing list is not LongOrNull?"
")"); do { *((volatile int*)__null) = 29987; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
29988 return false;
29989 }
29990
29991 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
29992 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
29993 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 29993); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 29993; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
29994
29995 ErrorResult rv;
29996 MOZ_KnownLive(interface)(interface)->OnDeleteNullableObservableArray(decl, aIndex, rv);
29997 return !rv.MaybeSetPendingException(cx);
29998}
29999
30000bool
30001ObservableArrayProxyHandler::SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<JSObject*> aBackingList, uint32_t aIndex, JS::Handle<JS::Value> aValue, JS::ObjectOpResult& aResult) const
30002{
30003 MOZ_ASSERT(IsObservableArrayProxy(aProxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsObservableArrayProxy(aProxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsObservableArrayProxy(aProxy
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsObservableArrayProxy(aProxy)", "../TestExampleGenBinding.cpp"
, 30003); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsObservableArrayProxy(aProxy)"
")"); do { *((volatile int*)__null) = 30003; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
30004 uint32_t oldLen;
30005 if (!JS::GetArrayLength(aCx, aBackingList, &oldLen)) {
30006 return false;
30007 }
30008
30009 if (aIndex > oldLen) {
30010 return aResult.failBadIndex();
30011 }
30012
30013 BindingCallContext cx(aCx, "ObservableArray SetIndexedValue");
30014 Nullable<int32_t> decl;
30015 if (aValue.isNullOrUndefined()) {
30016 decl.SetNull();
30017 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, aValue, "Element in ObservableArray backing list", &decl.SetValue())) {
30018 return false;
30019 }
30020
30021 if (aIndex < oldLen) {
30022 JS::Rooted<JS::Value> value(aCx);
30023 if (!JS_GetElement(aCx, aBackingList, aIndex, &value)) {
30024 return false;
30025 }
30026
30027 if (!OnDeleteItem(aCx, aProxy, value, aIndex)) {
30028 return false;
30029 }
30030 }
30031
30032 JS::Value val = js::GetProxyReservedSlot(aProxy, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0);
30033 auto* interface = static_cast<mozilla::dom::TestExampleInterface*>(val.toPrivate());
30034 MOZ_ASSERT(interface)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(interface)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(interface))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("interface", "../TestExampleGenBinding.cpp"
, 30034); AnnotateMozCrashReason("MOZ_ASSERT" "(" "interface"
")"); do { *((volatile int*)__null) = 30034; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
30035
30036 ErrorResult rv;
30037 MOZ_KnownLive(interface)(interface)->OnSetNullableObservableArray(decl, aIndex, rv);
30038 if (rv.MaybeSetPendingException(cx)) {
30039 return false;
30040 }
30041
30042 if (!JS_SetElement(aCx, aBackingList, aIndex, aValue)) {
30043 return false;
30044 }
30045
30046 return aResult.succeed();
30047}
30048
30049const ObservableArrayProxyHandler*
30050ObservableArrayProxyHandler::getInstance()
30051{
30052 static const ObservableArrayProxyHandler instance;
30053 return &instance;
30054}
30055} // namespace NullableObservableArray_Binding
30056
30057namespace NullableObservableArrayHelpers {
30058Nullable<int32_t>
30059ElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, ErrorResult& aRv)
30060{
30061 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 30061); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 30061; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
30062 AutoJSAPI jsapi;
30063 jsapi.Init();
30064 JSContext* cx = jsapi.cx();
30065 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
30066 // all we want is to wrap into _some_ scope and then unwrap to find
30067 // the reflector, and wrapping has no side-effects.
30068 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
30069 if (!scope) {
30070 aRv.Throw(NS_ERROR_UNEXPECTED);
30071 return Nullable<int32_t>();
30072 }
30073 JSAutoRealm tempRealm(cx, scope);
30074 JS::Rooted<JS::Value> v(cx);
30075 if(!ToJSValue(cx, self, &v)) {
30076 aRv.Throw(NS_ERROR_UNEXPECTED);
30077 return Nullable<int32_t>();
30078 }
30079 // This is a reflector, but due to trying to name things
30080 // similarly across method generators, it's called obj here.
30081 JS::Rooted<JSObject*> obj(cx);
30082 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
30083 JSAutoRealm reflectorRealm(cx, obj);
30084
30085 JS::Rooted<JSObject*> backingObj(cx);
30086 bool created = false;
30087 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 13),
30088 &backingObj, &created, NullableObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
30089 self)) {
30090 aRv.Throw(NS_ERROR_UNEXPECTED);
30091 return Nullable<int32_t>();
30092 }
30093 if (created) {
30094 PreserveWrapper(self);
30095 }
30096 JS::Rooted<JS::Value> result(cx);
30097 aRv.MightThrowJSException();
30098 if (!JS_GetElement(cx, backingObj, aIndex, &result)) {
30099 aRv.StealExceptionFromJSContext(cx);
30100 return Nullable<int32_t>();
30101 }
30102 if (result.isUndefined()) {
30103 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
30104 return Nullable<int32_t>();
30105 }
30106 Nullable<int32_t> rvalDecl;
30107 if (result.isNullOrUndefined()) {
30108 rvalDecl.SetNull();
30109 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, result, "Return value of ElementAt", &rvalDecl.SetValue())) {
30110 aRv.NoteJSContextException(cx);
30111 return Nullable<int32_t>();
30112 }
30113 return rvalDecl;
30114}
30115
30116void
30117ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, const Nullable<int32_t>& aValue, ErrorResult& aRv)
30118{
30119 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 30119); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 30119; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
30120 AutoJSAPI jsapi;
30121 jsapi.Init();
30122 JSContext* cx = jsapi.cx();
30123 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
30124 // all we want is to wrap into _some_ scope and then unwrap to find
30125 // the reflector, and wrapping has no side-effects.
30126 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
30127 if (!scope) {
30128 aRv.Throw(NS_ERROR_UNEXPECTED);
30129 return;
30130 }
30131 JSAutoRealm tempRealm(cx, scope);
30132 JS::Rooted<JS::Value> v(cx);
30133 if(!ToJSValue(cx, self, &v)) {
30134 aRv.Throw(NS_ERROR_UNEXPECTED);
30135 return;
30136 }
30137 // This is a reflector, but due to trying to name things
30138 // similarly across method generators, it's called obj here.
30139 JS::Rooted<JSObject*> obj(cx);
30140 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
30141 JSAutoRealm reflectorRealm(cx, obj);
30142 JS::RootedVector<JS::Value> argv(cx);
30143 if (!argv.resize(1)) {
30144 aRv.Throw(NS_ERROR_UNEXPECTED);
30145 return;
30146 }
30147 do {
30148 if (aValue.IsNull()) {
30149 argv[0].setNull();
30150 break;
30151 }
30152 argv[0].setInt32(int32_t(aValue.Value()));
30153 break;
30154 } while (false);
30155
30156 JS::Rooted<JSObject*> backingObj(cx);
30157 bool created = false;
30158 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 13),
30159 &backingObj, &created, NullableObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
30160 self)) {
30161 aRv.Throw(NS_ERROR_UNEXPECTED);
30162 return;
30163 }
30164 if (created) {
30165 PreserveWrapper(self);
30166 }
30167 uint32_t length;
30168 aRv.MightThrowJSException();
30169 if (!JS::GetArrayLength(cx, backingObj, &length)) {
30170 aRv.StealExceptionFromJSContext(cx);
30171 return;
30172 }
30173 if (aIndex > length) {
30174 aRv.ThrowRangeError("Invalid index");
30175 return;
30176 }
30177 aRv.MightThrowJSException();
30178 if (!JS_SetElement(cx, backingObj, aIndex, argv[0])) {
30179 aRv.StealExceptionFromJSContext(cx);
30180 return;
30181 }
30182}
30183
30184void
30185AppendElement(mozilla::dom::TestExampleInterface* self, const Nullable<int32_t>& aValue, ErrorResult& aRv)
30186{
30187 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 30187); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 30187; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
30188 AutoJSAPI jsapi;
30189 jsapi.Init();
30190 JSContext* cx = jsapi.cx();
30191 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
30192 // all we want is to wrap into _some_ scope and then unwrap to find
30193 // the reflector, and wrapping has no side-effects.
30194 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
30195 if (!scope) {
30196 aRv.Throw(NS_ERROR_UNEXPECTED);
30197 return;
30198 }
30199 JSAutoRealm tempRealm(cx, scope);
30200 JS::Rooted<JS::Value> v(cx);
30201 if(!ToJSValue(cx, self, &v)) {
30202 aRv.Throw(NS_ERROR_UNEXPECTED);
30203 return;
30204 }
30205 // This is a reflector, but due to trying to name things
30206 // similarly across method generators, it's called obj here.
30207 JS::Rooted<JSObject*> obj(cx);
30208 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
30209 JSAutoRealm reflectorRealm(cx, obj);
30210 JS::RootedVector<JS::Value> argv(cx);
30211 if (!argv.resize(1)) {
30212 aRv.Throw(NS_ERROR_UNEXPECTED);
30213 return;
30214 }
30215 do {
30216 if (aValue.IsNull()) {
30217 argv[0].setNull();
30218 break;
30219 }
30220 argv[0].setInt32(int32_t(aValue.Value()));
30221 break;
30222 } while (false);
30223
30224 JS::Rooted<JSObject*> backingObj(cx);
30225 bool created = false;
30226 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 13),
30227 &backingObj, &created, NullableObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
30228 self)) {
30229 aRv.Throw(NS_ERROR_UNEXPECTED);
30230 return;
30231 }
30232 if (created) {
30233 PreserveWrapper(self);
30234 }
30235 uint32_t length;
30236 aRv.MightThrowJSException();
30237 if (!JS::GetArrayLength(cx, backingObj, &length)) {
30238 aRv.StealExceptionFromJSContext(cx);
30239 return;
30240 }
30241 aRv.MightThrowJSException();
30242 if (!JS_SetElement(cx, backingObj, length, argv[0])) {
30243 aRv.StealExceptionFromJSContext(cx);
30244 return;
30245 }
30246}
30247
30248void
30249RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
30250{
30251 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 30251); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 30251; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
30252 AutoJSAPI jsapi;
30253 jsapi.Init();
30254 JSContext* cx = jsapi.cx();
30255 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
30256 // all we want is to wrap into _some_ scope and then unwrap to find
30257 // the reflector, and wrapping has no side-effects.
30258 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
30259 if (!scope) {
30260 aRv.Throw(NS_ERROR_UNEXPECTED);
30261 return;
30262 }
30263 JSAutoRealm tempRealm(cx, scope);
30264 JS::Rooted<JS::Value> v(cx);
30265 if(!ToJSValue(cx, self, &v)) {
30266 aRv.Throw(NS_ERROR_UNEXPECTED);
30267 return;
30268 }
30269 // This is a reflector, but due to trying to name things
30270 // similarly across method generators, it's called obj here.
30271 JS::Rooted<JSObject*> obj(cx);
30272 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
30273 JSAutoRealm reflectorRealm(cx, obj);
30274
30275 JS::Rooted<JSObject*> backingObj(cx);
30276 bool created = false;
30277 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 13),
30278 &backingObj, &created, NullableObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
30279 self)) {
30280 aRv.Throw(NS_ERROR_UNEXPECTED);
30281 return;
30282 }
30283 if (created) {
30284 PreserveWrapper(self);
30285 }
30286 uint32_t length;
30287 aRv.MightThrowJSException();
30288 if (!JS::GetArrayLength(cx, backingObj, &length)) {
30289 aRv.StealExceptionFromJSContext(cx);
30290 return;
30291 }
30292 if (length == 0) {
30293 aRv.Throw(NS_ERROR_NOT_AVAILABLE);
30294 return;
30295 }
30296 aRv.MightThrowJSException();
30297 if (!JS::SetArrayLength(cx, backingObj, length - 1)) {
30298 aRv.StealExceptionFromJSContext(cx);
30299 return;
30300 }
30301}
30302
30303uint32_t
30304Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv)
30305{
30306 MOZ_ASSERT(self)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(self)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(self))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("self", "../TestExampleGenBinding.cpp"
, 30306); AnnotateMozCrashReason("MOZ_ASSERT" "(" "self" ")")
; do { *((volatile int*)__null) = 30306; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
30307 AutoJSAPI jsapi;
30308 jsapi.Init();
30309 JSContext* cx = jsapi.cx();
30310 // It's safe to use UnprivilegedJunkScopeOrWorkerGlobal here because
30311 // all we want is to wrap into _some_ scope and then unwrap to find
30312 // the reflector, and wrapping has no side-effects.
30313 JSObject* scope = UnprivilegedJunkScopeOrWorkerGlobal(fallible);
30314 if (!scope) {
30315 aRv.Throw(NS_ERROR_UNEXPECTED);
30316 return uint32_t(0);
30317 }
30318 JSAutoRealm tempRealm(cx, scope);
30319 JS::Rooted<JS::Value> v(cx);
30320 if(!ToJSValue(cx, self, &v)) {
30321 aRv.Throw(NS_ERROR_UNEXPECTED);
30322 return uint32_t(0);
30323 }
30324 // This is a reflector, but due to trying to name things
30325 // similarly across method generators, it's called obj here.
30326 JS::Rooted<JSObject*> obj(cx);
30327 obj = js::UncheckedUnwrap(&v.toObject(), /* stopAtWindowProxy = */ false);
30328 JSAutoRealm reflectorRealm(cx, obj);
30329
30330 JS::Rooted<JSObject*> backingObj(cx);
30331 bool created = false;
30332 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 13),
30333 &backingObj, &created, NullableObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
30334 self)) {
30335 aRv.Throw(NS_ERROR_UNEXPECTED);
30336 return uint32_t(0);
30337 }
30338 if (created) {
30339 PreserveWrapper(self);
30340 }
30341 uint32_t retVal;
30342 aRv.MightThrowJSException();
30343 if (!JS::GetArrayLength(cx, backingObj, &retVal)) {
30344 aRv.StealExceptionFromJSContext(cx);
30345 return uint32_t(0);
30346 }
30347 return retVal;
30348}
30349} // namespace NullableObservableArrayHelpers
30350
30351MOZ_CAN_RUN_SCRIPT static bool
30352get_nullableObservableArray(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
30353{
30354 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30357( cx, "TestExampleInterface"
, "nullableObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30355 "TestExampleInterface", "nullableObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30357( cx, "TestExampleInterface"
, "nullableObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30356 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject30357( cx, "TestExampleInterface"
, "nullableObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30357 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30357( cx, "TestExampleInterface"
, "nullableObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30358
30359 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30360 JS::Rooted<JSObject*> backingObj(cx);
30361 bool created = false;
30362 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 13),
30363 &backingObj, &created, NullableObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
30364 self)) {
30365 return false;
30366 }
30367 if (created) {
30368 PreserveWrapper(self);
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)"
, "../TestExampleGenBinding.cpp", 30370); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30370; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30371 args.rval().setObject(*backingObj);
30372 return true;
30373}
30374
30375MOZ_CAN_RUN_SCRIPT static bool
30376set_nullableObservableArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
30377{
30378 BindingCallContext cx(cx_, "TestExampleInterface.nullableObservableArray setter");
30379 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30382( cx, "TestExampleInterface"
, "nullableObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30380 "TestExampleInterface", "nullableObservableArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30382( cx, "TestExampleInterface"
, "nullableObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30381 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject30382( cx, "TestExampleInterface"
, "nullableObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30382 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30382( cx, "TestExampleInterface"
, "nullableObservableArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30383
30384 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30385 binding_detail::AutoSequence<Nullable<int32_t>> arg0;
30386 if (args[0].isObject()) {
30387 JS::ForOfIterator iter(cx);
30388 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
30389 return false;
30390 }
30391 if (!iter.valueIsIterable()) {
30392 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
30393 return false;
30394 }
30395 binding_detail::AutoSequence<Nullable<int32_t>> &arr = arg0;
30396 JS::Rooted<JS::Value> temp(cx);
30397 while (true) {
30398 bool done;
30399 if (!iter.next(&temp, &done)) {
30400 return false;
30401 }
30402 if (done) {
30403 break;
30404 }
30405 Nullable<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
30406 if (!slotPtr) {
30407 JS_ReportOutOfMemory(cx);
30408 return false;
30409 }
30410 Nullable<int32_t>& slot = *slotPtr;
30411 if (temp.isNullOrUndefined()) {
30412 slot.SetNull();
30413 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of value being assigned", &slot.SetValue())) {
30414 return false;
30415 }
30416 }
30417 } else {
30418 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "observable array");
30419 return false;
30420 }
30421 if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
30422 JS_ReportErrorASCII(cx, "Accessing from Xray wrapper is not supported.");
30423 return false;
30424 }
30425
30426 JS::Rooted<JSObject*> backingObj(cx);
30427 bool created = false;
30428 if (!GetObservableArrayBackingObject(cx, obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 13),
30429 &backingObj, &created, NullableObservableArray_Binding::ObservableArrayProxyHandler::getInstance(),
30430 self)) {
30431 return false;
30432 }
30433 if (created) {
30434 PreserveWrapper(self);
30435 }
30436
30437 const ObservableArrayProxyHandler* handler = GetObservableArrayProxyHandler(backingObj);
30438 if (!handler->SetLength(cx, backingObj, 0)) {
30439 return false;
30440 }
30441
30442 JS::Rooted<JS::Value> val(cx);
30443 for (size_t i = 0; i < arg0.Length(); i++) {
30444 if (arg0.ElementAt(i).IsNull()) {
30445 val.setNull();
30446 if (!JS_SetElement(cx, backingObj, i, val)) {
30447 return false;
30448 }
30449 }
30450 val.setInt32(int32_t(arg0.ElementAt(i).Value()));
30451 if (!JS_SetElement(cx, backingObj, i, val)) {
30452 return false;
30453 }
30454 }
30455
30456 return true;
30457}
30458
30459static const JSJitInfo nullableObservableArray_getterinfo = {
30460 { get_nullableObservableArray },
30461 { prototypes::id::TestExampleInterface },
30462 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30463 JSJitInfo::Getter,
30464 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30465 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
30466 false, /* isInfallible. False in setters. */
30467 false, /* isMovable. Not relevant for setters. */
30468 false, /* isEliminatable. Not relevant for setters. */
30469 false, /* isAlwaysInSlot. Only relevant for getters. */
30470 true, /* isLazilyCachedInSlot. Only relevant for getters. */
30471 false, /* isTypedMethod. Only relevant for methods. */
30472 (DOM_INSTANCE_RESERVED_SLOTS1 + 13) /* Reserved slot index, if we're stored in a slot, else 0. */
30473};
30474static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 13) <= JSJitInfo::maxSlotIndex, "We won't fit");
30475static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 13) < 22, "There is no slot for us");
30476static const JSJitInfo nullableObservableArray_setterinfo = {
30477 { (JSJitGetterOp)set_nullableObservableArray },
30478 { prototypes::id::TestExampleInterface },
30479 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30480 JSJitInfo::Setter,
30481 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30482 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30483 false, /* isInfallible. False in setters. */
30484 false, /* isMovable. Not relevant for setters. */
30485 false, /* isEliminatable. Not relevant for setters. */
30486 false, /* isAlwaysInSlot. Only relevant for getters. */
30487 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30488 false, /* isTypedMethod. Only relevant for methods. */
30489 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30490};
30491
30492MOZ_CAN_RUN_SCRIPT static bool
30493methodRenamedFrom(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30494{
30495 BindingCallContext cx(cx_, "TestExampleInterface.methodRenamedFrom");
30496 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30499( cx, "TestExampleInterface"
, "methodRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30497 "TestExampleInterface", "methodRenamedFrom", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30499( cx, "TestExampleInterface"
, "methodRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30498 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30499( cx, "TestExampleInterface"
, "methodRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30499 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30499( cx, "TestExampleInterface"
, "methodRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30500
30501 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30502 unsigned argcount = std::min(args.length(), 1u);
30503 switch (argcount) {
30504 case 0: {
30505 // NOTE: This assert does NOT call the function.
30506 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->MethodRenamedTo())>, "Should be returning void here");
30507 MOZ_KnownLive(self)(self)->MethodRenamedTo();
30508 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30508); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30508; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30509 args.rval().setUndefined();
30510 return true;
30511 break;
30512 }
30513 case 1: {
30514 int8_t arg0;
30515 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
30516 return false;
30517 }
30518 // NOTE: This assert does NOT call the function.
30519 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->MethodRenamedTo(arg0))>, "Should be returning void here");
30520 MOZ_KnownLive(self)(self)->MethodRenamedTo(arg0);
30521 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30521); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30521; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30522 args.rval().setUndefined();
30523 return true;
30524 break;
30525 }
30526 default: {
30527 // Using nsPrintfCString here would require including that
30528 // header. Let's not worry about it.
30529 nsAutoCString argCountStr;
30530 argCountStr.AppendPrintf("%u", args.length());
30531 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
30532 }
30533 }
30534 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 30534); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 30534; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
30535 return false;
30536}
30537
30538static const JSJitInfo methodRenamedFrom_methodinfo = {
30539 { (JSJitGetterOp)methodRenamedFrom },
30540 { prototypes::id::TestExampleInterface },
30541 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30542 JSJitInfo::Method,
30543 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30544 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30545 false, /* isInfallible. False in setters. */
30546 false, /* isMovable. Not relevant for setters. */
30547 false, /* isEliminatable. Not relevant for setters. */
30548 false, /* isAlwaysInSlot. Only relevant for getters. */
30549 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30550 false, /* isTypedMethod. Only relevant for methods. */
30551 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30552};
30553
30554MOZ_CAN_RUN_SCRIPT static bool
30555get_attributeGetterRenamedFrom(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
30556{
30557 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30560( cx, "TestExampleInterface"
, "attributeGetterRenamedFrom", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30558 "TestExampleInterface", "attributeGetterRenamedFrom", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30560( cx, "TestExampleInterface"
, "attributeGetterRenamedFrom", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30559 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject30560( cx, "TestExampleInterface"
, "attributeGetterRenamedFrom", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30560 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30560( cx, "TestExampleInterface"
, "attributeGetterRenamedFrom", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30561
30562 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30563 int8_t result(MOZ_KnownLive(self)(self)->AttributeGetterRenamedTo());
30564 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30564); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30564; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30565 args.rval().setInt32(int32_t(result));
30566 return true;
30567}
30568
30569static const JSJitInfo attributeGetterRenamedFrom_getterinfo = {
30570 { get_attributeGetterRenamedFrom },
30571 { prototypes::id::TestExampleInterface },
30572 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30573 JSJitInfo::Getter,
30574 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30575 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
30576 true, /* isInfallible. False in setters. */
30577 false, /* isMovable. Not relevant for setters. */
30578 false, /* isEliminatable. Not relevant for setters. */
30579 false, /* isAlwaysInSlot. Only relevant for getters. */
30580 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30581 false, /* isTypedMethod. Only relevant for methods. */
30582 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30583};
30584
30585MOZ_CAN_RUN_SCRIPT static bool
30586get_attributeRenamedFrom(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
30587{
30588 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30591( cx, "TestExampleInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30589 "TestExampleInterface", "attributeRenamedFrom", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30591( cx, "TestExampleInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30590 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject30591( cx, "TestExampleInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30591 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30591( cx, "TestExampleInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30592
30593 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30594 int8_t result(MOZ_KnownLive(self)(self)->AttributeRenamedTo());
30595 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30595); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30595; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30596 args.rval().setInt32(int32_t(result));
30597 return true;
30598}
30599
30600MOZ_CAN_RUN_SCRIPT static bool
30601set_attributeRenamedFrom(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
30602{
30603 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30606( cx, "TestExampleInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30604 "TestExampleInterface", "attributeRenamedFrom", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30606( cx, "TestExampleInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30605 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject30606( cx, "TestExampleInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30606 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30606( cx, "TestExampleInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30607
30608 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30609 int8_t arg0;
30610 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
30611 return false;
30612 }
30613 // NOTE: This assert does NOT call the function.
30614 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAttributeRenamedTo(arg0))>, "Should be returning void here");
30615 MOZ_KnownLive(self)(self)->SetAttributeRenamedTo(arg0);
30616 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30616); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30616; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30617
30618 return true;
30619}
30620
30621static const JSJitInfo attributeRenamedFrom_getterinfo = {
30622 { get_attributeRenamedFrom },
30623 { prototypes::id::TestExampleInterface },
30624 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30625 JSJitInfo::Getter,
30626 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30627 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
30628 true, /* isInfallible. False in setters. */
30629 false, /* isMovable. Not relevant for setters. */
30630 false, /* isEliminatable. Not relevant for setters. */
30631 false, /* isAlwaysInSlot. Only relevant for getters. */
30632 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30633 false, /* isTypedMethod. Only relevant for methods. */
30634 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30635};
30636static const JSJitInfo attributeRenamedFrom_setterinfo = {
30637 { (JSJitGetterOp)set_attributeRenamedFrom },
30638 { prototypes::id::TestExampleInterface },
30639 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30640 JSJitInfo::Setter,
30641 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30642 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30643 false, /* isInfallible. False in setters. */
30644 false, /* isMovable. Not relevant for setters. */
30645 false, /* isEliminatable. Not relevant for setters. */
30646 false, /* isAlwaysInSlot. Only relevant for getters. */
30647 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30648 false, /* isTypedMethod. Only relevant for methods. */
30649 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30650};
30651
30652MOZ_CAN_RUN_SCRIPT static bool
30653passDictionary(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30654{
30655 BindingCallContext cx(cx_, "TestExampleInterface.passDictionary");
30656 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30659( cx, "TestExampleInterface"
, "passDictionary", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30657 "TestExampleInterface", "passDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30659( cx, "TestExampleInterface"
, "passDictionary", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30658 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30659( cx, "TestExampleInterface"
, "passDictionary", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30659 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30659( cx, "TestExampleInterface"
, "passDictionary", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30660
30661 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30662 RootedDictionary<binding_detail::FastDict> arg0(cx);
30663 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", false)) {
30664 return false;
30665 }
30666 // NOTE: This assert does NOT call the function.
30667 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionary(cx, Constify(arg0)))>, "Should be returning void here");
30668 MOZ_KnownLive(self)(self)->PassDictionary(cx, Constify(arg0));
30669 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30669); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30669; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30670 args.rval().setUndefined();
30671 return true;
30672}
30673
30674static const JSJitInfo passDictionary_methodinfo = {
30675 { (JSJitGetterOp)passDictionary },
30676 { prototypes::id::TestExampleInterface },
30677 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30678 JSJitInfo::Method,
30679 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30680 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30681 false, /* isInfallible. False in setters. */
30682 false, /* isMovable. Not relevant for setters. */
30683 false, /* isEliminatable. Not relevant for setters. */
30684 false, /* isAlwaysInSlot. Only relevant for getters. */
30685 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30686 false, /* isTypedMethod. Only relevant for methods. */
30687 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30688};
30689
30690MOZ_CAN_RUN_SCRIPT static bool
30691passDictionary2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30692{
30693 BindingCallContext cx(cx_, "TestExampleInterface.passDictionary2");
30694 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30697( cx, "TestExampleInterface"
, "passDictionary2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30695 "TestExampleInterface", "passDictionary2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30697( cx, "TestExampleInterface"
, "passDictionary2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30696 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30697( cx, "TestExampleInterface"
, "passDictionary2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30697 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30697( cx, "TestExampleInterface"
, "passDictionary2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30698
30699 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30700 if (!args.requireAtLeast(cx, "TestExampleInterface.passDictionary2", 1)) {
30701 return false;
30702 }
30703 RootedDictionary<binding_detail::FastDict> arg0(cx);
30704 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
30705 return false;
30706 }
30707 // NOTE: This assert does NOT call the function.
30708 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionary2(cx, Constify(arg0)))>, "Should be returning void here");
30709 MOZ_KnownLive(self)(self)->PassDictionary2(cx, Constify(arg0));
30710 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30710); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30710; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30711 args.rval().setUndefined();
30712 return true;
30713}
30714
30715static const JSJitInfo passDictionary2_methodinfo = {
30716 { (JSJitGetterOp)passDictionary2 },
30717 { prototypes::id::TestExampleInterface },
30718 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30719 JSJitInfo::Method,
30720 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30721 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30722 false, /* isInfallible. False in setters. */
30723 false, /* isMovable. Not relevant for setters. */
30724 false, /* isEliminatable. Not relevant for setters. */
30725 false, /* isAlwaysInSlot. Only relevant for getters. */
30726 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30727 false, /* isTypedMethod. Only relevant for methods. */
30728 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30729};
30730
30731MOZ_CAN_RUN_SCRIPT static bool
30732get_readonlyDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
30733{
30734 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30737( cx, "TestExampleInterface"
, "readonlyDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30735 "TestExampleInterface", "readonlyDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30737( cx, "TestExampleInterface"
, "readonlyDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30736 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject30737( cx, "TestExampleInterface"
, "readonlyDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30737 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30737( cx, "TestExampleInterface"
, "readonlyDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30738
30739 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30740 // Have to either root across the getter call or reget after.
30741 bool isXray;
30742 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
30743 if (!slotStorage) {
30744 return false;
30745 }
30746 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 14) : (DOM_INSTANCE_RESERVED_SLOTS1 + 14);
30747 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 30747); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 30747; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
30748 {
30749 // Scope for cachedVal
30750 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
30751 if (!cachedVal.isUndefined()) {
30752 args.rval().set(cachedVal);
30753 // The cached value is in the compartment of slotStorage,
30754 // so wrap into the caller compartment as needed.
30755 return MaybeWrapNonDOMObjectValue(cx, args.rval());
30756 }
30757 }
30758
30759 RootedDictionary<Dict> result(cx);
30760 // NOTE: This assert does NOT call the function.
30761 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlyDictionary(cx, result))>, "Should be returning void here");
30762 MOZ_KnownLive(self)(self)->GetReadonlyDictionary(cx, result);
30763 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30763); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30763; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30764 {
30765 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
30766 JSAutoRealm ar(cx, conversionScope);
30767 do { // block we break out of when done wrapping
30768 if (!result.ToObjectInternal(cx, args.rval())) {
30769 return false;
30770 }
30771 break;
30772 } while (false);
30773 }
30774 { // And now store things in the realm of our slotStorage.
30775 JSAutoRealm ar(cx, slotStorage);
30776 // Make a copy so that we don't do unnecessary wrapping on args.rval().
30777 JS::Rooted<JS::Value> storedVal(cx, args.rval());
30778 if (!MaybeWrapNonDOMObjectValue(cx, &storedVal)) {
30779 return false;
30780 }
30781 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
30782 if (!isXray) {
30783 // In the Xray case we don't need to do this, because getting the
30784 // expando object already preserved our wrapper.
30785 PreserveWrapper(self);
30786 }
30787 }
30788 // And now make sure args.rval() is in the caller realm.
30789 return MaybeWrapNonDOMObjectValue(cx, args.rval());
30790}
30791
30792static const JSJitInfo readonlyDictionary_getterinfo = {
30793 { get_readonlyDictionary },
30794 { prototypes::id::TestExampleInterface },
30795 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30796 JSJitInfo::Getter,
30797 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
30798 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
30799 false, /* isInfallible. False in setters. */
30800 true, /* isMovable. Not relevant for setters. */
30801 true, /* isEliminatable. Not relevant for setters. */
30802 false, /* isAlwaysInSlot. Only relevant for getters. */
30803 true, /* isLazilyCachedInSlot. Only relevant for getters. */
30804 false, /* isTypedMethod. Only relevant for methods. */
30805 (DOM_INSTANCE_RESERVED_SLOTS1 + 14) /* Reserved slot index, if we're stored in a slot, else 0. */
30806};
30807static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 14) <= JSJitInfo::maxSlotIndex, "We won't fit");
30808static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 14) < 22, "There is no slot for us");
30809
30810MOZ_CAN_RUN_SCRIPT static bool
30811get_readonlyNullableDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
30812{
30813 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30816( cx, "TestExampleInterface"
, "readonlyNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30814 "TestExampleInterface", "readonlyNullableDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30816( cx, "TestExampleInterface"
, "readonlyNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30815 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject30816( cx, "TestExampleInterface"
, "readonlyNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30816 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30816( cx, "TestExampleInterface"
, "readonlyNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30817
30818 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30819 // Have to either root across the getter call or reget after.
30820 bool isXray;
30821 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
30822 if (!slotStorage) {
30823 return false;
30824 }
30825 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 15) : (DOM_INSTANCE_RESERVED_SLOTS1 + 15);
30826 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 30826); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 30826; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
30827 {
30828 // Scope for cachedVal
30829 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
30830 if (!cachedVal.isUndefined()) {
30831 args.rval().set(cachedVal);
30832 // The cached value is in the compartment of slotStorage,
30833 // so wrap into the caller compartment as needed.
30834 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
30835 }
30836 }
30837
30838 NullableRootedDictionary<Dict> result(cx);
30839 // NOTE: This assert does NOT call the function.
30840 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlyNullableDictionary(cx, result))>, "Should be returning void here");
30841 MOZ_KnownLive(self)(self)->GetReadonlyNullableDictionary(cx, result);
30842 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30842); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30842; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30843 {
30844 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
30845 JSAutoRealm ar(cx, conversionScope);
30846 do { // block we break out of when done wrapping
30847 if (result.IsNull()) {
30848 args.rval().setNull();
30849 break;
30850 }
30851 if (!result.Value().ToObjectInternal(cx, args.rval())) {
30852 return false;
30853 }
30854 break;
30855 } while (false);
30856 }
30857 { // And now store things in the realm of our slotStorage.
30858 JSAutoRealm ar(cx, slotStorage);
30859 // Make a copy so that we don't do unnecessary wrapping on args.rval().
30860 JS::Rooted<JS::Value> storedVal(cx, args.rval());
30861 if (!MaybeWrapNonDOMObjectOrNullValue(cx, &storedVal)) {
30862 return false;
30863 }
30864 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
30865 if (!isXray) {
30866 // In the Xray case we don't need to do this, because getting the
30867 // expando object already preserved our wrapper.
30868 PreserveWrapper(self);
30869 }
30870 }
30871 // And now make sure args.rval() is in the caller realm.
30872 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
30873}
30874
30875static const JSJitInfo readonlyNullableDictionary_getterinfo = {
30876 { get_readonlyNullableDictionary },
30877 { prototypes::id::TestExampleInterface },
30878 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30879 JSJitInfo::Getter,
30880 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
30881 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
30882 false, /* isInfallible. False in setters. */
30883 true, /* isMovable. Not relevant for setters. */
30884 true, /* isEliminatable. Not relevant for setters. */
30885 false, /* isAlwaysInSlot. Only relevant for getters. */
30886 true, /* isLazilyCachedInSlot. Only relevant for getters. */
30887 false, /* isTypedMethod. Only relevant for methods. */
30888 (DOM_INSTANCE_RESERVED_SLOTS1 + 15) /* Reserved slot index, if we're stored in a slot, else 0. */
30889};
30890static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 15) <= JSJitInfo::maxSlotIndex, "We won't fit");
30891static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 15) < 22, "There is no slot for us");
30892
30893MOZ_CAN_RUN_SCRIPT static bool
30894get_writableDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
30895{
30896 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30899( cx, "TestExampleInterface"
, "writableDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30897 "TestExampleInterface", "writableDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30899( cx, "TestExampleInterface"
, "writableDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30898 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject30899( cx, "TestExampleInterface"
, "writableDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30899 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30899( cx, "TestExampleInterface"
, "writableDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30900
30901 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30902 // Have to either root across the getter call or reget after.
30903 bool isXray;
30904 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
30905 if (!slotStorage) {
30906 return false;
30907 }
30908 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 16) : (DOM_INSTANCE_RESERVED_SLOTS1 + 16);
30909 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 30909); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 30909; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
30910 {
30911 // Scope for cachedVal
30912 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
30913 if (!cachedVal.isUndefined()) {
30914 args.rval().set(cachedVal);
30915 // The cached value is in the compartment of slotStorage,
30916 // so wrap into the caller compartment as needed.
30917 return MaybeWrapNonDOMObjectValue(cx, args.rval());
30918 }
30919 }
30920
30921 RootedDictionary<Dict> result(cx);
30922 // NOTE: This assert does NOT call the function.
30923 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableDictionary(cx, result))>, "Should be returning void here");
30924 MOZ_KnownLive(self)(self)->GetWritableDictionary(cx, result);
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)"
, "../TestExampleGenBinding.cpp", 30925); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30925; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30926 {
30927 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
30928 JSAutoRealm ar(cx, conversionScope);
30929 do { // block we break out of when done wrapping
30930 if (!result.ToObjectInternal(cx, args.rval())) {
30931 return false;
30932 }
30933 break;
30934 } while (false);
30935 }
30936 { // And now store things in the realm of our slotStorage.
30937 JSAutoRealm ar(cx, slotStorage);
30938 // Make a copy so that we don't do unnecessary wrapping on args.rval().
30939 JS::Rooted<JS::Value> storedVal(cx, args.rval());
30940 if (!MaybeWrapNonDOMObjectValue(cx, &storedVal)) {
30941 return false;
30942 }
30943 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
30944 if (!isXray) {
30945 // In the Xray case we don't need to do this, because getting the
30946 // expando object already preserved our wrapper.
30947 PreserveWrapper(self);
30948 }
30949 }
30950 // And now make sure args.rval() is in the caller realm.
30951 return MaybeWrapNonDOMObjectValue(cx, args.rval());
30952}
30953
30954MOZ_CAN_RUN_SCRIPT static bool
30955set_writableDictionary(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
30956{
30957 BindingCallContext cx(cx_, "TestExampleInterface.writableDictionary setter");
30958 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30961( cx, "TestExampleInterface"
, "writableDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30959 "TestExampleInterface", "writableDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30961( cx, "TestExampleInterface"
, "writableDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30960 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject30961( cx, "TestExampleInterface"
, "writableDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
30961 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30961( cx, "TestExampleInterface"
, "writableDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
30962
30963 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
30964 RootedDictionary<binding_detail::FastDict> arg0(cx);
30965 if (!arg0.Init(cx, args[0], "Value being assigned", false)) {
30966 return false;
30967 }
30968 // NOTE: This assert does NOT call the function.
30969 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableDictionary(cx, Constify(arg0)))>, "Should be returning void here");
30970 MOZ_KnownLive(self)(self)->SetWritableDictionary(cx, Constify(arg0));
30971 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 30971); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30971; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30972
30973 ClearCachedWritableDictionaryValue(self);
30974 return true;
30975}
30976
30977static const JSJitInfo writableDictionary_getterinfo = {
30978 { get_writableDictionary },
30979 { prototypes::id::TestExampleInterface },
30980 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30981 JSJitInfo::Getter,
30982 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
30983 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
30984 false, /* isInfallible. False in setters. */
30985 true, /* isMovable. Not relevant for setters. */
30986 true, /* isEliminatable. Not relevant for setters. */
30987 false, /* isAlwaysInSlot. Only relevant for getters. */
30988 true, /* isLazilyCachedInSlot. Only relevant for getters. */
30989 false, /* isTypedMethod. Only relevant for methods. */
30990 (DOM_INSTANCE_RESERVED_SLOTS1 + 16) /* Reserved slot index, if we're stored in a slot, else 0. */
30991};
30992static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 16) <= JSJitInfo::maxSlotIndex, "We won't fit");
30993static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 16) < 22, "There is no slot for us");
30994static const JSJitInfo writableDictionary_setterinfo = {
30995 { (JSJitGetterOp)set_writableDictionary },
30996 { prototypes::id::TestExampleInterface },
30997 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
30998 JSJitInfo::Setter,
30999 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31000 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31001 false, /* isInfallible. False in setters. */
31002 false, /* isMovable. Not relevant for setters. */
31003 false, /* isEliminatable. Not relevant for setters. */
31004 false, /* isAlwaysInSlot. Only relevant for getters. */
31005 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31006 false, /* isTypedMethod. Only relevant for methods. */
31007 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31008};
31009
31010MOZ_CAN_RUN_SCRIPT static bool
31011get_readonlyFrozenDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
31012{
31013 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31016( cx, "TestExampleInterface"
, "readonlyFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31014 "TestExampleInterface", "readonlyFrozenDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31016( cx, "TestExampleInterface"
, "readonlyFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31015 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject31016( cx, "TestExampleInterface"
, "readonlyFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31016 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31016( cx, "TestExampleInterface"
, "readonlyFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31017
31018 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31019 // Have to either root across the getter call or reget after.
31020 bool isXray;
31021 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
31022 if (!slotStorage) {
31023 return false;
31024 }
31025 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 17) : (DOM_INSTANCE_RESERVED_SLOTS1 + 17);
31026 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 31026); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 31026; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
31027 {
31028 // Scope for cachedVal
31029 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
31030 if (!cachedVal.isUndefined()) {
31031 args.rval().set(cachedVal);
31032 // The cached value is in the compartment of slotStorage,
31033 // so wrap into the caller compartment as needed.
31034 return MaybeWrapNonDOMObjectValue(cx, args.rval());
31035 }
31036 }
31037
31038 RootedDictionary<Dict> result(cx);
31039 // NOTE: This assert does NOT call the function.
31040 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlyFrozenDictionary(cx, result))>, "Should be returning void here");
31041 MOZ_KnownLive(self)(self)->GetReadonlyFrozenDictionary(cx, result);
31042 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31042); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31042; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31043 {
31044 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
31045 JSAutoRealm ar(cx, conversionScope);
31046 do { // block we break out of when done wrapping
31047 if (!result.ToObjectInternal(cx, args.rval())) {
31048 return false;
31049 }
31050 break;
31051 } while (false);
31052 JS::Rooted<JSObject*> rvalObj(cx, &args.rval().toObject());
31053 if (!JS_FreezeObject(cx, rvalObj)) {
31054 return false;
31055 }
31056 }
31057 { // And now store things in the realm of our slotStorage.
31058 JSAutoRealm ar(cx, slotStorage);
31059 // Make a copy so that we don't do unnecessary wrapping on args.rval().
31060 JS::Rooted<JS::Value> storedVal(cx, args.rval());
31061 if (!MaybeWrapNonDOMObjectValue(cx, &storedVal)) {
31062 return false;
31063 }
31064 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
31065 if (!isXray) {
31066 // In the Xray case we don't need to do this, because getting the
31067 // expando object already preserved our wrapper.
31068 PreserveWrapper(self);
31069 }
31070 }
31071 // And now make sure args.rval() is in the caller realm.
31072 return MaybeWrapNonDOMObjectValue(cx, args.rval());
31073}
31074
31075static const JSJitInfo readonlyFrozenDictionary_getterinfo = {
31076 { get_readonlyFrozenDictionary },
31077 { prototypes::id::TestExampleInterface },
31078 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31079 JSJitInfo::Getter,
31080 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
31081 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
31082 false, /* isInfallible. False in setters. */
31083 true, /* isMovable. Not relevant for setters. */
31084 true, /* isEliminatable. Not relevant for setters. */
31085 false, /* isAlwaysInSlot. Only relevant for getters. */
31086 true, /* isLazilyCachedInSlot. Only relevant for getters. */
31087 false, /* isTypedMethod. Only relevant for methods. */
31088 (DOM_INSTANCE_RESERVED_SLOTS1 + 17) /* Reserved slot index, if we're stored in a slot, else 0. */
31089};
31090static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 17) <= JSJitInfo::maxSlotIndex, "We won't fit");
31091static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 17) < 22, "There is no slot for us");
31092
31093MOZ_CAN_RUN_SCRIPT static bool
31094get_readonlyFrozenNullableDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
31095{
31096 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31099( cx, "TestExampleInterface"
, "readonlyFrozenNullableDictionary", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31097 "TestExampleInterface", "readonlyFrozenNullableDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31099( cx, "TestExampleInterface"
, "readonlyFrozenNullableDictionary", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31098 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject31099( cx, "TestExampleInterface"
, "readonlyFrozenNullableDictionary", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31099 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31099( cx, "TestExampleInterface"
, "readonlyFrozenNullableDictionary", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31100
31101 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31102 // Have to either root across the getter call or reget after.
31103 bool isXray;
31104 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
31105 if (!slotStorage) {
31106 return false;
31107 }
31108 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 18) : (DOM_INSTANCE_RESERVED_SLOTS1 + 18);
31109 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 31109); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 31109; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
31110 {
31111 // Scope for cachedVal
31112 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
31113 if (!cachedVal.isUndefined()) {
31114 args.rval().set(cachedVal);
31115 // The cached value is in the compartment of slotStorage,
31116 // so wrap into the caller compartment as needed.
31117 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
31118 }
31119 }
31120
31121 NullableRootedDictionary<Dict> result(cx);
31122 // NOTE: This assert does NOT call the function.
31123 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlyFrozenNullableDictionary(cx, result))>, "Should be returning void here");
31124 MOZ_KnownLive(self)(self)->GetReadonlyFrozenNullableDictionary(cx, result);
31125 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31125); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31125; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31126 {
31127 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
31128 JSAutoRealm ar(cx, conversionScope);
31129 do { // block we break out of when done wrapping
31130 if (result.IsNull()) {
31131 args.rval().setNull();
31132 break;
31133 }
31134 if (!result.Value().ToObjectInternal(cx, args.rval())) {
31135 return false;
31136 }
31137 break;
31138 } while (false);
31139 if (args.rval().isObject()) {
31140 JS::Rooted<JSObject*> rvalObj(cx, &args.rval().toObject());
31141 if (!JS_FreezeObject(cx, rvalObj)) {
31142 return false;
31143 }
31144 }
31145 }
31146 { // And now store things in the realm of our slotStorage.
31147 JSAutoRealm ar(cx, slotStorage);
31148 // Make a copy so that we don't do unnecessary wrapping on args.rval().
31149 JS::Rooted<JS::Value> storedVal(cx, args.rval());
31150 if (!MaybeWrapNonDOMObjectOrNullValue(cx, &storedVal)) {
31151 return false;
31152 }
31153 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
31154 if (!isXray) {
31155 // In the Xray case we don't need to do this, because getting the
31156 // expando object already preserved our wrapper.
31157 PreserveWrapper(self);
31158 }
31159 }
31160 // And now make sure args.rval() is in the caller realm.
31161 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
31162}
31163
31164static const JSJitInfo readonlyFrozenNullableDictionary_getterinfo = {
31165 { get_readonlyFrozenNullableDictionary },
31166 { prototypes::id::TestExampleInterface },
31167 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31168 JSJitInfo::Getter,
31169 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
31170 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
31171 false, /* isInfallible. False in setters. */
31172 true, /* isMovable. Not relevant for setters. */
31173 true, /* isEliminatable. Not relevant for setters. */
31174 false, /* isAlwaysInSlot. Only relevant for getters. */
31175 true, /* isLazilyCachedInSlot. Only relevant for getters. */
31176 false, /* isTypedMethod. Only relevant for methods. */
31177 (DOM_INSTANCE_RESERVED_SLOTS1 + 18) /* Reserved slot index, if we're stored in a slot, else 0. */
31178};
31179static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 18) <= JSJitInfo::maxSlotIndex, "We won't fit");
31180static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 18) < 22, "There is no slot for us");
31181
31182MOZ_CAN_RUN_SCRIPT static bool
31183get_writableFrozenDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
31184{
31185 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31188( cx, "TestExampleInterface"
, "writableFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31186 "TestExampleInterface", "writableFrozenDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31188( cx, "TestExampleInterface"
, "writableFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31187 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject31188( cx, "TestExampleInterface"
, "writableFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31188 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31188( cx, "TestExampleInterface"
, "writableFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31189
31190 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31191 // Have to either root across the getter call or reget after.
31192 bool isXray;
31193 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
31194 if (!slotStorage) {
31195 return false;
31196 }
31197 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 19) : (DOM_INSTANCE_RESERVED_SLOTS1 + 19);
31198 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 31198); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 31198; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
31199 {
31200 // Scope for cachedVal
31201 JS::Value cachedVal = JS::GetReservedSlot(slotStorage, slotIndex);
31202 if (!cachedVal.isUndefined()) {
31203 args.rval().set(cachedVal);
31204 // The cached value is in the compartment of slotStorage,
31205 // so wrap into the caller compartment as needed.
31206 return MaybeWrapNonDOMObjectValue(cx, args.rval());
31207 }
31208 }
31209
31210 RootedDictionary<Dict> result(cx);
31211 // NOTE: This assert does NOT call the function.
31212 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableFrozenDictionary(cx, result))>, "Should be returning void here");
31213 MOZ_KnownLive(self)(self)->GetWritableFrozenDictionary(cx, result);
31214 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31214); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31214; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31215 {
31216 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
31217 JSAutoRealm ar(cx, conversionScope);
31218 do { // block we break out of when done wrapping
31219 if (!result.ToObjectInternal(cx, args.rval())) {
31220 return false;
31221 }
31222 break;
31223 } while (false);
31224 JS::Rooted<JSObject*> rvalObj(cx, &args.rval().toObject());
31225 if (!JS_FreezeObject(cx, rvalObj)) {
31226 return false;
31227 }
31228 }
31229 { // And now store things in the realm of our slotStorage.
31230 JSAutoRealm ar(cx, slotStorage);
31231 // Make a copy so that we don't do unnecessary wrapping on args.rval().
31232 JS::Rooted<JS::Value> storedVal(cx, args.rval());
31233 if (!MaybeWrapNonDOMObjectValue(cx, &storedVal)) {
31234 return false;
31235 }
31236 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
31237 if (!isXray) {
31238 // In the Xray case we don't need to do this, because getting the
31239 // expando object already preserved our wrapper.
31240 PreserveWrapper(self);
31241 }
31242 }
31243 // And now make sure args.rval() is in the caller realm.
31244 return MaybeWrapNonDOMObjectValue(cx, args.rval());
31245}
31246
31247MOZ_CAN_RUN_SCRIPT static bool
31248set_writableFrozenDictionary(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
31249{
31250 BindingCallContext cx(cx_, "TestExampleInterface.writableFrozenDictionary setter");
31251 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31254( cx, "TestExampleInterface"
, "writableFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31252 "TestExampleInterface", "writableFrozenDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31254( cx, "TestExampleInterface"
, "writableFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31253 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject31254( cx, "TestExampleInterface"
, "writableFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31254 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31254( cx, "TestExampleInterface"
, "writableFrozenDictionary", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31255
31256 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31257 RootedDictionary<binding_detail::FastDict> arg0(cx);
31258 if (!arg0.Init(cx, args[0], "Value being assigned", false)) {
31259 return false;
31260 }
31261 // NOTE: This assert does NOT call the function.
31262 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableFrozenDictionary(cx, Constify(arg0)))>, "Should be returning void here");
31263 MOZ_KnownLive(self)(self)->SetWritableFrozenDictionary(cx, Constify(arg0));
31264 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31264); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31264; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31265
31266 ClearCachedWritableFrozenDictionaryValue(self);
31267 return true;
31268}
31269
31270static const JSJitInfo writableFrozenDictionary_getterinfo = {
31271 { get_writableFrozenDictionary },
31272 { prototypes::id::TestExampleInterface },
31273 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31274 JSJitInfo::Getter,
31275 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
31276 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
31277 false, /* isInfallible. False in setters. */
31278 true, /* isMovable. Not relevant for setters. */
31279 true, /* isEliminatable. Not relevant for setters. */
31280 false, /* isAlwaysInSlot. Only relevant for getters. */
31281 true, /* isLazilyCachedInSlot. Only relevant for getters. */
31282 false, /* isTypedMethod. Only relevant for methods. */
31283 (DOM_INSTANCE_RESERVED_SLOTS1 + 19) /* Reserved slot index, if we're stored in a slot, else 0. */
31284};
31285static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 19) <= JSJitInfo::maxSlotIndex, "We won't fit");
31286static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 19) < 22, "There is no slot for us");
31287static const JSJitInfo writableFrozenDictionary_setterinfo = {
31288 { (JSJitGetterOp)set_writableFrozenDictionary },
31289 { prototypes::id::TestExampleInterface },
31290 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31291 JSJitInfo::Setter,
31292 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31293 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31294 false, /* isInfallible. False in setters. */
31295 false, /* isMovable. Not relevant for setters. */
31296 false, /* isEliminatable. Not relevant for setters. */
31297 false, /* isAlwaysInSlot. Only relevant for getters. */
31298 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31299 false, /* isTypedMethod. Only relevant for methods. */
31300 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31301};
31302
31303MOZ_CAN_RUN_SCRIPT static bool
31304receiveDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31305{
31306 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31309( cx, "TestExampleInterface"
, "receiveDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31307 "TestExampleInterface", "receiveDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31309( cx, "TestExampleInterface"
, "receiveDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31308 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31309( cx, "TestExampleInterface"
, "receiveDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31309 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31309( cx, "TestExampleInterface"
, "receiveDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31310
31311 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31312 RootedDictionary<Dict> result(cx);
31313 // NOTE: This assert does NOT call the function.
31314 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveDictionary(cx, result))>, "Should be returning void here");
31315 MOZ_KnownLive(self)(self)->ReceiveDictionary(cx, result);
31316 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31316); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31316; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31317 if (!result.ToObjectInternal(cx, args.rval())) {
31318 return false;
31319 }
31320 return true;
31321}
31322
31323static const JSJitInfo receiveDictionary_methodinfo = {
31324 { (JSJitGetterOp)receiveDictionary },
31325 { prototypes::id::TestExampleInterface },
31326 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31327 JSJitInfo::Method,
31328 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31329 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
31330 false, /* isInfallible. False in setters. */
31331 false, /* isMovable. Not relevant for setters. */
31332 false, /* isEliminatable. Not relevant for setters. */
31333 false, /* isAlwaysInSlot. Only relevant for getters. */
31334 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31335 false, /* isTypedMethod. Only relevant for methods. */
31336 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31337};
31338
31339MOZ_CAN_RUN_SCRIPT static bool
31340receiveNullableDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31341{
31342 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31345( cx, "TestExampleInterface"
, "receiveNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31343 "TestExampleInterface", "receiveNullableDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31345( cx, "TestExampleInterface"
, "receiveNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31344 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31345( cx, "TestExampleInterface"
, "receiveNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31345 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31345( cx, "TestExampleInterface"
, "receiveNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31346
31347 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31348 NullableRootedDictionary<Dict> result(cx);
31349 // NOTE: This assert does NOT call the function.
31350 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableDictionary(cx, result))>, "Should be returning void here");
31351 MOZ_KnownLive(self)(self)->ReceiveNullableDictionary(cx, result);
31352 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31352); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31352; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31353 if (result.IsNull()) {
31354 args.rval().setNull();
31355 return true;
31356 }
31357 if (!result.Value().ToObjectInternal(cx, args.rval())) {
31358 return false;
31359 }
31360 return true;
31361}
31362
31363static const JSJitInfo receiveNullableDictionary_methodinfo = {
31364 { (JSJitGetterOp)receiveNullableDictionary },
31365 { prototypes::id::TestExampleInterface },
31366 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31367 JSJitInfo::Method,
31368 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31369 JSVAL_TYPE_UNKNOWN, /* 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
31380passOtherDictionary(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31381{
31382 BindingCallContext cx(cx_, "TestExampleInterface.passOtherDictionary");
31383 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31386( cx, "TestExampleInterface"
, "passOtherDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31384 "TestExampleInterface", "passOtherDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31386( cx, "TestExampleInterface"
, "passOtherDictionary", 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, "TestExampleInterface"
, "passOtherDictionary", 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, "TestExampleInterface"
, "passOtherDictionary", 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::TestExampleInterface*>(void_self);
31389 binding_detail::FastGrandparentDict arg0;
31390 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", false)) {
31391 return false;
31392 }
31393 // NOTE: This assert does NOT call the function.
31394 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOtherDictionary(Constify(arg0)))>, "Should be returning void here");
31395 MOZ_KnownLive(self)(self)->PassOtherDictionary(Constify(arg0));
31396 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31396); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31396; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31397 args.rval().setUndefined();
31398 return true;
31399}
31400
31401static const JSJitInfo passOtherDictionary_methodinfo = {
31402 { (JSJitGetterOp)passOtherDictionary },
31403 { prototypes::id::TestExampleInterface },
31404 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31405 JSJitInfo::Method,
31406 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31407 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31408 false, /* isInfallible. False in setters. */
31409 false, /* isMovable. Not relevant for setters. */
31410 false, /* isEliminatable. Not relevant for setters. */
31411 false, /* isAlwaysInSlot. Only relevant for getters. */
31412 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31413 false, /* isTypedMethod. Only relevant for methods. */
31414 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31415};
31416
31417MOZ_CAN_RUN_SCRIPT static bool
31418passSequenceOfDictionaries(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31419{
31420 BindingCallContext cx(cx_, "TestExampleInterface.passSequenceOfDictionaries");
31421 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31424( cx, "TestExampleInterface"
, "passSequenceOfDictionaries", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31422 "TestExampleInterface", "passSequenceOfDictionaries", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31424( cx, "TestExampleInterface"
, "passSequenceOfDictionaries", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31423 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31424( cx, "TestExampleInterface"
, "passSequenceOfDictionaries", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31424 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31424( cx, "TestExampleInterface"
, "passSequenceOfDictionaries", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31425
31426 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31427 if (!args.requireAtLeast(cx, "TestExampleInterface.passSequenceOfDictionaries", 1)) {
31428 return false;
31429 }
31430 binding_detail::AutoSequence<Dict> arg0;
31431 SequenceRooter<Dict> arg0_holder(cx, &arg0);
31432 if (args[0].isObject()) {
31433 JS::ForOfIterator iter(cx);
31434 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
31435 return false;
31436 }
31437 if (!iter.valueIsIterable()) {
31438 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
31439 return false;
31440 }
31441 binding_detail::AutoSequence<Dict> &arr = arg0;
31442 JS::Rooted<JS::Value> temp(cx);
31443 while (true) {
31444 bool done;
31445 if (!iter.next(&temp, &done)) {
31446 return false;
31447 }
31448 if (done) {
31449 break;
31450 }
31451 Dict* slotPtr = arr.AppendElement(mozilla::fallible);
31452 if (!slotPtr) {
31453 JS_ReportOutOfMemory(cx);
31454 return false;
31455 }
31456 Dict& slot = *slotPtr;
31457 if (!slot.Init(cx, temp, "Element of argument 1", false)) {
31458 return false;
31459 }
31460 }
31461 } else {
31462 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
31463 return false;
31464 }
31465 // NOTE: This assert does NOT call the function.
31466 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfDictionaries(cx, Constify(arg0)))>, "Should be returning void here");
31467 MOZ_KnownLive(self)(self)->PassSequenceOfDictionaries(cx, Constify(arg0));
31468 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31468); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31468; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31469 args.rval().setUndefined();
31470 return true;
31471}
31472
31473static const JSJitInfo passSequenceOfDictionaries_methodinfo = {
31474 { (JSJitGetterOp)passSequenceOfDictionaries },
31475 { prototypes::id::TestExampleInterface },
31476 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31477 JSJitInfo::Method,
31478 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31479 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31480 false, /* isInfallible. False in setters. */
31481 false, /* isMovable. Not relevant for setters. */
31482 false, /* isEliminatable. Not relevant for setters. */
31483 false, /* isAlwaysInSlot. Only relevant for getters. */
31484 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31485 false, /* isTypedMethod. Only relevant for methods. */
31486 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31487};
31488
31489MOZ_CAN_RUN_SCRIPT static bool
31490passRecordOfDictionaries(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31491{
31492 BindingCallContext cx(cx_, "TestExampleInterface.passRecordOfDictionaries");
31493 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31496( cx, "TestExampleInterface"
, "passRecordOfDictionaries", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31494 "TestExampleInterface", "passRecordOfDictionaries", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31496( cx, "TestExampleInterface"
, "passRecordOfDictionaries", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31495 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31496( cx, "TestExampleInterface"
, "passRecordOfDictionaries", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31496 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31496( cx, "TestExampleInterface"
, "passRecordOfDictionaries", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31497
31498 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31499 if (!args.requireAtLeast(cx, "TestExampleInterface.passRecordOfDictionaries", 1)) {
31500 return false;
31501 }
31502 Record<nsString, GrandparentDict> arg0;
31503 if (args[0].isObject()) {
31504 auto& recordEntries = arg0.Entries();
31505
31506 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
31507 JS::RootedVector<jsid> ids(cx);
31508 if (!js::GetPropertyKeys(cx, recordObj,
31509 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
31510 return false;
31511 }
31512 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
31513 JS_ReportOutOfMemory(cx);
31514 return false;
31515 }
31516 JS::Rooted<JS::Value> propNameValue(cx);
31517 JS::Rooted<JS::Value> temp(cx);
31518 JS::Rooted<jsid> curId(cx);
31519 JS::Rooted<JS::Value> idVal(cx);
31520 // Use a hashset to keep track of ids seen, to avoid
31521 // introducing nasty O(N^2) behavior scanning for them all the
31522 // time. Ideally we'd use a data structure with O(1) lookup
31523 // _and_ ordering for the MozMap, but we don't have one lying
31524 // around.
31525 nsTHashtable<nsStringHashKey> idsSeen;
31526 for (size_t i = 0; i < ids.length(); ++i) {
31527 curId = ids[i];
31528
31529 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
31530 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
31531 &desc)) {
31532 return false;
31533 }
31534
31535 if (desc.isNothing() || !desc->enumerable()) {
31536 continue;
31537 }
31538
31539 idVal = js::IdToValue(curId);
31540 nsString propName;
31541 // This will just throw if idVal is a Symbol, like the spec says
31542 // to do.
31543 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
31544 return false;
31545 }
31546
31547 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
31548 return false;
31549 }
31550
31551 Record<nsString, GrandparentDict>::EntryType* entry;
31552 if (!idsSeen.EnsureInserted(propName)) {
31553 // Find the existing entry.
31554 auto idx = recordEntries.IndexOf(propName);
31555 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?" ")"
, "../TestExampleGenBinding.cpp", 31556); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 31556; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
31556 "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?" ")"
, "../TestExampleGenBinding.cpp", 31556); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 31556; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
31557 // Now blow it away to make it look like it was just added
31558 // to the array, because it's not obvious that it's
31559 // safe to write to its already-initialized mValue via our
31560 // normal codegen conversions. For example, the value
31561 // could be a union and this would change its type, but
31562 // codegen assumes we won't do that.
31563 entry = recordEntries.ReconstructElementAt(idx);
31564 } else {
31565 // Safe to do an infallible append here, because we did a
31566 // SetCapacity above to the right capacity.
31567 entry = recordEntries.AppendElement();
31568 }
31569 entry->mKey = propName;
31570 GrandparentDict& slot = entry->mValue;
31571 if (!slot.Init(cx, temp, "Value in argument 1", false)) {
31572 return false;
31573 }
31574 }
31575 } else {
31576 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
31577 return false;
31578 }
31579 // NOTE: This assert does NOT call the function.
31580 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfDictionaries(Constify(arg0)))>, "Should be returning void here");
31581 MOZ_KnownLive(self)(self)->PassRecordOfDictionaries(Constify(arg0));
31582 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31582); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31582; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31583 args.rval().setUndefined();
31584 return true;
31585}
31586
31587static const JSJitInfo passRecordOfDictionaries_methodinfo = {
31588 { (JSJitGetterOp)passRecordOfDictionaries },
31589 { prototypes::id::TestExampleInterface },
31590 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31591 JSJitInfo::Method,
31592 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31593 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31594 false, /* isInfallible. False in setters. */
31595 false, /* isMovable. Not relevant for setters. */
31596 false, /* isEliminatable. Not relevant for setters. */
31597 false, /* isAlwaysInSlot. Only relevant for getters. */
31598 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31599 false, /* isTypedMethod. Only relevant for methods. */
31600 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31601};
31602
31603MOZ_CAN_RUN_SCRIPT static bool
31604passDictionaryOrLong(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31605{
31606 BindingCallContext cx(cx_, "TestExampleInterface.passDictionaryOrLong");
31607 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31610( cx, "TestExampleInterface"
, "passDictionaryOrLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31608 "TestExampleInterface", "passDictionaryOrLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31610( cx, "TestExampleInterface"
, "passDictionaryOrLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31609 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31610( cx, "TestExampleInterface"
, "passDictionaryOrLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31610 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31610( cx, "TestExampleInterface"
, "passDictionaryOrLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31611
31612 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31613 unsigned argcount = std::min(args.length(), 1u);
31614 switch (argcount) {
31615 case 0: {
31616 RootedDictionary<binding_detail::FastDict> arg0(cx);
31617 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", false)) {
31618 return false;
31619 }
31620 // NOTE: This assert does NOT call the function.
31621 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionaryOrLong(cx, Constify(arg0)))>, "Should be returning void here");
31622 MOZ_KnownLive(self)(self)->PassDictionaryOrLong(cx, Constify(arg0));
31623 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31623); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31623; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31624 args.rval().setUndefined();
31625 return true;
31626 break;
31627 }
31628 case 1: {
31629 if (args[0].isNullOrUndefined()) {
31630 RootedDictionary<binding_detail::FastDict> arg0(cx);
31631 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
31632 return false;
31633 }
31634 // NOTE: This assert does NOT call the function.
31635 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionaryOrLong(cx, Constify(arg0)))>, "Should be returning void here");
31636 MOZ_KnownLive(self)(self)->PassDictionaryOrLong(cx, Constify(arg0));
31637 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31637); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31637; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31638 args.rval().setUndefined();
31639 return true;
31640 }
31641 if (args[0].isObject()) {
31642 do {
31643 RootedDictionary<binding_detail::FastDict> arg0(cx);
31644 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
31645 return false;
31646 }
31647 // NOTE: This assert does NOT call the function.
31648 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionaryOrLong(cx, Constify(arg0)))>, "Should be returning void here");
31649 MOZ_KnownLive(self)(self)->PassDictionaryOrLong(cx, Constify(arg0));
31650 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31650); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31650; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31651 args.rval().setUndefined();
31652 return true;
31653 } while (false);
31654 }
31655 int32_t arg0;
31656 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
31657 return false;
31658 }
31659 // NOTE: This assert does NOT call the function.
31660 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionaryOrLong(arg0))>, "Should be returning void here");
31661 MOZ_KnownLive(self)(self)->PassDictionaryOrLong(arg0);
31662 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31662); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31662; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31663 args.rval().setUndefined();
31664 return true;
31665 break;
31666 }
31667 default: {
31668 // Using nsPrintfCString here would require including that
31669 // header. Let's not worry about it.
31670 nsAutoCString argCountStr;
31671 argCountStr.AppendPrintf("%u", args.length());
31672 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
31673 }
31674 }
31675 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 31675); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 31675; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
31676 return false;
31677}
31678
31679static const JSJitInfo passDictionaryOrLong_methodinfo = {
31680 { (JSJitGetterOp)passDictionaryOrLong },
31681 { prototypes::id::TestExampleInterface },
31682 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31683 JSJitInfo::Method,
31684 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31685 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31686 false, /* isInfallible. False in setters. */
31687 false, /* isMovable. Not relevant for setters. */
31688 false, /* isEliminatable. Not relevant for setters. */
31689 false, /* isAlwaysInSlot. Only relevant for getters. */
31690 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31691 false, /* isTypedMethod. Only relevant for methods. */
31692 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31693};
31694
31695MOZ_CAN_RUN_SCRIPT static bool
31696passDictContainingDict(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31697{
31698 BindingCallContext cx(cx_, "TestExampleInterface.passDictContainingDict");
31699 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31702( cx, "TestExampleInterface"
, "passDictContainingDict", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31700 "TestExampleInterface", "passDictContainingDict", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31702( cx, "TestExampleInterface"
, "passDictContainingDict", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31701 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31702( cx, "TestExampleInterface"
, "passDictContainingDict", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31702 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31702( cx, "TestExampleInterface"
, "passDictContainingDict", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31703
31704 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31705 RootedDictionary<binding_detail::FastDictContainingDict> arg0(cx);
31706 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", false)) {
31707 return false;
31708 }
31709 // NOTE: This assert does NOT call the function.
31710 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictContainingDict(cx, Constify(arg0)))>, "Should be returning void here");
31711 MOZ_KnownLive(self)(self)->PassDictContainingDict(cx, Constify(arg0));
31712 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31712); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31712; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31713 args.rval().setUndefined();
31714 return true;
31715}
31716
31717static const JSJitInfo passDictContainingDict_methodinfo = {
31718 { (JSJitGetterOp)passDictContainingDict },
31719 { prototypes::id::TestExampleInterface },
31720 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31721 JSJitInfo::Method,
31722 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31723 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31724 false, /* isInfallible. False in setters. */
31725 false, /* isMovable. Not relevant for setters. */
31726 false, /* isEliminatable. Not relevant for setters. */
31727 false, /* isAlwaysInSlot. Only relevant for getters. */
31728 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31729 false, /* isTypedMethod. Only relevant for methods. */
31730 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31731};
31732
31733MOZ_CAN_RUN_SCRIPT static bool
31734passDictContainingSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31735{
31736 BindingCallContext cx(cx_, "TestExampleInterface.passDictContainingSequence");
31737 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31740( cx, "TestExampleInterface"
, "passDictContainingSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31738 "TestExampleInterface", "passDictContainingSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31740( cx, "TestExampleInterface"
, "passDictContainingSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31739 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31740( cx, "TestExampleInterface"
, "passDictContainingSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31740 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31740( cx, "TestExampleInterface"
, "passDictContainingSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31741
31742 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31743 RootedDictionary<binding_detail::FastDictContainingSequence> arg0(cx);
31744 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", false)) {
31745 return false;
31746 }
31747 // NOTE: This assert does NOT call the function.
31748 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictContainingSequence(cx, Constify(arg0)))>, "Should be returning void here");
31749 MOZ_KnownLive(self)(self)->PassDictContainingSequence(cx, Constify(arg0));
31750 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31750); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31750; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31751 args.rval().setUndefined();
31752 return true;
31753}
31754
31755static const JSJitInfo passDictContainingSequence_methodinfo = {
31756 { (JSJitGetterOp)passDictContainingSequence },
31757 { prototypes::id::TestExampleInterface },
31758 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31759 JSJitInfo::Method,
31760 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31761 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31762 false, /* isInfallible. False in setters. */
31763 false, /* isMovable. Not relevant for setters. */
31764 false, /* isEliminatable. Not relevant for setters. */
31765 false, /* isAlwaysInSlot. Only relevant for getters. */
31766 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31767 false, /* isTypedMethod. Only relevant for methods. */
31768 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31769};
31770
31771MOZ_CAN_RUN_SCRIPT static bool
31772receiveDictContainingSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31773{
31774 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31777( cx, "TestExampleInterface"
, "receiveDictContainingSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31775 "TestExampleInterface", "receiveDictContainingSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31777( cx, "TestExampleInterface"
, "receiveDictContainingSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31776 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31777( cx, "TestExampleInterface"
, "receiveDictContainingSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31777 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31777( cx, "TestExampleInterface"
, "receiveDictContainingSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31778
31779 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31780 RootedDictionary<DictContainingSequence> result(cx);
31781 // NOTE: This assert does NOT call the function.
31782 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveDictContainingSequence(cx, result))>, "Should be returning void here");
31783 MOZ_KnownLive(self)(self)->ReceiveDictContainingSequence(cx, result);
31784 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31784); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31784; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31785 if (!result.ToObjectInternal(cx, args.rval())) {
31786 return false;
31787 }
31788 return true;
31789}
31790
31791static const JSJitInfo receiveDictContainingSequence_methodinfo = {
31792 { (JSJitGetterOp)receiveDictContainingSequence },
31793 { prototypes::id::TestExampleInterface },
31794 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31795 JSJitInfo::Method,
31796 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31797 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
31798 false, /* isInfallible. False in setters. */
31799 false, /* isMovable. Not relevant for setters. */
31800 false, /* isEliminatable. Not relevant for setters. */
31801 false, /* isAlwaysInSlot. Only relevant for getters. */
31802 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31803 false, /* isTypedMethod. Only relevant for methods. */
31804 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31805};
31806
31807MOZ_CAN_RUN_SCRIPT static bool
31808passVariadicDictionary(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31809{
31810 BindingCallContext cx(cx_, "TestExampleInterface.passVariadicDictionary");
31811 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31814( cx, "TestExampleInterface"
, "passVariadicDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31812 "TestExampleInterface", "passVariadicDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31814( cx, "TestExampleInterface"
, "passVariadicDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31813 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31814( cx, "TestExampleInterface"
, "passVariadicDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31814 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31814( cx, "TestExampleInterface"
, "passVariadicDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31815
31816 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31817 AutoSequence<Dict> arg0;
31818 SequenceRooter<Dict> arg0_holder(cx, &arg0);
31819 if (args.length() > 0) {
31820 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
31821 JS_ReportOutOfMemory(cx);
31822 return false;
31823 }
31824 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
31825 // OK to do infallible append here, since we ensured capacity already.
31826 Dict& slot = *arg0.AppendElement();
31827 if (!slot.Init(cx, args[variadicArg], "Argument 1", false)) {
31828 return false;
31829 }
31830 }
31831 }
31832 // NOTE: This assert does NOT call the function.
31833 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicDictionary(cx, Constify(arg0)))>, "Should be returning void here");
31834 MOZ_KnownLive(self)(self)->PassVariadicDictionary(cx, Constify(arg0));
31835 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31835); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31835; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31836 args.rval().setUndefined();
31837 return true;
31838}
31839
31840static const JSJitInfo passVariadicDictionary_methodinfo = {
31841 { (JSJitGetterOp)passVariadicDictionary },
31842 { prototypes::id::TestExampleInterface },
31843 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31844 JSJitInfo::Method,
31845 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31846 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31847 false, /* isInfallible. False in setters. */
31848 false, /* isMovable. Not relevant for setters. */
31849 false, /* isEliminatable. Not relevant for setters. */
31850 false, /* isAlwaysInSlot. Only relevant for getters. */
31851 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31852 false, /* isTypedMethod. Only relevant for methods. */
31853 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31854};
31855
31856MOZ_CAN_RUN_SCRIPT static bool
31857dontEnforceRangeOrClamp(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31858{
31859 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31862( cx, "TestExampleInterface"
, "dontEnforceRangeOrClamp", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31860 "TestExampleInterface", "dontEnforceRangeOrClamp", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31862( cx, "TestExampleInterface"
, "dontEnforceRangeOrClamp", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31861 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31862( cx, "TestExampleInterface"
, "dontEnforceRangeOrClamp", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31862 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31862( cx, "TestExampleInterface"
, "dontEnforceRangeOrClamp", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31863
31864 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31865 if (!args.requireAtLeast(cx, "TestExampleInterface.dontEnforceRangeOrClamp", 1)) {
31866 return false;
31867 }
31868 int8_t arg0;
31869 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
31870 return false;
31871 }
31872 // NOTE: This assert does NOT call the function.
31873 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DontEnforceRangeOrClamp(arg0))>, "Should be returning void here");
31874 MOZ_KnownLive(self)(self)->DontEnforceRangeOrClamp(arg0);
31875 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31875); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31875; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31876 args.rval().setUndefined();
31877 return true;
31878}
31879
31880static const JSJitInfo dontEnforceRangeOrClamp_methodinfo = {
31881 { (JSJitGetterOp)dontEnforceRangeOrClamp },
31882 { prototypes::id::TestExampleInterface },
31883 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31884 JSJitInfo::Method,
31885 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31886 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31887 false, /* isInfallible. False in setters. */
31888 false, /* isMovable. Not relevant for setters. */
31889 false, /* isEliminatable. Not relevant for setters. */
31890 false, /* isAlwaysInSlot. Only relevant for getters. */
31891 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31892 false, /* isTypedMethod. Only relevant for methods. */
31893 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31894};
31895
31896MOZ_CAN_RUN_SCRIPT static bool
31897doEnforceRange(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31898{
31899 BindingCallContext cx(cx_, "TestExampleInterface.doEnforceRange");
31900 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31903( cx, "TestExampleInterface"
, "doEnforceRange", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31901 "TestExampleInterface", "doEnforceRange", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31903( cx, "TestExampleInterface"
, "doEnforceRange", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31902 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31903( cx, "TestExampleInterface"
, "doEnforceRange", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31903 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31903( cx, "TestExampleInterface"
, "doEnforceRange", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31904
31905 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31906 if (!args.requireAtLeast(cx, "TestExampleInterface.doEnforceRange", 1)) {
31907 return false;
31908 }
31909 int8_t arg0;
31910 if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, args[0], "Argument 1", &arg0)) {
31911 return false;
31912 }
31913 // NOTE: This assert does NOT call the function.
31914 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DoEnforceRange(arg0))>, "Should be returning void here");
31915 MOZ_KnownLive(self)(self)->DoEnforceRange(arg0);
31916 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31916); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31916; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31917 args.rval().setUndefined();
31918 return true;
31919}
31920
31921static const JSJitInfo doEnforceRange_methodinfo = {
31922 { (JSJitGetterOp)doEnforceRange },
31923 { prototypes::id::TestExampleInterface },
31924 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31925 JSJitInfo::Method,
31926 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31927 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31928 false, /* isInfallible. False in setters. */
31929 false, /* isMovable. Not relevant for setters. */
31930 false, /* isEliminatable. Not relevant for setters. */
31931 false, /* isAlwaysInSlot. Only relevant for getters. */
31932 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31933 false, /* isTypedMethod. Only relevant for methods. */
31934 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31935};
31936
31937MOZ_CAN_RUN_SCRIPT static bool
31938doEnforceRangeNullable(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31939{
31940 BindingCallContext cx(cx_, "TestExampleInterface.doEnforceRangeNullable");
31941 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31944( cx, "TestExampleInterface"
, "doEnforceRangeNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31942 "TestExampleInterface", "doEnforceRangeNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31944( cx, "TestExampleInterface"
, "doEnforceRangeNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31943 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31944( cx, "TestExampleInterface"
, "doEnforceRangeNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31944 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31944( cx, "TestExampleInterface"
, "doEnforceRangeNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31945
31946 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31947 if (!args.requireAtLeast(cx, "TestExampleInterface.doEnforceRangeNullable", 1)) {
31948 return false;
31949 }
31950 Nullable<int8_t> arg0;
31951 if (args[0].isNullOrUndefined()) {
31952 arg0.SetNull();
31953 } else if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, args[0], "Argument 1", &arg0.SetValue())) {
31954 return false;
31955 }
31956 // NOTE: This assert does NOT call the function.
31957 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DoEnforceRangeNullable(Constify(arg0)))>, "Should be returning void here");
31958 MOZ_KnownLive(self)(self)->DoEnforceRangeNullable(Constify(arg0));
31959 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31959); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31959; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31960 args.rval().setUndefined();
31961 return true;
31962}
31963
31964static const JSJitInfo doEnforceRangeNullable_methodinfo = {
31965 { (JSJitGetterOp)doEnforceRangeNullable },
31966 { prototypes::id::TestExampleInterface },
31967 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
31968 JSJitInfo::Method,
31969 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31970 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31971 false, /* isInfallible. False in setters. */
31972 false, /* isMovable. Not relevant for setters. */
31973 false, /* isEliminatable. Not relevant for setters. */
31974 false, /* isAlwaysInSlot. Only relevant for getters. */
31975 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31976 false, /* isTypedMethod. Only relevant for methods. */
31977 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31978};
31979
31980MOZ_CAN_RUN_SCRIPT static bool
31981doClamp(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31982{
31983 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31986( cx, "TestExampleInterface"
, "doClamp", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
31984 "TestExampleInterface", "doClamp", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31986( cx, "TestExampleInterface"
, "doClamp", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
31985 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31986( cx, "TestExampleInterface"
, "doClamp", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
31986 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31986( cx, "TestExampleInterface"
, "doClamp", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
31987
31988 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
31989 if (!args.requireAtLeast(cx, "TestExampleInterface.doClamp", 1)) {
31990 return false;
31991 }
31992 int8_t arg0;
31993 if (!ValueToPrimitive<int8_t, eClamp>(cx, args[0], "Argument 1", &arg0)) {
31994 return false;
31995 }
31996 // NOTE: This assert does NOT call the function.
31997 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DoClamp(arg0))>, "Should be returning void here");
31998 MOZ_KnownLive(self)(self)->DoClamp(arg0);
31999 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 31999); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31999; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32000 args.rval().setUndefined();
32001 return true;
32002}
32003
32004static const JSJitInfo doClamp_methodinfo = {
32005 { (JSJitGetterOp)doClamp },
32006 { prototypes::id::TestExampleInterface },
32007 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32008 JSJitInfo::Method,
32009 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32010 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32011 false, /* isInfallible. False in setters. */
32012 false, /* isMovable. Not relevant for setters. */
32013 false, /* isEliminatable. Not relevant for setters. */
32014 false, /* isAlwaysInSlot. Only relevant for getters. */
32015 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32016 false, /* isTypedMethod. Only relevant for methods. */
32017 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32018};
32019
32020MOZ_CAN_RUN_SCRIPT static bool
32021doClampNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32022{
32023 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32026( cx, "TestExampleInterface"
, "doClampNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32024 "TestExampleInterface", "doClampNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32026( cx, "TestExampleInterface"
, "doClampNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32025 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32026( cx, "TestExampleInterface"
, "doClampNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32026 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32026( cx, "TestExampleInterface"
, "doClampNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32027
32028 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32029 if (!args.requireAtLeast(cx, "TestExampleInterface.doClampNullable", 1)) {
32030 return false;
32031 }
32032 Nullable<int8_t> arg0;
32033 if (args[0].isNullOrUndefined()) {
32034 arg0.SetNull();
32035 } else if (!ValueToPrimitive<int8_t, eClamp>(cx, args[0], "Argument 1", &arg0.SetValue())) {
32036 return false;
32037 }
32038 // NOTE: This assert does NOT call the function.
32039 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DoClampNullable(Constify(arg0)))>, "Should be returning void here");
32040 MOZ_KnownLive(self)(self)->DoClampNullable(Constify(arg0));
32041 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32041); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32041; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32042 args.rval().setUndefined();
32043 return true;
32044}
32045
32046static const JSJitInfo doClampNullable_methodinfo = {
32047 { (JSJitGetterOp)doClampNullable },
32048 { prototypes::id::TestExampleInterface },
32049 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32050 JSJitInfo::Method,
32051 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32052 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32053 false, /* isInfallible. False in setters. */
32054 false, /* isMovable. Not relevant for setters. */
32055 false, /* isEliminatable. Not relevant for setters. */
32056 false, /* isAlwaysInSlot. Only relevant for getters. */
32057 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32058 false, /* isTypedMethod. Only relevant for methods. */
32059 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32060};
32061
32062MOZ_CAN_RUN_SCRIPT static bool
32063get_enforcedByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
32064{
32065 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32068( cx, "TestExampleInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32066 "TestExampleInterface", "enforcedByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32068( cx, "TestExampleInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32067 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32068( cx, "TestExampleInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32068 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32068( cx, "TestExampleInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32069
32070 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32071 int8_t result(MOZ_KnownLive(self)(self)->EnforcedByte());
32072 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32072); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32072; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32073 args.rval().setInt32(int32_t(result));
32074 return true;
32075}
32076
32077MOZ_CAN_RUN_SCRIPT static bool
32078set_enforcedByte(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
32079{
32080 BindingCallContext cx(cx_, "TestExampleInterface.enforcedByte setter");
32081 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32084( cx, "TestExampleInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32082 "TestExampleInterface", "enforcedByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32084( cx, "TestExampleInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32083 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32084( cx, "TestExampleInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32084 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32084( cx, "TestExampleInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32085
32086 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32087 int8_t arg0;
32088 if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, args[0], "Value being assigned", &arg0)) {
32089 return false;
32090 }
32091 // NOTE: This assert does NOT call the function.
32092 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetEnforcedByte(arg0))>, "Should be returning void here");
32093 MOZ_KnownLive(self)(self)->SetEnforcedByte(arg0);
32094 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32094); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32094; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32095
32096 return true;
32097}
32098
32099static const JSJitInfo enforcedByte_getterinfo = {
32100 { get_enforcedByte },
32101 { prototypes::id::TestExampleInterface },
32102 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32103 JSJitInfo::Getter,
32104 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32105 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
32106 true, /* isInfallible. False in setters. */
32107 false, /* isMovable. Not relevant for setters. */
32108 false, /* isEliminatable. Not relevant for setters. */
32109 false, /* isAlwaysInSlot. Only relevant for getters. */
32110 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32111 false, /* isTypedMethod. Only relevant for methods. */
32112 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32113};
32114static const JSJitInfo enforcedByte_setterinfo = {
32115 { (JSJitGetterOp)set_enforcedByte },
32116 { prototypes::id::TestExampleInterface },
32117 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32118 JSJitInfo::Setter,
32119 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32120 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32121 false, /* isInfallible. False in setters. */
32122 false, /* isMovable. Not relevant for setters. */
32123 false, /* isEliminatable. Not relevant for setters. */
32124 false, /* isAlwaysInSlot. Only relevant for getters. */
32125 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32126 false, /* isTypedMethod. Only relevant for methods. */
32127 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32128};
32129
32130MOZ_CAN_RUN_SCRIPT static bool
32131get_enforcedByteNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
32132{
32133 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32136( cx, "TestExampleInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32134 "TestExampleInterface", "enforcedByteNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32136( cx, "TestExampleInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32135 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32136( cx, "TestExampleInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32136 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32136( cx, "TestExampleInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32137
32138 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32139 Nullable<int8_t> result(MOZ_KnownLive(self)(self)->GetEnforcedByteNullable());
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)"
, "../TestExampleGenBinding.cpp", 32140); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32140; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32141 if (result.IsNull()) {
32142 args.rval().setNull();
32143 return true;
32144 }
32145 args.rval().setInt32(int32_t(result.Value()));
32146 return true;
32147}
32148
32149MOZ_CAN_RUN_SCRIPT static bool
32150set_enforcedByteNullable(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
32151{
32152 BindingCallContext cx(cx_, "TestExampleInterface.enforcedByteNullable setter");
32153 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32156( cx, "TestExampleInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32154 "TestExampleInterface", "enforcedByteNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32156( cx, "TestExampleInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32155 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32156( cx, "TestExampleInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32156 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32156( cx, "TestExampleInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32157
32158 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32159 Nullable<int8_t> arg0;
32160 if (args[0].isNullOrUndefined()) {
32161 arg0.SetNull();
32162 } else if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
32163 return false;
32164 }
32165 // NOTE: This assert does NOT call the function.
32166 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetEnforcedByteNullable(Constify(arg0)))>, "Should be returning void here");
32167 MOZ_KnownLive(self)(self)->SetEnforcedByteNullable(Constify(arg0));
32168 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32168); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32168; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32169
32170 return true;
32171}
32172
32173static const JSJitInfo enforcedByteNullable_getterinfo = {
32174 { get_enforcedByteNullable },
32175 { prototypes::id::TestExampleInterface },
32176 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32177 JSJitInfo::Getter,
32178 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32179 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
32180 true, /* isInfallible. False in setters. */
32181 false, /* isMovable. Not relevant for setters. */
32182 false, /* isEliminatable. Not relevant for setters. */
32183 false, /* isAlwaysInSlot. Only relevant for getters. */
32184 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32185 false, /* isTypedMethod. Only relevant for methods. */
32186 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32187};
32188static const JSJitInfo enforcedByteNullable_setterinfo = {
32189 { (JSJitGetterOp)set_enforcedByteNullable },
32190 { prototypes::id::TestExampleInterface },
32191 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32192 JSJitInfo::Setter,
32193 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32194 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32195 false, /* isInfallible. False in setters. */
32196 false, /* isMovable. Not relevant for setters. */
32197 false, /* isEliminatable. Not relevant for setters. */
32198 false, /* isAlwaysInSlot. Only relevant for getters. */
32199 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32200 false, /* isTypedMethod. Only relevant for methods. */
32201 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32202};
32203
32204MOZ_CAN_RUN_SCRIPT static bool
32205get_clampedByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
32206{
32207 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32210( cx, "TestExampleInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32208 "TestExampleInterface", "clampedByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32210( cx, "TestExampleInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32209 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32210( cx, "TestExampleInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32210 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32210( cx, "TestExampleInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32211
32212 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32213 int8_t result(MOZ_KnownLive(self)(self)->ClampedByte());
32214 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32214); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32214; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32215 args.rval().setInt32(int32_t(result));
32216 return true;
32217}
32218
32219MOZ_CAN_RUN_SCRIPT static bool
32220set_clampedByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
32221{
32222 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32225( cx, "TestExampleInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32223 "TestExampleInterface", "clampedByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32225( cx, "TestExampleInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32224 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32225( cx, "TestExampleInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32225 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32225( cx, "TestExampleInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32226
32227 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32228 int8_t arg0;
32229 if (!ValueToPrimitive<int8_t, eClamp>(cx, args[0], "Value being assigned", &arg0)) {
32230 return false;
32231 }
32232 // NOTE: This assert does NOT call the function.
32233 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetClampedByte(arg0))>, "Should be returning void here");
32234 MOZ_KnownLive(self)(self)->SetClampedByte(arg0);
32235 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32235); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32235; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32236
32237 return true;
32238}
32239
32240static const JSJitInfo clampedByte_getterinfo = {
32241 { get_clampedByte },
32242 { prototypes::id::TestExampleInterface },
32243 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32244 JSJitInfo::Getter,
32245 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32246 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
32247 true, /* isInfallible. False in setters. */
32248 false, /* isMovable. Not relevant for setters. */
32249 false, /* isEliminatable. Not relevant for setters. */
32250 false, /* isAlwaysInSlot. Only relevant for getters. */
32251 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32252 false, /* isTypedMethod. Only relevant for methods. */
32253 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32254};
32255static const JSJitInfo clampedByte_setterinfo = {
32256 { (JSJitGetterOp)set_clampedByte },
32257 { prototypes::id::TestExampleInterface },
32258 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32259 JSJitInfo::Setter,
32260 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32261 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32262 false, /* isInfallible. False in setters. */
32263 false, /* isMovable. Not relevant for setters. */
32264 false, /* isEliminatable. Not relevant for setters. */
32265 false, /* isAlwaysInSlot. Only relevant for getters. */
32266 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32267 false, /* isTypedMethod. Only relevant for methods. */
32268 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32269};
32270
32271MOZ_CAN_RUN_SCRIPT static bool
32272get_clampedByteNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
32273{
32274 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32277( cx, "TestExampleInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32275 "TestExampleInterface", "clampedByteNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32277( cx, "TestExampleInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32276 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32277( cx, "TestExampleInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32277 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32277( cx, "TestExampleInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32278
32279 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32280 Nullable<int8_t> result(MOZ_KnownLive(self)(self)->GetClampedByteNullable());
32281 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32281); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32281; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32282 if (result.IsNull()) {
32283 args.rval().setNull();
32284 return true;
32285 }
32286 args.rval().setInt32(int32_t(result.Value()));
32287 return true;
32288}
32289
32290MOZ_CAN_RUN_SCRIPT static bool
32291set_clampedByteNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
32292{
32293 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32296( cx, "TestExampleInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32294 "TestExampleInterface", "clampedByteNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32296( cx, "TestExampleInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32295 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32296( cx, "TestExampleInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32296 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32296( cx, "TestExampleInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32297
32298 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32299 Nullable<int8_t> arg0;
32300 if (args[0].isNullOrUndefined()) {
32301 arg0.SetNull();
32302 } else if (!ValueToPrimitive<int8_t, eClamp>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
32303 return false;
32304 }
32305 // NOTE: This assert does NOT call the function.
32306 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetClampedByteNullable(Constify(arg0)))>, "Should be returning void here");
32307 MOZ_KnownLive(self)(self)->SetClampedByteNullable(Constify(arg0));
32308 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32308); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32308; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32309
32310 return true;
32311}
32312
32313static const JSJitInfo clampedByteNullable_getterinfo = {
32314 { get_clampedByteNullable },
32315 { prototypes::id::TestExampleInterface },
32316 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32317 JSJitInfo::Getter,
32318 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32319 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
32320 true, /* isInfallible. False in setters. */
32321 false, /* isMovable. Not relevant for setters. */
32322 false, /* isEliminatable. Not relevant for setters. */
32323 false, /* isAlwaysInSlot. Only relevant for getters. */
32324 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32325 false, /* isTypedMethod. Only relevant for methods. */
32326 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32327};
32328static const JSJitInfo clampedByteNullable_setterinfo = {
32329 { (JSJitGetterOp)set_clampedByteNullable },
32330 { prototypes::id::TestExampleInterface },
32331 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32332 JSJitInfo::Setter,
32333 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32334 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32335 false, /* isInfallible. False in setters. */
32336 false, /* isMovable. Not relevant for setters. */
32337 false, /* isEliminatable. Not relevant for setters. */
32338 false, /* isAlwaysInSlot. Only relevant for getters. */
32339 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32340 false, /* isTypedMethod. Only relevant for methods. */
32341 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32342};
32343
32344MOZ_CAN_RUN_SCRIPT static bool
32345exerciseTypedefInterfaces1(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32346{
32347 BindingCallContext cx(cx_, "TestExampleInterface.exerciseTypedefInterfaces1");
32348 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32351( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32349 "TestExampleInterface", "exerciseTypedefInterfaces1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32351( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32350 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32351( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32351 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32351( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32352
32353 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32354 if (!args.requireAtLeast(cx, "TestExampleInterface.exerciseTypedefInterfaces1", 1)) {
32355 return false;
32356 }
32357 NonNull<mozilla::dom::TestInterface> arg0;
32358 if (args[0].isObject()) {
32359 {
32360 // Our JSContext should be in the right global to do unwrapping in.
32361 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
32362 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
32363 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
32364 return false;
32365 }
32366 }
32367 } else {
32368 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
32369 return false;
32370 }
32371 // NOTE: This assert does NOT call the function.
32372 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces1(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
32373 MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces1(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
32374 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32374); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32374; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32375 args.rval().setUndefined();
32376 return true;
32377}
32378
32379static const JSJitInfo exerciseTypedefInterfaces1_methodinfo = {
32380 { (JSJitGetterOp)exerciseTypedefInterfaces1 },
32381 { prototypes::id::TestExampleInterface },
32382 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32383 JSJitInfo::Method,
32384 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32385 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32386 false, /* isInfallible. False in setters. */
32387 false, /* isMovable. Not relevant for setters. */
32388 false, /* isEliminatable. Not relevant for setters. */
32389 false, /* isAlwaysInSlot. Only relevant for getters. */
32390 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32391 false, /* isTypedMethod. Only relevant for methods. */
32392 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32393};
32394
32395MOZ_CAN_RUN_SCRIPT static bool
32396exerciseTypedefInterfaces2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32397{
32398 BindingCallContext cx(cx_, "TestExampleInterface.exerciseTypedefInterfaces2");
32399 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32402( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32400 "TestExampleInterface", "exerciseTypedefInterfaces2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32402( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32401 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32402( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32402 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32402( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32403
32404 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32405 if (!args.requireAtLeast(cx, "TestExampleInterface.exerciseTypedefInterfaces2", 1)) {
32406 return false;
32407 }
32408 mozilla::dom::TestInterface* arg0;
32409 if (args[0].isObject()) {
32410 {
32411 // Our JSContext should be in the right global to do unwrapping in.
32412 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
32413 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
32414 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
32415 return false;
32416 }
32417 }
32418 } else if (args[0].isNullOrUndefined()) {
32419 arg0 = nullptr;
32420 } else {
32421 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
32422 return false;
32423 }
32424 auto result(StrongOrRawPtr<mozilla::dom::TestInterface>(MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces2(MOZ_KnownLive(Constify(arg0))(Constify(arg0)))));
32425 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32425); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32425; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32426 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
32427 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32427); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 32427; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
32428 return false;
32429 }
32430 return true;
32431}
32432
32433static const JSJitInfo exerciseTypedefInterfaces2_methodinfo = {
32434 { (JSJitGetterOp)exerciseTypedefInterfaces2 },
32435 { prototypes::id::TestExampleInterface },
32436 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32437 JSJitInfo::Method,
32438 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32439 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
32440 false, /* isInfallible. False in setters. */
32441 false, /* isMovable. Not relevant for setters. */
32442 false, /* isEliminatable. Not relevant for setters. */
32443 false, /* isAlwaysInSlot. Only relevant for getters. */
32444 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32445 false, /* isTypedMethod. Only relevant for methods. */
32446 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32447};
32448
32449MOZ_CAN_RUN_SCRIPT static bool
32450exerciseTypedefInterfaces3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32451{
32452 BindingCallContext cx(cx_, "TestExampleInterface.exerciseTypedefInterfaces3");
32453 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32456( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32454 "TestExampleInterface", "exerciseTypedefInterfaces3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32456( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32455 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32456( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32456 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32456( cx, "TestExampleInterface"
, "exerciseTypedefInterfaces3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32457
32458 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32459 if (!args.requireAtLeast(cx, "TestExampleInterface.exerciseTypedefInterfaces3", 1)) {
32460 return false;
32461 }
32462 NonNull<mozilla::dom::TestInterface> arg0;
32463 if (args[0].isObject()) {
32464 {
32465 // Our JSContext should be in the right global to do unwrapping in.
32466 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
32467 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
32468 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
32469 return false;
32470 }
32471 }
32472 } else {
32473 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
32474 return false;
32475 }
32476 // NOTE: This assert does NOT call the function.
32477 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
32478 MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
32479 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32479); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32479; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32480 args.rval().setUndefined();
32481 return true;
32482}
32483
32484static const JSJitInfo exerciseTypedefInterfaces3_methodinfo = {
32485 { (JSJitGetterOp)exerciseTypedefInterfaces3 },
32486 { prototypes::id::TestExampleInterface },
32487 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32488 JSJitInfo::Method,
32489 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32490 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32491 false, /* isInfallible. False in setters. */
32492 false, /* isMovable. Not relevant for setters. */
32493 false, /* isEliminatable. Not relevant for setters. */
32494 false, /* isAlwaysInSlot. Only relevant for getters. */
32495 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32496 false, /* isTypedMethod. Only relevant for methods. */
32497 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32498};
32499
32500MOZ_CAN_RUN_SCRIPT static bool
32501get_deprecatedAttribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
32502{
32503 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32506( cx, "TestExampleInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32504 "TestExampleInterface", "deprecatedAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32506( cx, "TestExampleInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32505 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32506( cx, "TestExampleInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32506 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32506( cx, "TestExampleInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32507
32508 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32509 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
32510 bool result(MOZ_KnownLive(self)(self)->DeprecatedAttribute());
32511 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32511); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32511; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32512 args.rval().setBoolean(result);
32513 return true;
32514}
32515
32516MOZ_CAN_RUN_SCRIPT static bool
32517set_deprecatedAttribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
32518{
32519 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32522( cx, "TestExampleInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32520 "TestExampleInterface", "deprecatedAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32522( cx, "TestExampleInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32521 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32522( cx, "TestExampleInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32522 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32522( cx, "TestExampleInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32523
32524 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32525 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
32526 bool arg0;
32527 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
32528 return false;
32529 }
32530 // NOTE: This assert does NOT call the function.
32531 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetDeprecatedAttribute(arg0))>, "Should be returning void here");
32532 MOZ_KnownLive(self)(self)->SetDeprecatedAttribute(arg0);
32533 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32533); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32533; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32534
32535 return true;
32536}
32537
32538static const JSJitInfo deprecatedAttribute_getterinfo = {
32539 { get_deprecatedAttribute },
32540 { prototypes::id::TestExampleInterface },
32541 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32542 JSJitInfo::Getter,
32543 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32544 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
32545 true, /* isInfallible. False in setters. */
32546 false, /* isMovable. Not relevant for setters. */
32547 false, /* isEliminatable. Not relevant for setters. */
32548 false, /* isAlwaysInSlot. Only relevant for getters. */
32549 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32550 false, /* isTypedMethod. Only relevant for methods. */
32551 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32552};
32553static const JSJitInfo deprecatedAttribute_setterinfo = {
32554 { (JSJitGetterOp)set_deprecatedAttribute },
32555 { prototypes::id::TestExampleInterface },
32556 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32557 JSJitInfo::Setter,
32558 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32559 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32560 false, /* isInfallible. False in setters. */
32561 false, /* isMovable. Not relevant for setters. */
32562 false, /* isEliminatable. Not relevant for setters. */
32563 false, /* isAlwaysInSlot. Only relevant for getters. */
32564 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32565 false, /* isTypedMethod. Only relevant for methods. */
32566 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32567};
32568
32569MOZ_CAN_RUN_SCRIPT static bool
32570deprecatedMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32571{
32572 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32575( cx, "TestExampleInterface"
, "deprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32573 "TestExampleInterface", "deprecatedMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32575( cx, "TestExampleInterface"
, "deprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32574 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32575( cx, "TestExampleInterface"
, "deprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32575 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32575( cx, "TestExampleInterface"
, "deprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32576
32577 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32578 if (!args.requireAtLeast(cx, "TestExampleInterface.deprecatedMethod", 1)) {
32579 return false;
32580 }
32581 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
32582 bool arg0;
32583 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
32584 return false;
32585 }
32586 // NOTE: This assert does NOT call the function.
32587 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DeprecatedMethod(arg0))>, "Should be returning void here");
32588 MOZ_KnownLive(self)(self)->DeprecatedMethod(arg0);
32589 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32589); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32589; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32590 args.rval().setUndefined();
32591 return true;
32592}
32593
32594static const JSJitInfo deprecatedMethod_methodinfo = {
32595 { (JSJitGetterOp)deprecatedMethod },
32596 { prototypes::id::TestExampleInterface },
32597 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32598 JSJitInfo::Method,
32599 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32600 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32601 false, /* isInfallible. False in setters. */
32602 false, /* isMovable. Not relevant for setters. */
32603 false, /* isEliminatable. Not relevant for setters. */
32604 false, /* isAlwaysInSlot. Only relevant for getters. */
32605 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32606 false, /* isTypedMethod. Only relevant for methods. */
32607 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32608};
32609
32610MOZ_CAN_RUN_SCRIPT static bool
32611deprecatedMethodWithContext(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32612{
32613 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32616( cx, "TestExampleInterface"
, "deprecatedMethodWithContext", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32614 "TestExampleInterface", "deprecatedMethodWithContext", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32616( cx, "TestExampleInterface"
, "deprecatedMethodWithContext", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32615 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32616( cx, "TestExampleInterface"
, "deprecatedMethodWithContext", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32616 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32616( cx, "TestExampleInterface"
, "deprecatedMethodWithContext", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32617
32618 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32619 if (!args.requireAtLeast(cx, "TestExampleInterface.deprecatedMethodWithContext", 1)) {
32620 return false;
32621 }
32622 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
32623 JS::Rooted<JS::Value> arg0(cx);
32624 arg0 = args[0];
32625 // NOTE: This assert does NOT call the function.
32626 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DeprecatedMethodWithContext(cx, arg0))>, "Should be returning void here");
32627 MOZ_KnownLive(self)(self)->DeprecatedMethodWithContext(cx, arg0);
32628 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32628); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32628; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32629 args.rval().setUndefined();
32630 return true;
32631}
32632
32633static const JSJitInfo deprecatedMethodWithContext_methodinfo = {
32634 { (JSJitGetterOp)deprecatedMethodWithContext },
32635 { prototypes::id::TestExampleInterface },
32636 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32637 JSJitInfo::Method,
32638 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32639 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32640 false, /* isInfallible. False in setters. */
32641 false, /* isMovable. Not relevant for setters. */
32642 false, /* isEliminatable. Not relevant for setters. */
32643 false, /* isAlwaysInSlot. Only relevant for getters. */
32644 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32645 false, /* isTypedMethod. Only relevant for methods. */
32646 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32647};
32648
32649MOZ_CAN_RUN_SCRIPT static bool
32650get_staticAttribute(JSContext* cx, unsigned argc, JS::Value* vp)
32651{
32652 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32655( cx, "TestExampleInterface"
, "staticAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32653 "TestExampleInterface", "staticAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32655( cx, "TestExampleInterface"
, "staticAttribute", 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::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32655( cx, "TestExampleInterface"
, "staticAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32655 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32655( cx, "TestExampleInterface"
, "staticAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32656
32657 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
32658 JS::Rooted<JSObject*> obj(cx, &args.callee());
32659
32660 GlobalObject global(cx, xpc::XrayAwareCalleeGlobal(obj));
32661 if (global.Failed()) {
32662 return false;
32663 }
32664
32665 bool result(mozilla::dom::TestExampleInterface::StaticAttribute(global));
32666 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32666); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32666; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32667 args.rval().setBoolean(result);
32668 return true;
32669}
32670
32671MOZ_CAN_RUN_SCRIPT static bool
32672set_staticAttribute(JSContext* cx, unsigned argc, JS::Value* vp)
32673{
32674 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32677( cx, "TestExampleInterface"
, "staticAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32675 "TestExampleInterface", "staticAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32677( cx, "TestExampleInterface"
, "staticAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32676 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32677( cx, "TestExampleInterface"
, "staticAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32677 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32677( cx, "TestExampleInterface"
, "staticAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32678
32679 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
32680 JS::Rooted<JSObject*> obj(cx, &args.callee());
32681
32682 if (!args.requireAtLeast(cx, "staticAttribute setter", 1)) {
32683 return false;
32684 }
32685 GlobalObject global(cx, xpc::XrayAwareCalleeGlobal(obj));
32686 if (global.Failed()) {
32687 return false;
32688 }
32689
32690 bool arg0;
32691 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
32692 return false;
32693 }
32694 // NOTE: This assert does NOT call the function.
32695 static_assert(std::is_void_v<decltype(mozilla::dom::TestExampleInterface::SetStaticAttribute(global, arg0))>, "Should be returning void here");
32696 mozilla::dom::TestExampleInterface::SetStaticAttribute(global, arg0);
32697 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32697); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32697; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32698
32699 return true;
32700}
32701
32702MOZ_CAN_RUN_SCRIPT static bool
32703staticMethod(JSContext* cx, unsigned argc, JS::Value* vp)
32704{
32705 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32708( cx, "TestExampleInterface"
, "staticMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32706 "TestExampleInterface", "staticMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32708( cx, "TestExampleInterface"
, "staticMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32707 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32708( cx, "TestExampleInterface"
, "staticMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32708 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32708( cx, "TestExampleInterface"
, "staticMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32709
32710 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
32711 JS::Rooted<JSObject*> obj(cx, &args.callee());
32712
32713 if (!args.requireAtLeast(cx, "TestExampleInterface.staticMethod", 1)) {
32714 return false;
32715 }
32716 GlobalObject global(cx, xpc::XrayAwareCalleeGlobal(obj));
32717 if (global.Failed()) {
32718 return false;
32719 }
32720
32721 bool arg0;
32722 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
32723 return false;
32724 }
32725 // NOTE: This assert does NOT call the function.
32726 static_assert(std::is_void_v<decltype(mozilla::dom::TestExampleInterface::StaticMethod(global, arg0))>, "Should be returning void here");
32727 mozilla::dom::TestExampleInterface::StaticMethod(global, arg0);
32728 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32728); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32728; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32729 args.rval().setUndefined();
32730 return true;
32731}
32732
32733MOZ_CAN_RUN_SCRIPT static bool
32734staticMethodWithContext(JSContext* cx, unsigned argc, JS::Value* vp)
32735{
32736 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32739( cx, "TestExampleInterface"
, "staticMethodWithContext", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32737 "TestExampleInterface", "staticMethodWithContext", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32739( cx, "TestExampleInterface"
, "staticMethodWithContext", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32738 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32739( cx, "TestExampleInterface"
, "staticMethodWithContext", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32739 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32739( cx, "TestExampleInterface"
, "staticMethodWithContext", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32740
32741 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
32742 JS::Rooted<JSObject*> obj(cx, &args.callee());
32743
32744 if (!args.requireAtLeast(cx, "TestExampleInterface.staticMethodWithContext", 1)) {
32745 return false;
32746 }
32747 GlobalObject global(cx, xpc::XrayAwareCalleeGlobal(obj));
32748 if (global.Failed()) {
32749 return false;
32750 }
32751
32752 JS::Rooted<JS::Value> arg0(cx);
32753 arg0 = args[0];
32754 // NOTE: This assert does NOT call the function.
32755 static_assert(std::is_void_v<decltype(mozilla::dom::TestExampleInterface::StaticMethodWithContext(global, arg0))>, "Should be returning void here");
32756 mozilla::dom::TestExampleInterface::StaticMethodWithContext(global, arg0);
32757 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32757); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32757; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32758 args.rval().setUndefined();
32759 return true;
32760}
32761
32762MOZ_CAN_RUN_SCRIPT static bool
32763get_staticDeprecatedAttribute(JSContext* cx, unsigned argc, JS::Value* vp)
32764{
32765 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32768( cx, "TestExampleInterface"
, "staticDeprecatedAttribute", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32766 "TestExampleInterface", "staticDeprecatedAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32768( cx, "TestExampleInterface"
, "staticDeprecatedAttribute", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32767 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32768( cx, "TestExampleInterface"
, "staticDeprecatedAttribute", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32768 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32768( cx, "TestExampleInterface"
, "staticDeprecatedAttribute", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32769
32770 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
32771 JS::Rooted<JSObject*> obj(cx, &args.callee());
32772
32773 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
32774 GlobalObject global(cx, xpc::XrayAwareCalleeGlobal(obj));
32775 if (global.Failed()) {
32776 return false;
32777 }
32778
32779 bool result(mozilla::dom::TestExampleInterface::StaticDeprecatedAttribute(global));
32780 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32780); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32780; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32781 args.rval().setBoolean(result);
32782 return true;
32783}
32784
32785MOZ_CAN_RUN_SCRIPT static bool
32786set_staticDeprecatedAttribute(JSContext* cx, unsigned argc, JS::Value* vp)
32787{
32788 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32791( cx, "TestExampleInterface"
, "staticDeprecatedAttribute", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32789 "TestExampleInterface", "staticDeprecatedAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32791( cx, "TestExampleInterface"
, "staticDeprecatedAttribute", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32790 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32791( cx, "TestExampleInterface"
, "staticDeprecatedAttribute", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32791 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32791( cx, "TestExampleInterface"
, "staticDeprecatedAttribute", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32792
32793 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
32794 JS::Rooted<JSObject*> obj(cx, &args.callee());
32795
32796 if (!args.requireAtLeast(cx, "staticDeprecatedAttribute setter", 1)) {
32797 return false;
32798 }
32799 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
32800 GlobalObject global(cx, xpc::XrayAwareCalleeGlobal(obj));
32801 if (global.Failed()) {
32802 return false;
32803 }
32804
32805 bool arg0;
32806 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
32807 return false;
32808 }
32809 // NOTE: This assert does NOT call the function.
32810 static_assert(std::is_void_v<decltype(mozilla::dom::TestExampleInterface::SetStaticDeprecatedAttribute(global, arg0))>, "Should be returning void here");
32811 mozilla::dom::TestExampleInterface::SetStaticDeprecatedAttribute(global, arg0);
32812 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32812); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32812; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32813
32814 return true;
32815}
32816
32817MOZ_CAN_RUN_SCRIPT static bool
32818staticDeprecatedMethod(JSContext* cx, unsigned argc, JS::Value* vp)
32819{
32820 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32823( cx, "TestExampleInterface"
, "staticDeprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32821 "TestExampleInterface", "staticDeprecatedMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32823( cx, "TestExampleInterface"
, "staticDeprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32822 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32823( cx, "TestExampleInterface"
, "staticDeprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32823 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32823( cx, "TestExampleInterface"
, "staticDeprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32824
32825 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
32826 JS::Rooted<JSObject*> obj(cx, &args.callee());
32827
32828 if (!args.requireAtLeast(cx, "TestExampleInterface.staticDeprecatedMethod", 1)) {
32829 return false;
32830 }
32831 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
32832 GlobalObject global(cx, xpc::XrayAwareCalleeGlobal(obj));
32833 if (global.Failed()) {
32834 return false;
32835 }
32836
32837 bool arg0;
32838 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
32839 return false;
32840 }
32841 // NOTE: This assert does NOT call the function.
32842 static_assert(std::is_void_v<decltype(mozilla::dom::TestExampleInterface::StaticDeprecatedMethod(global, arg0))>, "Should be returning void here");
32843 mozilla::dom::TestExampleInterface::StaticDeprecatedMethod(global, arg0);
32844 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32844); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32844; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32845 args.rval().setUndefined();
32846 return true;
32847}
32848
32849MOZ_CAN_RUN_SCRIPT static bool
32850staticDeprecatedMethodWithContext(JSContext* cx, unsigned argc, JS::Value* vp)
32851{
32852 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32855( cx, "TestExampleInterface"
, "staticDeprecatedMethodWithContext", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32853 "TestExampleInterface", "staticDeprecatedMethodWithContext", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32855( cx, "TestExampleInterface"
, "staticDeprecatedMethodWithContext", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32854 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32855( cx, "TestExampleInterface"
, "staticDeprecatedMethodWithContext", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32855 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32855( cx, "TestExampleInterface"
, "staticDeprecatedMethodWithContext", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32856
32857 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
32858 JS::Rooted<JSObject*> obj(cx, &args.callee());
32859
32860 if (!args.requireAtLeast(cx, "TestExampleInterface.staticDeprecatedMethodWithContext", 1)) {
32861 return false;
32862 }
32863 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
32864 GlobalObject global(cx, xpc::XrayAwareCalleeGlobal(obj));
32865 if (global.Failed()) {
32866 return false;
32867 }
32868
32869 JS::Rooted<JS::Value> arg0(cx);
32870 arg0 = args[0];
32871 // NOTE: This assert does NOT call the function.
32872 static_assert(std::is_void_v<decltype(mozilla::dom::TestExampleInterface::StaticDeprecatedMethodWithContext(global, arg0))>, "Should be returning void here");
32873 mozilla::dom::TestExampleInterface::StaticDeprecatedMethodWithContext(global, arg0);
32874 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32874); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32874; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32875 args.rval().setUndefined();
32876 return true;
32877}
32878
32879MOZ_CAN_RUN_SCRIPT static bool
32880overload1(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32881{
32882 BindingCallContext cx(cx_, "TestExampleInterface.overload1");
32883 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32886( cx, "TestExampleInterface"
, "overload1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
32884 "TestExampleInterface", "overload1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32886( cx, "TestExampleInterface"
, "overload1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
32885 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32886( cx, "TestExampleInterface"
, "overload1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
32886 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32886( cx, "TestExampleInterface"
, "overload1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
32887
32888 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32889 unsigned argcount = std::min(args.length(), 2u);
32890 switch (argcount) {
32891 case 1: {
32892 NonNull<mozilla::dom::TestInterface> arg0;
32893 if (args[0].isObject()) {
32894 {
32895 // Our JSContext should be in the right global to do unwrapping in.
32896 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
32897 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
32898 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
32899 return false;
32900 }
32901 }
32902 } else {
32903 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
32904 return false;
32905 }
32906 bool result(MOZ_KnownLive(self)(self)->Overload1(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))));
32907 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32907); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32907; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32908 args.rval().setBoolean(result);
32909 return true;
32910 break;
32911 }
32912 case 2: {
32913 binding_detail::FakeString<char16_t> arg0;
32914 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
32915 return false;
32916 }
32917 NonNull<mozilla::dom::TestInterface> arg1;
32918 if (args[1].isObject()) {
32919 {
32920 // Our JSContext should be in the right global to do unwrapping in.
32921 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[1], arg1, cx);
32922 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
32923 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 2", "TestInterface");
32924 return false;
32925 }
32926 }
32927 } else {
32928 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 2");
32929 return false;
32930 }
32931 auto result(StrongOrRawPtr<mozilla::dom::TestInterface>(MOZ_KnownLive(self)(self)->Overload1(NonNullHelper(Constify(arg0)), MOZ_KnownLive(NonNullHelper(arg1))(NonNullHelper(arg1)))));
32932 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32932); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32932; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32933 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
32934 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32934); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 32934; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
32935 return false;
32936 }
32937 return true;
32938 break;
32939 }
32940 default: {
32941 // Using nsPrintfCString here would require including that
32942 // header. Let's not worry about it.
32943 nsAutoCString argCountStr;
32944 argCountStr.AppendPrintf("%u", args.length());
32945 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
32946 }
32947 }
32948 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 32948); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 32948; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
32949 return false;
32950}
32951
32952static const JSJitInfo overload1_methodinfo = {
32953 { (JSJitGetterOp)overload1 },
32954 { prototypes::id::TestExampleInterface },
32955 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
32956 JSJitInfo::Method,
32957 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32958 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
32959 false, /* isInfallible. False in setters. */
32960 false, /* isMovable. Not relevant for setters. */
32961 false, /* isEliminatable. Not relevant for setters. */
32962 false, /* isAlwaysInSlot. Only relevant for getters. */
32963 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32964 false, /* isTypedMethod. Only relevant for methods. */
32965 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32966};
32967
32968MOZ_CAN_RUN_SCRIPT static bool
32969overload2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32970{
32971 BindingCallContext cx(cx_, "TestExampleInterface.overload2");
32972 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32975( cx, "TestExampleInterface"
, "overload2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
32973 "TestExampleInterface", "overload2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32975( cx, "TestExampleInterface"
, "overload2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
32974 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32975( cx, "TestExampleInterface"
, "overload2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
32975 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32975( cx, "TestExampleInterface"
, "overload2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
32976
32977 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
32978 unsigned argcount = std::min(args.length(), 1u);
32979 switch (argcount) {
32980 case 0: {
32981 RootedDictionary<binding_detail::FastDict> arg0(cx);
32982 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", false)) {
32983 return false;
32984 }
32985 // NOTE: This assert does NOT call the function.
32986 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(cx, Constify(arg0)))>, "Should be returning void here");
32987 MOZ_KnownLive(self)(self)->Overload2(cx, Constify(arg0));
32988 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 32988); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32988; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32989 args.rval().setUndefined();
32990 return true;
32991 break;
32992 }
32993 case 1: {
32994 if (args[0].isNullOrUndefined()) {
32995 RootedDictionary<binding_detail::FastDict> arg0(cx);
32996 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
32997 return false;
32998 }
32999 // NOTE: This assert does NOT call the function.
33000 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(cx, Constify(arg0)))>, "Should be returning void here");
33001 MOZ_KnownLive(self)(self)->Overload2(cx, Constify(arg0));
33002 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33002); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33002; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33003 args.rval().setUndefined();
33004 return true;
33005 }
33006 if (args[0].isObject()) {
33007 do {
33008 NonNull<mozilla::dom::TestInterface> arg0;
33009 {
33010 // Our JSContext should be in the right global to do unwrapping in.
33011 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
33012 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
33013 break;
33014 }
33015 }
33016 // NOTE: This assert does NOT call the function.
33017 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
33018 MOZ_KnownLive(self)(self)->Overload2(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
33019 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33019); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33019; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33020 args.rval().setUndefined();
33021 return true;
33022 } while (false);
33023 do {
33024 RootedDictionary<binding_detail::FastDict> arg0(cx);
33025 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
33026 return false;
33027 }
33028 // NOTE: This assert does NOT call the function.
33029 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(cx, Constify(arg0)))>, "Should be returning void here");
33030 MOZ_KnownLive(self)(self)->Overload2(cx, Constify(arg0));
33031 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33031); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33031; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33032 args.rval().setUndefined();
33033 return true;
33034 } while (false);
33035 }
33036 if (args[0].isBoolean()) {
33037 bool arg0;
33038 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33039 return false;
33040 }
33041 // NOTE: This assert does NOT call the function.
33042 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(arg0))>, "Should be returning void here");
33043 MOZ_KnownLive(self)(self)->Overload2(arg0);
33044 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33044); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33044; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33045 args.rval().setUndefined();
33046 return true;
33047 }
33048 binding_detail::FakeString<char16_t> arg0;
33049 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
33050 return false;
33051 }
33052 // NOTE: This assert does NOT call the function.
33053 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
33054 MOZ_KnownLive(self)(self)->Overload2(NonNullHelper(Constify(arg0)));
33055 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33055); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33055; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33056 args.rval().setUndefined();
33057 return true;
33058 break;
33059 }
33060 default: {
33061 // Using nsPrintfCString here would require including that
33062 // header. Let's not worry about it.
33063 nsAutoCString argCountStr;
33064 argCountStr.AppendPrintf("%u", args.length());
33065 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33066 }
33067 }
33068 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33068); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33068; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33069 return false;
33070}
33071
33072static const JSJitInfo overload2_methodinfo = {
33073 { (JSJitGetterOp)overload2 },
33074 { prototypes::id::TestExampleInterface },
33075 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33076 JSJitInfo::Method,
33077 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33078 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33079 false, /* isInfallible. False in setters. */
33080 false, /* isMovable. Not relevant for setters. */
33081 false, /* isEliminatable. Not relevant for setters. */
33082 false, /* isAlwaysInSlot. Only relevant for getters. */
33083 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33084 false, /* isTypedMethod. Only relevant for methods. */
33085 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33086};
33087
33088MOZ_CAN_RUN_SCRIPT static bool
33089overload3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33090{
33091 BindingCallContext cx(cx_, "TestExampleInterface.overload3");
33092 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33095( cx, "TestExampleInterface"
, "overload3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33093 "TestExampleInterface", "overload3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33095( cx, "TestExampleInterface"
, "overload3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33094 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33095( cx, "TestExampleInterface"
, "overload3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33095 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33095( cx, "TestExampleInterface"
, "overload3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
33096
33097 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33098 unsigned argcount = std::min(args.length(), 1u);
33099 switch (argcount) {
33100 case 1: {
33101 if (args[0].isObject()) {
33102 do {
33103 NonNull<mozilla::dom::TestInterface> arg0;
33104 {
33105 // Our JSContext should be in the right global to do unwrapping in.
33106 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
33107 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
33108 break;
33109 }
33110 }
33111 // NOTE: This assert does NOT call the function.
33112 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
33113 MOZ_KnownLive(self)(self)->Overload3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
33114 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33114); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33114; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33115 args.rval().setUndefined();
33116 return true;
33117 } while (false);
33118 do {
33119 RootedCallback<OwningNonNull<binding_detail::FastTestCallback>> arg0(cx);
33120 if (JS::IsCallable(&args[0].toObject())) {
33121 { // scope for tempRoot and tempGlobalRoot if needed
33122 arg0 = new binding_detail::FastTestCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
33123 }
33124 } else {
33125 break;
33126 }
33127 // NOTE: This assert does NOT call the function.
33128 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
33129 MOZ_KnownLive(self)(self)->Overload3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
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)"
, "../TestExampleGenBinding.cpp", 33130); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33130; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33131 args.rval().setUndefined();
33132 return true;
33133 } while (false);
33134 }
33135 bool arg0;
33136 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33137 return false;
33138 }
33139 // NOTE: This assert does NOT call the function.
33140 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload3(arg0))>, "Should be returning void here");
33141 MOZ_KnownLive(self)(self)->Overload3(arg0);
33142 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33142); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33142; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33143 args.rval().setUndefined();
33144 return true;
33145 break;
33146 }
33147 default: {
33148 // Using nsPrintfCString here would require including that
33149 // header. Let's not worry about it.
33150 nsAutoCString argCountStr;
33151 argCountStr.AppendPrintf("%u", args.length());
33152 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33153 }
33154 }
33155 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33155); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33155; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33156 return false;
33157}
33158
33159static const JSJitInfo overload3_methodinfo = {
33160 { (JSJitGetterOp)overload3 },
33161 { prototypes::id::TestExampleInterface },
33162 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33163 JSJitInfo::Method,
33164 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33165 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33166 false, /* isInfallible. False in setters. */
33167 false, /* isMovable. Not relevant for setters. */
33168 false, /* isEliminatable. Not relevant for setters. */
33169 false, /* isAlwaysInSlot. Only relevant for getters. */
33170 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33171 false, /* isTypedMethod. Only relevant for methods. */
33172 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33173};
33174
33175MOZ_CAN_RUN_SCRIPT static bool
33176overload4(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33177{
33178 BindingCallContext cx(cx_, "TestExampleInterface.overload4");
33179 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33182( cx, "TestExampleInterface"
, "overload4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33180 "TestExampleInterface", "overload4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33182( cx, "TestExampleInterface"
, "overload4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33181 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33182( cx, "TestExampleInterface"
, "overload4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33182 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33182( cx, "TestExampleInterface"
, "overload4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
33183
33184 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33185 unsigned argcount = std::min(args.length(), 1u);
33186 switch (argcount) {
33187 case 1: {
33188 if (args[0].isObject()) {
33189 do {
33190 NonNull<mozilla::dom::TestInterface> arg0;
33191 {
33192 // Our JSContext should be in the right global to do unwrapping in.
33193 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
33194 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
33195 break;
33196 }
33197 }
33198 // NOTE: This assert does NOT call the function.
33199 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload4(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
33200 MOZ_KnownLive(self)(self)->Overload4(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
33201 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33201); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33201; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33202 args.rval().setUndefined();
33203 return true;
33204 } while (false);
33205 do {
33206 RootedCallback<OwningNonNull<binding_detail::FastTestCallbackInterface>> arg0(cx);
33207 { // scope for tempRoot and tempGlobalRoot if needed
33208 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
33209 }
33210 // NOTE: This assert does NOT call the function.
33211 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload4(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
33212 MOZ_KnownLive(self)(self)->Overload4(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
33213 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33213); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33213; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33214 args.rval().setUndefined();
33215 return true;
33216 } while (false);
33217 }
33218 binding_detail::FakeString<char16_t> arg0;
33219 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
33220 return false;
33221 }
33222 // NOTE: This assert does NOT call the function.
33223 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload4(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
33224 MOZ_KnownLive(self)(self)->Overload4(NonNullHelper(Constify(arg0)));
33225 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33225); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33225; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33226 args.rval().setUndefined();
33227 return true;
33228 break;
33229 }
33230 default: {
33231 // Using nsPrintfCString here would require including that
33232 // header. Let's not worry about it.
33233 nsAutoCString argCountStr;
33234 argCountStr.AppendPrintf("%u", args.length());
33235 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33236 }
33237 }
33238 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33238); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33238; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33239 return false;
33240}
33241
33242static const JSJitInfo overload4_methodinfo = {
33243 { (JSJitGetterOp)overload4 },
33244 { prototypes::id::TestExampleInterface },
33245 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33246 JSJitInfo::Method,
33247 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33248 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33249 false, /* isInfallible. False in setters. */
33250 false, /* isMovable. Not relevant for setters. */
33251 false, /* isEliminatable. Not relevant for setters. */
33252 false, /* isAlwaysInSlot. Only relevant for getters. */
33253 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33254 false, /* isTypedMethod. Only relevant for methods. */
33255 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33256};
33257
33258MOZ_CAN_RUN_SCRIPT static bool
33259overload5(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33260{
33261 BindingCallContext cx(cx_, "TestExampleInterface.overload5");
33262 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33265( cx, "TestExampleInterface"
, "overload5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33263 "TestExampleInterface", "overload5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33265( cx, "TestExampleInterface"
, "overload5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33264 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33265( cx, "TestExampleInterface"
, "overload5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33265 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33265( cx, "TestExampleInterface"
, "overload5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
33266
33267 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33268 unsigned argcount = std::min(args.length(), 1u);
33269 switch (argcount) {
33270 case 1: {
33271 if (args[0].isNumber()) {
33272 int32_t arg0;
33273 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33274 return false;
33275 }
33276 // NOTE: This assert does NOT call the function.
33277 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload5(arg0))>, "Should be returning void here");
33278 MOZ_KnownLive(self)(self)->Overload5(arg0);
33279 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33279); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33279; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33280 args.rval().setUndefined();
33281 return true;
33282 }
33283 TestEnum arg0;
33284 {
33285 int index;
33286 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
33287 binding_detail::EnumStrings<TestEnum>::Values,
33288 "TestEnum", "argument 1",
33289 &index)) {
33290 return false;
33291 }
33292 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",
"../TestExampleGenBinding.cpp", 33292); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 33292; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
33293 arg0 = static_cast<TestEnum>(index);
33294 }
33295 // NOTE: This assert does NOT call the function.
33296 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload5(arg0))>, "Should be returning void here");
33297 MOZ_KnownLive(self)(self)->Overload5(arg0);
33298 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33298); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33298; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33299 args.rval().setUndefined();
33300 return true;
33301 break;
33302 }
33303 default: {
33304 // Using nsPrintfCString here would require including that
33305 // header. Let's not worry about it.
33306 nsAutoCString argCountStr;
33307 argCountStr.AppendPrintf("%u", args.length());
33308 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33309 }
33310 }
33311 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33311); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33311; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33312 return false;
33313}
33314
33315static const JSJitInfo overload5_methodinfo = {
33316 { (JSJitGetterOp)overload5 },
33317 { prototypes::id::TestExampleInterface },
33318 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33319 JSJitInfo::Method,
33320 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33321 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33322 false, /* isInfallible. False in setters. */
33323 false, /* isMovable. Not relevant for setters. */
33324 false, /* isEliminatable. Not relevant for setters. */
33325 false, /* isAlwaysInSlot. Only relevant for getters. */
33326 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33327 false, /* isTypedMethod. Only relevant for methods. */
33328 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33329};
33330
33331MOZ_CAN_RUN_SCRIPT static bool
33332overload6(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33333{
33334 BindingCallContext cx(cx_, "TestExampleInterface.overload6");
33335 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33338( cx, "TestExampleInterface"
, "overload6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33336 "TestExampleInterface", "overload6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33338( cx, "TestExampleInterface"
, "overload6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33337 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33338( cx, "TestExampleInterface"
, "overload6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33338 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33338( cx, "TestExampleInterface"
, "overload6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
33339
33340 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33341 unsigned argcount = std::min(args.length(), 1u);
33342 switch (argcount) {
33343 case 1: {
33344 if (args[0].isBoolean()) {
33345 bool arg0;
33346 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33347 return false;
33348 }
33349 // NOTE: This assert does NOT call the function.
33350 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload6(arg0))>, "Should be returning void here");
33351 MOZ_KnownLive(self)(self)->Overload6(arg0);
33352 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33352); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33352; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33353 args.rval().setUndefined();
33354 return true;
33355 }
33356 int32_t arg0;
33357 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33358 return false;
33359 }
33360 // NOTE: This assert does NOT call the function.
33361 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload6(arg0))>, "Should be returning void here");
33362 MOZ_KnownLive(self)(self)->Overload6(arg0);
33363 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33363); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33363; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33364 args.rval().setUndefined();
33365 return true;
33366 break;
33367 }
33368 default: {
33369 // Using nsPrintfCString here would require including that
33370 // header. Let's not worry about it.
33371 nsAutoCString argCountStr;
33372 argCountStr.AppendPrintf("%u", args.length());
33373 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33374 }
33375 }
33376 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33376); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33376; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33377 return false;
33378}
33379
33380static const JSJitInfo overload6_methodinfo = {
33381 { (JSJitGetterOp)overload6 },
33382 { prototypes::id::TestExampleInterface },
33383 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33384 JSJitInfo::Method,
33385 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33386 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33387 false, /* isInfallible. False in setters. */
33388 false, /* isMovable. Not relevant for setters. */
33389 false, /* isEliminatable. Not relevant for setters. */
33390 false, /* isAlwaysInSlot. Only relevant for getters. */
33391 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33392 false, /* isTypedMethod. Only relevant for methods. */
33393 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33394};
33395
33396MOZ_CAN_RUN_SCRIPT static bool
33397overload7(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33398{
33399 BindingCallContext cx(cx_, "TestExampleInterface.overload7");
33400 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33403( cx, "TestExampleInterface"
, "overload7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33401 "TestExampleInterface", "overload7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33403( cx, "TestExampleInterface"
, "overload7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33402 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33403( cx, "TestExampleInterface"
, "overload7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33403 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33403( cx, "TestExampleInterface"
, "overload7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
33404
33405 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33406 unsigned argcount = std::min(args.length(), 1u);
33407 switch (argcount) {
33408 case 1: {
33409 if (args[0].isBoolean()) {
33410 bool arg0;
33411 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33412 return false;
33413 }
33414 // NOTE: This assert does NOT call the function.
33415 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload7(arg0))>, "Should be returning void here");
33416 MOZ_KnownLive(self)(self)->Overload7(arg0);
33417 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33417); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33417; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33418 args.rval().setUndefined();
33419 return true;
33420 }
33421 if (args[0].isNumber()) {
33422 int32_t arg0;
33423 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33424 return false;
33425 }
33426 // NOTE: This assert does NOT call the function.
33427 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload7(arg0))>, "Should be returning void here");
33428 MOZ_KnownLive(self)(self)->Overload7(arg0);
33429 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33429); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33429; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33430 args.rval().setUndefined();
33431 return true;
33432 }
33433 nsCString arg0;
33434 if (!ConvertJSValueToByteString(cx, args[0], false, "argument 1", arg0)) {
33435 return false;
33436 }
33437 // NOTE: This assert does NOT call the function.
33438 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload7(Constify(arg0)))>, "Should be returning void here");
33439 MOZ_KnownLive(self)(self)->Overload7(Constify(arg0));
33440 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33440); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33440; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33441 args.rval().setUndefined();
33442 return true;
33443 break;
33444 }
33445 default: {
33446 // Using nsPrintfCString here would require including that
33447 // header. Let's not worry about it.
33448 nsAutoCString argCountStr;
33449 argCountStr.AppendPrintf("%u", args.length());
33450 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33451 }
33452 }
33453 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33453); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33453; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33454 return false;
33455}
33456
33457static const JSJitInfo overload7_methodinfo = {
33458 { (JSJitGetterOp)overload7 },
33459 { prototypes::id::TestExampleInterface },
33460 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33461 JSJitInfo::Method,
33462 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33463 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33464 false, /* isInfallible. False in setters. */
33465 false, /* isMovable. Not relevant for setters. */
33466 false, /* isEliminatable. Not relevant for setters. */
33467 false, /* isAlwaysInSlot. Only relevant for getters. */
33468 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33469 false, /* isTypedMethod. Only relevant for methods. */
33470 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33471};
33472
33473MOZ_CAN_RUN_SCRIPT static bool
33474overload8(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33475{
33476 BindingCallContext cx(cx_, "TestExampleInterface.overload8");
33477 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33480( cx, "TestExampleInterface"
, "overload8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33478 "TestExampleInterface", "overload8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33480( cx, "TestExampleInterface"
, "overload8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33479 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33480( cx, "TestExampleInterface"
, "overload8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33480 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33480( cx, "TestExampleInterface"
, "overload8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
33481
33482 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33483 unsigned argcount = std::min(args.length(), 1u);
33484 switch (argcount) {
33485 case 1: {
33486 if (args[0].isObject()) {
33487 do {
33488 NonNull<mozilla::dom::TestInterface> arg0;
33489 {
33490 // Our JSContext should be in the right global to do unwrapping in.
33491 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
33492 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
33493 break;
33494 }
33495 }
33496 // NOTE: This assert does NOT call the function.
33497 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload8(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
33498 MOZ_KnownLive(self)(self)->Overload8(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
33499 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33499); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33499; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33500 args.rval().setUndefined();
33501 return true;
33502 } while (false);
33503 }
33504 int32_t arg0;
33505 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33506 return false;
33507 }
33508 // NOTE: This assert does NOT call the function.
33509 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload8(arg0))>, "Should be returning void here");
33510 MOZ_KnownLive(self)(self)->Overload8(arg0);
33511 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33511); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33511; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33512 args.rval().setUndefined();
33513 return true;
33514 break;
33515 }
33516 default: {
33517 // Using nsPrintfCString here would require including that
33518 // header. Let's not worry about it.
33519 nsAutoCString argCountStr;
33520 argCountStr.AppendPrintf("%u", args.length());
33521 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33522 }
33523 }
33524 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33524); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33524; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33525 return false;
33526}
33527
33528static const JSJitInfo overload8_methodinfo = {
33529 { (JSJitGetterOp)overload8 },
33530 { prototypes::id::TestExampleInterface },
33531 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33532 JSJitInfo::Method,
33533 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33534 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33535 false, /* isInfallible. False in setters. */
33536 false, /* isMovable. Not relevant for setters. */
33537 false, /* isEliminatable. Not relevant for setters. */
33538 false, /* isAlwaysInSlot. Only relevant for getters. */
33539 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33540 false, /* isTypedMethod. Only relevant for methods. */
33541 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33542};
33543
33544MOZ_CAN_RUN_SCRIPT static bool
33545overload9(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33546{
33547 BindingCallContext cx(cx_, "TestExampleInterface.overload9");
33548 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33551( cx, "TestExampleInterface"
, "overload9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33549 "TestExampleInterface", "overload9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33551( cx, "TestExampleInterface"
, "overload9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33550 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33551( cx, "TestExampleInterface"
, "overload9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
33551 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33551( cx, "TestExampleInterface"
, "overload9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
33552
33553 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33554 unsigned argcount = std::min(args.length(), 1u);
33555 switch (argcount) {
33556 case 1: {
33557 if (args[0].isNullOrUndefined()) {
33558 Nullable<int32_t> arg0;
33559 if (args[0].isNullOrUndefined()) {
33560 arg0.SetNull();
33561 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
33562 return false;
33563 }
33564 // NOTE: This assert does NOT call the function.
33565 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload9(Constify(arg0)))>, "Should be returning void here");
33566 MOZ_KnownLive(self)(self)->Overload9(Constify(arg0));
33567 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33567); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33567; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33568 args.rval().setUndefined();
33569 return true;
33570 }
33571 if (args[0].isNumber()) {
33572 Nullable<int32_t> arg0;
33573 if (args[0].isNullOrUndefined()) {
33574 arg0.SetNull();
33575 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
33576 return false;
33577 }
33578 // NOTE: This assert does NOT call the function.
33579 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload9(Constify(arg0)))>, "Should be returning void here");
33580 MOZ_KnownLive(self)(self)->Overload9(Constify(arg0));
33581 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33581); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33581; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33582 args.rval().setUndefined();
33583 return true;
33584 }
33585 binding_detail::FakeString<char16_t> arg0;
33586 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
33587 return false;
33588 }
33589 // NOTE: This assert does NOT call the function.
33590 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload9(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
33591 MOZ_KnownLive(self)(self)->Overload9(NonNullHelper(Constify(arg0)));
33592 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33592); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33592; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33593 args.rval().setUndefined();
33594 return true;
33595 break;
33596 }
33597 default: {
33598 // Using nsPrintfCString here would require including that
33599 // header. Let's not worry about it.
33600 nsAutoCString argCountStr;
33601 argCountStr.AppendPrintf("%u", args.length());
33602 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33603 }
33604 }
33605 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33605); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33605; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33606 return false;
33607}
33608
33609static const JSJitInfo overload9_methodinfo = {
33610 { (JSJitGetterOp)overload9 },
33611 { prototypes::id::TestExampleInterface },
33612 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33613 JSJitInfo::Method,
33614 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33615 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33616 false, /* isInfallible. False in setters. */
33617 false, /* isMovable. Not relevant for setters. */
33618 false, /* isEliminatable. Not relevant for setters. */
33619 false, /* isAlwaysInSlot. Only relevant for getters. */
33620 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33621 false, /* isTypedMethod. Only relevant for methods. */
33622 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33623};
33624
33625MOZ_CAN_RUN_SCRIPT static bool
33626overload10(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33627{
33628 BindingCallContext cx(cx_, "TestExampleInterface.overload10");
33629 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33632( cx, "TestExampleInterface"
, "overload10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33630 "TestExampleInterface", "overload10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33632( cx, "TestExampleInterface"
, "overload10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33631 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33632( cx, "TestExampleInterface"
, "overload10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33632 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33632( cx, "TestExampleInterface"
, "overload10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33633
33634 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33635 unsigned argcount = std::min(args.length(), 1u);
33636 switch (argcount) {
33637 case 1: {
33638 if (args[0].isObject()) {
33639 do {
33640 JS::Rooted<JSObject*> arg0(cx);
33641 arg0 = &args[0].toObject();
33642 // NOTE: This assert does NOT call the function.
33643 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload10(cx, arg0))>, "Should be returning void here");
33644 MOZ_KnownLive(self)(self)->Overload10(cx, arg0);
33645 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33645); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33645; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33646 args.rval().setUndefined();
33647 return true;
33648 } while (false);
33649 }
33650 Nullable<int32_t> arg0;
33651 if (args[0].isNullOrUndefined()) {
33652 arg0.SetNull();
33653 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
33654 return false;
33655 }
33656 // NOTE: This assert does NOT call the function.
33657 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload10(Constify(arg0)))>, "Should be returning void here");
33658 MOZ_KnownLive(self)(self)->Overload10(Constify(arg0));
33659 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33659); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33659; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33660 args.rval().setUndefined();
33661 return true;
33662 break;
33663 }
33664 default: {
33665 // Using nsPrintfCString here would require including that
33666 // header. Let's not worry about it.
33667 nsAutoCString argCountStr;
33668 argCountStr.AppendPrintf("%u", args.length());
33669 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33670 }
33671 }
33672 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33672); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33672; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33673 return false;
33674}
33675
33676static const JSJitInfo overload10_methodinfo = {
33677 { (JSJitGetterOp)overload10 },
33678 { prototypes::id::TestExampleInterface },
33679 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33680 JSJitInfo::Method,
33681 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33682 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33683 false, /* isInfallible. False in setters. */
33684 false, /* isMovable. Not relevant for setters. */
33685 false, /* isEliminatable. Not relevant for setters. */
33686 false, /* isAlwaysInSlot. Only relevant for getters. */
33687 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33688 false, /* isTypedMethod. Only relevant for methods. */
33689 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33690};
33691
33692MOZ_CAN_RUN_SCRIPT static bool
33693overload11(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33694{
33695 BindingCallContext cx(cx_, "TestExampleInterface.overload11");
33696 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33699( cx, "TestExampleInterface"
, "overload11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33697 "TestExampleInterface", "overload11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33699( cx, "TestExampleInterface"
, "overload11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33698 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33699( cx, "TestExampleInterface"
, "overload11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33699 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33699( cx, "TestExampleInterface"
, "overload11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33700
33701 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33702 unsigned argcount = std::min(args.length(), 1u);
33703 switch (argcount) {
33704 case 1: {
33705 if (args[0].isNumber()) {
33706 int32_t arg0;
33707 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33708 return false;
33709 }
33710 // NOTE: This assert does NOT call the function.
33711 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload11(arg0))>, "Should be returning void here");
33712 MOZ_KnownLive(self)(self)->Overload11(arg0);
33713 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33713); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33713; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33714 args.rval().setUndefined();
33715 return true;
33716 }
33717 binding_detail::FakeString<char16_t> arg0;
33718 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
33719 return false;
33720 }
33721 // NOTE: This assert does NOT call the function.
33722 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload11(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
33723 MOZ_KnownLive(self)(self)->Overload11(NonNullHelper(Constify(arg0)));
33724 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33724); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33724; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33725 args.rval().setUndefined();
33726 return true;
33727 break;
33728 }
33729 default: {
33730 // Using nsPrintfCString here would require including that
33731 // header. Let's not worry about it.
33732 nsAutoCString argCountStr;
33733 argCountStr.AppendPrintf("%u", args.length());
33734 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33735 }
33736 }
33737 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33737); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33737; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33738 return false;
33739}
33740
33741static const JSJitInfo overload11_methodinfo = {
33742 { (JSJitGetterOp)overload11 },
33743 { prototypes::id::TestExampleInterface },
33744 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33745 JSJitInfo::Method,
33746 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33747 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33748 false, /* isInfallible. False in setters. */
33749 false, /* isMovable. Not relevant for setters. */
33750 false, /* isEliminatable. Not relevant for setters. */
33751 false, /* isAlwaysInSlot. Only relevant for getters. */
33752 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33753 false, /* isTypedMethod. Only relevant for methods. */
33754 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33755};
33756
33757MOZ_CAN_RUN_SCRIPT static bool
33758overload12(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33759{
33760 BindingCallContext cx(cx_, "TestExampleInterface.overload12");
33761 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33764( cx, "TestExampleInterface"
, "overload12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33762 "TestExampleInterface", "overload12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33764( cx, "TestExampleInterface"
, "overload12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33763 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33764( cx, "TestExampleInterface"
, "overload12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33764 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33764( cx, "TestExampleInterface"
, "overload12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33765
33766 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33767 unsigned argcount = std::min(args.length(), 1u);
33768 switch (argcount) {
33769 case 1: {
33770 if (args[0].isNullOrUndefined()) {
33771 Nullable<bool> arg0;
33772 if (args[0].isNullOrUndefined()) {
33773 arg0.SetNull();
33774 } else if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
33775 return false;
33776 }
33777 // NOTE: This assert does NOT call the function.
33778 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload12(Constify(arg0)))>, "Should be returning void here");
33779 MOZ_KnownLive(self)(self)->Overload12(Constify(arg0));
33780 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33780); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33780; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33781 args.rval().setUndefined();
33782 return true;
33783 }
33784 if (args[0].isBoolean()) {
33785 Nullable<bool> arg0;
33786 if (args[0].isNullOrUndefined()) {
33787 arg0.SetNull();
33788 } else if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
33789 return false;
33790 }
33791 // NOTE: This assert does NOT call the function.
33792 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload12(Constify(arg0)))>, "Should be returning void here");
33793 MOZ_KnownLive(self)(self)->Overload12(Constify(arg0));
33794 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33794); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33794; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33795 args.rval().setUndefined();
33796 return true;
33797 }
33798 int32_t arg0;
33799 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33800 return false;
33801 }
33802 // NOTE: This assert does NOT call the function.
33803 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload12(arg0))>, "Should be returning void here");
33804 MOZ_KnownLive(self)(self)->Overload12(arg0);
33805 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33805); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33805; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33806 args.rval().setUndefined();
33807 return true;
33808 break;
33809 }
33810 default: {
33811 // Using nsPrintfCString here would require including that
33812 // header. Let's not worry about it.
33813 nsAutoCString argCountStr;
33814 argCountStr.AppendPrintf("%u", args.length());
33815 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33816 }
33817 }
33818 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33818); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33818; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33819 return false;
33820}
33821
33822static const JSJitInfo overload12_methodinfo = {
33823 { (JSJitGetterOp)overload12 },
33824 { prototypes::id::TestExampleInterface },
33825 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33826 JSJitInfo::Method,
33827 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33828 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33829 false, /* isInfallible. False in setters. */
33830 false, /* isMovable. Not relevant for setters. */
33831 false, /* isEliminatable. Not relevant for setters. */
33832 false, /* isAlwaysInSlot. Only relevant for getters. */
33833 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33834 false, /* isTypedMethod. Only relevant for methods. */
33835 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33836};
33837
33838MOZ_CAN_RUN_SCRIPT static bool
33839overload13(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33840{
33841 BindingCallContext cx(cx_, "TestExampleInterface.overload13");
33842 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33845( cx, "TestExampleInterface"
, "overload13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33843 "TestExampleInterface", "overload13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33845( cx, "TestExampleInterface"
, "overload13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33844 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33845( cx, "TestExampleInterface"
, "overload13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33845 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33845( cx, "TestExampleInterface"
, "overload13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33846
33847 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33848 unsigned argcount = std::min(args.length(), 1u);
33849 switch (argcount) {
33850 case 1: {
33851 if (args[0].isBoolean()) {
33852 bool arg0;
33853 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33854 return false;
33855 }
33856 // NOTE: This assert does NOT call the function.
33857 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload13(arg0))>, "Should be returning void here");
33858 MOZ_KnownLive(self)(self)->Overload13(arg0);
33859 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33859); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33859; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33860 args.rval().setUndefined();
33861 return true;
33862 }
33863 Nullable<int32_t> arg0;
33864 if (args[0].isNullOrUndefined()) {
33865 arg0.SetNull();
33866 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
33867 return false;
33868 }
33869 // NOTE: This assert does NOT call the function.
33870 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload13(Constify(arg0)))>, "Should be returning void here");
33871 MOZ_KnownLive(self)(self)->Overload13(Constify(arg0));
33872 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33872); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33872; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33873 args.rval().setUndefined();
33874 return true;
33875 break;
33876 }
33877 default: {
33878 // Using nsPrintfCString here would require including that
33879 // header. Let's not worry about it.
33880 nsAutoCString argCountStr;
33881 argCountStr.AppendPrintf("%u", args.length());
33882 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33883 }
33884 }
33885 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33885); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33885; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33886 return false;
33887}
33888
33889static const JSJitInfo overload13_methodinfo = {
33890 { (JSJitGetterOp)overload13 },
33891 { prototypes::id::TestExampleInterface },
33892 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33893 JSJitInfo::Method,
33894 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33895 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33896 false, /* isInfallible. False in setters. */
33897 false, /* isMovable. Not relevant for setters. */
33898 false, /* isEliminatable. Not relevant for setters. */
33899 false, /* isAlwaysInSlot. Only relevant for getters. */
33900 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33901 false, /* isTypedMethod. Only relevant for methods. */
33902 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33903};
33904
33905MOZ_CAN_RUN_SCRIPT static bool
33906overload14(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33907{
33908 BindingCallContext cx(cx_, "TestExampleInterface.overload14");
33909 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33912( cx, "TestExampleInterface"
, "overload14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33910 "TestExampleInterface", "overload14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33912( cx, "TestExampleInterface"
, "overload14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33911 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33912( cx, "TestExampleInterface"
, "overload14", 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::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33912( cx, "TestExampleInterface"
, "overload14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33913
33914 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
33915 unsigned argcount = std::min(args.length(), 1u);
33916 switch (argcount) {
33917 case 0: {
33918 Optional<int32_t> arg0;
33919 if (args.hasDefined(0)) {
33920 arg0.Construct();
33921 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
33922 return false;
33923 }
33924 }
33925 // NOTE: This assert does NOT call the function.
33926 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload14(Constify(arg0)))>, "Should be returning void here");
33927 MOZ_KnownLive(self)(self)->Overload14(Constify(arg0));
33928 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33928); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33928; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33929 args.rval().setUndefined();
33930 return true;
33931 break;
33932 }
33933 case 1: {
33934 if (args[0].isObject()) {
33935 do {
33936 NonNull<mozilla::dom::TestInterface> arg0;
33937 {
33938 // Our JSContext should be in the right global to do unwrapping in.
33939 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
33940 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
33941 break;
33942 }
33943 }
33944 // NOTE: This assert does NOT call the function.
33945 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload14(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
33946 MOZ_KnownLive(self)(self)->Overload14(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
33947 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33947); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33947; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33948 args.rval().setUndefined();
33949 return true;
33950 } while (false);
33951 }
33952 Optional<int32_t> arg0;
33953 if (args.hasDefined(0)) {
33954 arg0.Construct();
33955 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
33956 return false;
33957 }
33958 }
33959 // NOTE: This assert does NOT call the function.
33960 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload14(Constify(arg0)))>, "Should be returning void here");
33961 MOZ_KnownLive(self)(self)->Overload14(Constify(arg0));
33962 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 33962); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33962; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33963 args.rval().setUndefined();
33964 return true;
33965 break;
33966 }
33967 default: {
33968 // Using nsPrintfCString here would require including that
33969 // header. Let's not worry about it.
33970 nsAutoCString argCountStr;
33971 argCountStr.AppendPrintf("%u", args.length());
33972 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33973 }
33974 }
33975 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 33975); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33975; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33976 return false;
33977}
33978
33979static const JSJitInfo overload14_methodinfo = {
33980 { (JSJitGetterOp)overload14 },
33981 { prototypes::id::TestExampleInterface },
33982 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
33983 JSJitInfo::Method,
33984 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33985 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33986 false, /* isInfallible. False in setters. */
33987 false, /* isMovable. Not relevant for setters. */
33988 false, /* isEliminatable. Not relevant for setters. */
33989 false, /* isAlwaysInSlot. Only relevant for getters. */
33990 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33991 false, /* isTypedMethod. Only relevant for methods. */
33992 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33993};
33994
33995MOZ_CAN_RUN_SCRIPT static bool
33996overload15(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33997{
33998 BindingCallContext cx(cx_, "TestExampleInterface.overload15");
33999 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34002( cx, "TestExampleInterface"
, "overload15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34000 "TestExampleInterface", "overload15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34002( cx, "TestExampleInterface"
, "overload15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34001 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34002( cx, "TestExampleInterface"
, "overload15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34002 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34002( cx, "TestExampleInterface"
, "overload15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34003
34004 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34005 unsigned argcount = std::min(args.length(), 1u);
34006 switch (argcount) {
34007 case 0: {
34008 Optional<NonNull<mozilla::dom::TestInterface>> arg0;
34009 if (args.hasDefined(0)) {
34010 arg0.Construct();
34011 if (args[0].isObject()) {
34012 {
34013 // Our JSContext should be in the right global to do unwrapping in.
34014 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
34015 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
34016 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
34017 return false;
34018 }
34019 }
34020 } else {
34021 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
34022 return false;
34023 }
34024 }
34025 // NOTE: This assert does NOT call the function.
34026 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0)))))>, "Should be returning void here");
34027 MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))));
34028 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34028); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34028; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34029 args.rval().setUndefined();
34030 return true;
34031 break;
34032 }
34033 case 1: {
34034 if (args[0].isUndefined()) {
34035 Optional<NonNull<mozilla::dom::TestInterface>> arg0;
34036 if (args.hasDefined(0)) {
34037 arg0.Construct();
34038 if (args[0].isObject()) {
34039 {
34040 // Our JSContext should be in the right global to do unwrapping in.
34041 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
34042 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
34043 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
34044 return false;
34045 }
34046 }
34047 } else {
34048 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
34049 return false;
34050 }
34051 }
34052 // NOTE: This assert does NOT call the function.
34053 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0)))))>, "Should be returning void here");
34054 MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))));
34055 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34055); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34055; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34056 args.rval().setUndefined();
34057 return true;
34058 }
34059 if (args[0].isObject()) {
34060 do {
34061 Optional<NonNull<mozilla::dom::TestInterface>> arg0;
34062 if (args.hasDefined(0)) {
34063 arg0.Construct();
34064 {
34065 // Our JSContext should be in the right global to do unwrapping in.
34066 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
34067 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
34068 break;
34069 }
34070 }
34071 }
34072 // NOTE: This assert does NOT call the function.
34073 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0)))))>, "Should be returning void here");
34074 MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))));
34075 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34075); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34075; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34076 args.rval().setUndefined();
34077 return true;
34078 } while (false);
34079 }
34080 int32_t arg0;
34081 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
34082 return false;
34083 }
34084 // NOTE: This assert does NOT call the function.
34085 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload15(arg0))>, "Should be returning void here");
34086 MOZ_KnownLive(self)(self)->Overload15(arg0);
34087 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34087); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34087; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34088 args.rval().setUndefined();
34089 return true;
34090 break;
34091 }
34092 default: {
34093 // Using nsPrintfCString here would require including that
34094 // header. Let's not worry about it.
34095 nsAutoCString argCountStr;
34096 argCountStr.AppendPrintf("%u", args.length());
34097 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
34098 }
34099 }
34100 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 34100); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 34100; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
34101 return false;
34102}
34103
34104static const JSJitInfo overload15_methodinfo = {
34105 { (JSJitGetterOp)overload15 },
34106 { prototypes::id::TestExampleInterface },
34107 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34108 JSJitInfo::Method,
34109 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34110 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34111 false, /* isInfallible. False in setters. */
34112 false, /* isMovable. Not relevant for setters. */
34113 false, /* isEliminatable. Not relevant for setters. */
34114 false, /* isAlwaysInSlot. Only relevant for getters. */
34115 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34116 false, /* isTypedMethod. Only relevant for methods. */
34117 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34118};
34119
34120MOZ_CAN_RUN_SCRIPT static bool
34121overload16(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34122{
34123 BindingCallContext cx(cx_, "TestExampleInterface.overload16");
34124 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34127( cx, "TestExampleInterface"
, "overload16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34125 "TestExampleInterface", "overload16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34127( cx, "TestExampleInterface"
, "overload16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34126 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34127( cx, "TestExampleInterface"
, "overload16", 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::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34127( cx, "TestExampleInterface"
, "overload16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34128
34129 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34130 unsigned argcount = std::min(args.length(), 1u);
34131 switch (argcount) {
34132 case 0: {
34133 Optional<mozilla::dom::TestInterface*> arg0;
34134 if (args.hasDefined(0)) {
34135 arg0.Construct();
34136 if (args[0].isObject()) {
34137 {
34138 // Our JSContext should be in the right global to do unwrapping in.
34139 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
34140 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
34141 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
34142 return false;
34143 }
34144 }
34145 } else if (args[0].isNullOrUndefined()) {
34146 arg0.Value() = nullptr;
34147 } else {
34148 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
34149 return false;
34150 }
34151 }
34152 // NOTE: This assert does NOT call the function.
34153 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
34154 MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
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)"
, "../TestExampleGenBinding.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 break;
34159 }
34160 case 1: {
34161 if (args[0].isNullOrUndefined()) {
34162 Optional<mozilla::dom::TestInterface*> arg0;
34163 if (args.hasDefined(0)) {
34164 arg0.Construct();
34165 arg0.Value() = nullptr;
34166 }
34167 // NOTE: This assert does NOT call the function.
34168 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
34169 MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
34170 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34170); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34170; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34171 args.rval().setUndefined();
34172 return true;
34173 }
34174 if (args[0].isObject()) {
34175 do {
34176 Optional<mozilla::dom::TestInterface*> arg0;
34177 if (args.hasDefined(0)) {
34178 arg0.Construct();
34179 {
34180 // Our JSContext should be in the right global to do unwrapping in.
34181 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
34182 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
34183 break;
34184 }
34185 }
34186 }
34187 // NOTE: This assert does NOT call the function.
34188 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0))))>, "Should be returning void here");
34189 MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0)));
34190 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34190); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34190; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34191 args.rval().setUndefined();
34192 return true;
34193 } while (false);
34194 }
34195 int32_t arg0;
34196 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
34197 return false;
34198 }
34199 // NOTE: This assert does NOT call the function.
34200 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload16(arg0))>, "Should be returning void here");
34201 MOZ_KnownLive(self)(self)->Overload16(arg0);
34202 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34202); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34202; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34203 args.rval().setUndefined();
34204 return true;
34205 break;
34206 }
34207 default: {
34208 // Using nsPrintfCString here would require including that
34209 // header. Let's not worry about it.
34210 nsAutoCString argCountStr;
34211 argCountStr.AppendPrintf("%u", args.length());
34212 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
34213 }
34214 }
34215 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 34215); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 34215; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
34216 return false;
34217}
34218
34219static const JSJitInfo overload16_methodinfo = {
34220 { (JSJitGetterOp)overload16 },
34221 { prototypes::id::TestExampleInterface },
34222 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34223 JSJitInfo::Method,
34224 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34225 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34226 false, /* isInfallible. False in setters. */
34227 false, /* isMovable. Not relevant for setters. */
34228 false, /* isEliminatable. Not relevant for setters. */
34229 false, /* isAlwaysInSlot. Only relevant for getters. */
34230 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34231 false, /* isTypedMethod. Only relevant for methods. */
34232 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34233};
34234
34235MOZ_CAN_RUN_SCRIPT static bool
34236overload17(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34237{
34238 BindingCallContext cx(cx_, "TestExampleInterface.overload17");
34239 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34242( cx, "TestExampleInterface"
, "overload17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34240 "TestExampleInterface", "overload17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34242( cx, "TestExampleInterface"
, "overload17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34241 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34242( cx, "TestExampleInterface"
, "overload17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34242 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34242( cx, "TestExampleInterface"
, "overload17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34243
34244 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34245 unsigned argcount = std::min(args.length(), 1u);
34246 switch (argcount) {
34247 case 1: {
34248 if (args[0].isObject()) {
34249 do {
34250 binding_detail::AutoSequence<int32_t> arg0;
34251 JS::ForOfIterator iter(cx);
34252 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
34253 return false;
34254 }
34255 if (!iter.valueIsIterable()) {
34256 break;
34257 }
34258 binding_detail::AutoSequence<int32_t> &arr = arg0;
34259 JS::Rooted<JS::Value> temp(cx);
34260 while (true) {
34261 bool done;
34262 if (!iter.next(&temp, &done)) {
34263 return false;
34264 }
34265 if (done) {
34266 break;
34267 }
34268 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
34269 if (!slotPtr) {
34270 JS_ReportOutOfMemory(cx);
34271 return false;
34272 }
34273 int32_t& slot = *slotPtr;
34274 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
34275 return false;
34276 }
34277 }
34278 // NOTE: This assert does NOT call the function.
34279 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload17(Constify(arg0)))>, "Should be returning void here");
34280 MOZ_KnownLive(self)(self)->Overload17(Constify(arg0));
34281 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34281); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34281; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34282 args.rval().setUndefined();
34283 return true;
34284 } while (false);
34285 do {
34286 Record<nsString, int32_t> arg0;
34287 auto& recordEntries = arg0.Entries();
34288
34289 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
34290 JS::RootedVector<jsid> ids(cx);
34291 if (!js::GetPropertyKeys(cx, recordObj,
34292 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
34293 return false;
34294 }
34295 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
34296 JS_ReportOutOfMemory(cx);
34297 return false;
34298 }
34299 JS::Rooted<JS::Value> propNameValue(cx);
34300 JS::Rooted<JS::Value> temp(cx);
34301 JS::Rooted<jsid> curId(cx);
34302 JS::Rooted<JS::Value> idVal(cx);
34303 // Use a hashset to keep track of ids seen, to avoid
34304 // introducing nasty O(N^2) behavior scanning for them all the
34305 // time. Ideally we'd use a data structure with O(1) lookup
34306 // _and_ ordering for the MozMap, but we don't have one lying
34307 // around.
34308 nsTHashtable<nsStringHashKey> idsSeen;
34309 for (size_t i = 0; i < ids.length(); ++i) {
34310 curId = ids[i];
34311
34312 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
34313 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
34314 &desc)) {
34315 return false;
34316 }
34317
34318 if (desc.isNothing() || !desc->enumerable()) {
34319 continue;
34320 }
34321
34322 idVal = js::IdToValue(curId);
34323 nsString propName;
34324 // This will just throw if idVal is a Symbol, like the spec says
34325 // to do.
34326 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
34327 return false;
34328 }
34329
34330 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
34331 return false;
34332 }
34333
34334 Record<nsString, int32_t>::EntryType* entry;
34335 if (!idsSeen.EnsureInserted(propName)) {
34336 // Find the existing entry.
34337 auto idx = recordEntries.IndexOf(propName);
34338 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?" ")"
, "../TestExampleGenBinding.cpp", 34339); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 34339; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
34339 "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?" ")"
, "../TestExampleGenBinding.cpp", 34339); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 34339; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
34340 // Now blow it away to make it look like it was just added
34341 // to the array, because it's not obvious that it's
34342 // safe to write to its already-initialized mValue via our
34343 // normal codegen conversions. For example, the value
34344 // could be a union and this would change its type, but
34345 // codegen assumes we won't do that.
34346 entry = recordEntries.ReconstructElementAt(idx);
34347 } else {
34348 // Safe to do an infallible append here, because we did a
34349 // SetCapacity above to the right capacity.
34350 entry = recordEntries.AppendElement();
34351 }
34352 entry->mKey = propName;
34353 int32_t& slot = entry->mValue;
34354 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
34355 return false;
34356 }
34357 }
34358 // NOTE: This assert does NOT call the function.
34359 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload17(Constify(arg0)))>, "Should be returning void here");
34360 MOZ_KnownLive(self)(self)->Overload17(Constify(arg0));
34361 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34361); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34361; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34362 args.rval().setUndefined();
34363 return true;
34364 } while (false);
34365 }
34366 return cx.ThrowErrorMessage<MSG_OVERLOAD_RESOLUTION_FAILED>("1", "1");
34367 break;
34368 }
34369 default: {
34370 // Using nsPrintfCString here would require including that
34371 // header. Let's not worry about it.
34372 nsAutoCString argCountStr;
34373 argCountStr.AppendPrintf("%u", args.length());
34374 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
34375 }
34376 }
34377 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 34377); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 34377; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
34378 return false;
34379}
34380
34381static const JSJitInfo overload17_methodinfo = {
34382 { (JSJitGetterOp)overload17 },
34383 { prototypes::id::TestExampleInterface },
34384 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34385 JSJitInfo::Method,
34386 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34387 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34388 false, /* isInfallible. False in setters. */
34389 false, /* isMovable. Not relevant for setters. */
34390 false, /* isEliminatable. Not relevant for setters. */
34391 false, /* isAlwaysInSlot. Only relevant for getters. */
34392 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34393 false, /* isTypedMethod. Only relevant for methods. */
34394 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34395};
34396
34397MOZ_CAN_RUN_SCRIPT static bool
34398overload18(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34399{
34400 BindingCallContext cx(cx_, "TestExampleInterface.overload18");
34401 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34404( cx, "TestExampleInterface"
, "overload18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34402 "TestExampleInterface", "overload18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34404( cx, "TestExampleInterface"
, "overload18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34403 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34404( cx, "TestExampleInterface"
, "overload18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34404 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34404( cx, "TestExampleInterface"
, "overload18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34405
34406 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34407 unsigned argcount = std::min(args.length(), 1u);
34408 switch (argcount) {
34409 case 1: {
34410 if (args[0].isObject()) {
34411 do {
34412 binding_detail::AutoSequence<nsString> arg0;
34413 JS::ForOfIterator iter(cx);
34414 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
34415 return false;
34416 }
34417 if (!iter.valueIsIterable()) {
34418 break;
34419 }
34420 binding_detail::AutoSequence<nsString> &arr = arg0;
34421 JS::Rooted<JS::Value> temp(cx);
34422 while (true) {
34423 bool done;
34424 if (!iter.next(&temp, &done)) {
34425 return false;
34426 }
34427 if (done) {
34428 break;
34429 }
34430 nsString* slotPtr = arr.AppendElement(mozilla::fallible);
34431 if (!slotPtr) {
34432 JS_ReportOutOfMemory(cx);
34433 return false;
34434 }
34435 nsString& slot = *slotPtr;
34436 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
34437 return false;
34438 }
34439 }
34440 // NOTE: This assert does NOT call the function.
34441 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload18(Constify(arg0)))>, "Should be returning void here");
34442 MOZ_KnownLive(self)(self)->Overload18(Constify(arg0));
34443 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34443); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34443; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34444 args.rval().setUndefined();
34445 return true;
34446 } while (false);
34447 do {
34448 Record<nsString, nsString> arg0;
34449 auto& recordEntries = arg0.Entries();
34450
34451 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
34452 JS::RootedVector<jsid> ids(cx);
34453 if (!js::GetPropertyKeys(cx, recordObj,
34454 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
34455 return false;
34456 }
34457 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
34458 JS_ReportOutOfMemory(cx);
34459 return false;
34460 }
34461 JS::Rooted<JS::Value> propNameValue(cx);
34462 JS::Rooted<JS::Value> temp(cx);
34463 JS::Rooted<jsid> curId(cx);
34464 JS::Rooted<JS::Value> idVal(cx);
34465 // Use a hashset to keep track of ids seen, to avoid
34466 // introducing nasty O(N^2) behavior scanning for them all the
34467 // time. Ideally we'd use a data structure with O(1) lookup
34468 // _and_ ordering for the MozMap, but we don't have one lying
34469 // around.
34470 nsTHashtable<nsStringHashKey> idsSeen;
34471 for (size_t i = 0; i < ids.length(); ++i) {
34472 curId = ids[i];
34473
34474 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
34475 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
34476 &desc)) {
34477 return false;
34478 }
34479
34480 if (desc.isNothing() || !desc->enumerable()) {
34481 continue;
34482 }
34483
34484 idVal = js::IdToValue(curId);
34485 nsString propName;
34486 // This will just throw if idVal is a Symbol, like the spec says
34487 // to do.
34488 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
34489 return false;
34490 }
34491
34492 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
34493 return false;
34494 }
34495
34496 Record<nsString, nsString>::EntryType* entry;
34497 if (!idsSeen.EnsureInserted(propName)) {
34498 // Find the existing entry.
34499 auto idx = recordEntries.IndexOf(propName);
34500 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?" ")"
, "../TestExampleGenBinding.cpp", 34501); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 34501; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
34501 "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?" ")"
, "../TestExampleGenBinding.cpp", 34501); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 34501; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
34502 // Now blow it away to make it look like it was just added
34503 // to the array, because it's not obvious that it's
34504 // safe to write to its already-initialized mValue via our
34505 // normal codegen conversions. For example, the value
34506 // could be a union and this would change its type, but
34507 // codegen assumes we won't do that.
34508 entry = recordEntries.ReconstructElementAt(idx);
34509 } else {
34510 // Safe to do an infallible append here, because we did a
34511 // SetCapacity above to the right capacity.
34512 entry = recordEntries.AppendElement();
34513 }
34514 entry->mKey = propName;
34515 nsString& slot = entry->mValue;
34516 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
34517 return false;
34518 }
34519 }
34520 // NOTE: This assert does NOT call the function.
34521 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload18(Constify(arg0)))>, "Should be returning void here");
34522 MOZ_KnownLive(self)(self)->Overload18(Constify(arg0));
34523 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34523); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34523; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34524 args.rval().setUndefined();
34525 return true;
34526 } while (false);
34527 }
34528 return cx.ThrowErrorMessage<MSG_OVERLOAD_RESOLUTION_FAILED>("1", "1");
34529 break;
34530 }
34531 default: {
34532 // Using nsPrintfCString here would require including that
34533 // header. Let's not worry about it.
34534 nsAutoCString argCountStr;
34535 argCountStr.AppendPrintf("%u", args.length());
34536 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
34537 }
34538 }
34539 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 34539); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 34539; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
34540 return false;
34541}
34542
34543static const JSJitInfo overload18_methodinfo = {
34544 { (JSJitGetterOp)overload18 },
34545 { prototypes::id::TestExampleInterface },
34546 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34547 JSJitInfo::Method,
34548 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34549 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34550 false, /* isInfallible. False in setters. */
34551 false, /* isMovable. Not relevant for setters. */
34552 false, /* isEliminatable. Not relevant for setters. */
34553 false, /* isAlwaysInSlot. Only relevant for getters. */
34554 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34555 false, /* isTypedMethod. Only relevant for methods. */
34556 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34557};
34558
34559MOZ_CAN_RUN_SCRIPT static bool
34560overload19(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34561{
34562 BindingCallContext cx(cx_, "TestExampleInterface.overload19");
34563 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34566( cx, "TestExampleInterface"
, "overload19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34564 "TestExampleInterface", "overload19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34566( cx, "TestExampleInterface"
, "overload19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34565 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34566( cx, "TestExampleInterface"
, "overload19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34566 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34566( cx, "TestExampleInterface"
, "overload19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34567
34568 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34569 unsigned argcount = std::min(args.length(), 1u);
34570 switch (argcount) {
34571 case 0: {
34572 RootedDictionary<binding_detail::FastDict> arg0(cx);
34573 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", false)) {
34574 return false;
34575 }
34576 // NOTE: This assert does NOT call the function.
34577 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload19(cx, Constify(arg0)))>, "Should be returning void here");
34578 MOZ_KnownLive(self)(self)->Overload19(cx, Constify(arg0));
34579 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34579); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34579; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34580 args.rval().setUndefined();
34581 return true;
34582 break;
34583 }
34584 case 1: {
34585 if (args[0].isNullOrUndefined()) {
34586 RootedDictionary<binding_detail::FastDict> arg0(cx);
34587 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
34588 return false;
34589 }
34590 // NOTE: This assert does NOT call the function.
34591 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload19(cx, Constify(arg0)))>, "Should be returning void here");
34592 MOZ_KnownLive(self)(self)->Overload19(cx, Constify(arg0));
34593 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34593); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34593; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34594 args.rval().setUndefined();
34595 return true;
34596 }
34597 if (args[0].isObject()) {
34598 do {
34599 binding_detail::AutoSequence<int32_t> arg0;
34600 JS::ForOfIterator iter(cx);
34601 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
34602 return false;
34603 }
34604 if (!iter.valueIsIterable()) {
34605 break;
34606 }
34607 binding_detail::AutoSequence<int32_t> &arr = arg0;
34608 JS::Rooted<JS::Value> temp(cx);
34609 while (true) {
34610 bool done;
34611 if (!iter.next(&temp, &done)) {
34612 return false;
34613 }
34614 if (done) {
34615 break;
34616 }
34617 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
34618 if (!slotPtr) {
34619 JS_ReportOutOfMemory(cx);
34620 return false;
34621 }
34622 int32_t& slot = *slotPtr;
34623 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
34624 return false;
34625 }
34626 }
34627 // NOTE: This assert does NOT call the function.
34628 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload19(Constify(arg0)))>, "Should be returning void here");
34629 MOZ_KnownLive(self)(self)->Overload19(Constify(arg0));
34630 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34630); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34630; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34631 args.rval().setUndefined();
34632 return true;
34633 } while (false);
34634 do {
34635 RootedDictionary<binding_detail::FastDict> arg0(cx);
34636 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
34637 return false;
34638 }
34639 // NOTE: This assert does NOT call the function.
34640 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload19(cx, Constify(arg0)))>, "Should be returning void here");
34641 MOZ_KnownLive(self)(self)->Overload19(cx, Constify(arg0));
34642 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34642); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34642; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34643 args.rval().setUndefined();
34644 return true;
34645 } while (false);
34646 }
34647 return cx.ThrowErrorMessage<MSG_OVERLOAD_RESOLUTION_FAILED>("1", "1");
34648 break;
34649 }
34650 default: {
34651 // Using nsPrintfCString here would require including that
34652 // header. Let's not worry about it.
34653 nsAutoCString argCountStr;
34654 argCountStr.AppendPrintf("%u", args.length());
34655 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
34656 }
34657 }
34658 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 34658); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 34658; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
34659 return false;
34660}
34661
34662static const JSJitInfo overload19_methodinfo = {
34663 { (JSJitGetterOp)overload19 },
34664 { prototypes::id::TestExampleInterface },
34665 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34666 JSJitInfo::Method,
34667 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34668 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34669 false, /* isInfallible. False in setters. */
34670 false, /* isMovable. Not relevant for setters. */
34671 false, /* isEliminatable. Not relevant for setters. */
34672 false, /* isAlwaysInSlot. Only relevant for getters. */
34673 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34674 false, /* isTypedMethod. Only relevant for methods. */
34675 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34676};
34677
34678MOZ_CAN_RUN_SCRIPT static bool
34679overload20(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34680{
34681 BindingCallContext cx(cx_, "TestExampleInterface.overload20");
34682 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34685( cx, "TestExampleInterface"
, "overload20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34683 "TestExampleInterface", "overload20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34685( cx, "TestExampleInterface"
, "overload20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34684 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34685( cx, "TestExampleInterface"
, "overload20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34685 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34685( cx, "TestExampleInterface"
, "overload20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34686
34687 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34688 unsigned argcount = std::min(args.length(), 1u);
34689 switch (argcount) {
34690 case 0: {
34691 RootedDictionary<binding_detail::FastDict> arg0(cx);
34692 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", false)) {
34693 return false;
34694 }
34695 // NOTE: This assert does NOT call the function.
34696 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload20(cx, Constify(arg0)))>, "Should be returning void here");
34697 MOZ_KnownLive(self)(self)->Overload20(cx, Constify(arg0));
34698 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34698); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34698; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34699 args.rval().setUndefined();
34700 return true;
34701 break;
34702 }
34703 case 1: {
34704 if (args[0].isNullOrUndefined()) {
34705 RootedDictionary<binding_detail::FastDict> arg0(cx);
34706 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
34707 return false;
34708 }
34709 // NOTE: This assert does NOT call the function.
34710 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload20(cx, Constify(arg0)))>, "Should be returning void here");
34711 MOZ_KnownLive(self)(self)->Overload20(cx, Constify(arg0));
34712 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34712); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34712; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34713 args.rval().setUndefined();
34714 return true;
34715 }
34716 if (args[0].isObject()) {
34717 do {
34718 binding_detail::AutoSequence<int32_t> arg0;
34719 JS::ForOfIterator iter(cx);
34720 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
34721 return false;
34722 }
34723 if (!iter.valueIsIterable()) {
34724 break;
34725 }
34726 binding_detail::AutoSequence<int32_t> &arr = arg0;
34727 JS::Rooted<JS::Value> temp(cx);
34728 while (true) {
34729 bool done;
34730 if (!iter.next(&temp, &done)) {
34731 return false;
34732 }
34733 if (done) {
34734 break;
34735 }
34736 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
34737 if (!slotPtr) {
34738 JS_ReportOutOfMemory(cx);
34739 return false;
34740 }
34741 int32_t& slot = *slotPtr;
34742 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
34743 return false;
34744 }
34745 }
34746 // NOTE: This assert does NOT call the function.
34747 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload20(Constify(arg0)))>, "Should be returning void here");
34748 MOZ_KnownLive(self)(self)->Overload20(Constify(arg0));
34749 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34749); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34749; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34750 args.rval().setUndefined();
34751 return true;
34752 } while (false);
34753 do {
34754 RootedDictionary<binding_detail::FastDict> arg0(cx);
34755 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
34756 return false;
34757 }
34758 // NOTE: This assert does NOT call the function.
34759 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload20(cx, Constify(arg0)))>, "Should be returning void here");
34760 MOZ_KnownLive(self)(self)->Overload20(cx, Constify(arg0));
34761 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34761); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34761; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34762 args.rval().setUndefined();
34763 return true;
34764 } while (false);
34765 }
34766 return cx.ThrowErrorMessage<MSG_OVERLOAD_RESOLUTION_FAILED>("1", "1");
34767 break;
34768 }
34769 default: {
34770 // Using nsPrintfCString here would require including that
34771 // header. Let's not worry about it.
34772 nsAutoCString argCountStr;
34773 argCountStr.AppendPrintf("%u", args.length());
34774 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
34775 }
34776 }
34777 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 34777); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 34777; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
34778 return false;
34779}
34780
34781static const JSJitInfo overload20_methodinfo = {
34782 { (JSJitGetterOp)overload20 },
34783 { prototypes::id::TestExampleInterface },
34784 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34785 JSJitInfo::Method,
34786 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34787 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34788 false, /* isInfallible. False in setters. */
34789 false, /* isMovable. Not relevant for setters. */
34790 false, /* isEliminatable. Not relevant for setters. */
34791 false, /* isAlwaysInSlot. Only relevant for getters. */
34792 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34793 false, /* isTypedMethod. Only relevant for methods. */
34794 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34795};
34796
34797MOZ_CAN_RUN_SCRIPT static bool
34798passVariadicThirdArg(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34799{
34800 BindingCallContext cx(cx_, "TestExampleInterface.passVariadicThirdArg");
34801 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34804( cx, "TestExampleInterface"
, "passVariadicThirdArg", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34802 "TestExampleInterface", "passVariadicThirdArg", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34804( cx, "TestExampleInterface"
, "passVariadicThirdArg", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34803 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34804( cx, "TestExampleInterface"
, "passVariadicThirdArg", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34804 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34804( cx, "TestExampleInterface"
, "passVariadicThirdArg", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34805
34806 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34807 if (!args.requireAtLeast(cx, "TestExampleInterface.passVariadicThirdArg", 2)) {
34808 return false;
34809 }
34810 binding_detail::FakeString<char16_t> arg0;
34811 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
34812 return false;
34813 }
34814 int32_t arg1;
34815 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[1], "Argument 2", &arg1)) {
34816 return false;
34817 }
34818 AutoSequence<OwningNonNull<mozilla::dom::TestInterface>> arg2;
34819 if (args.length() > 2) {
34820 if (!arg2.SetCapacity(args.length() - 2, mozilla::fallible)) {
34821 JS_ReportOutOfMemory(cx);
34822 return false;
34823 }
34824 for (uint32_t variadicArg = 2; variadicArg < args.length(); ++variadicArg) {
34825 // OK to do infallible append here, since we ensured capacity already.
34826 OwningNonNull<mozilla::dom::TestInterface>& slot = *arg2.AppendElement();
34827 if (args[variadicArg].isObject()) {
34828 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
34829 {
34830 // Our JSContext should be in the right global to do unwrapping in.
34831 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[variadicArg], slot, cx);
34832 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
34833 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 3", "TestInterface");
34834 return false;
34835 }
34836 }
34837 } else {
34838 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 3");
34839 return false;
34840 }
34841 }
34842 }
34843 // NOTE: This assert does NOT call the function.
34844 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicThirdArg(NonNullHelper(Constify(arg0)), arg1, MOZ_KnownLive(NonNullHelper(Constify(arg2)))(NonNullHelper(Constify(arg2)))))>, "Should be returning void here");
34845 MOZ_KnownLive(self)(self)->PassVariadicThirdArg(NonNullHelper(Constify(arg0)), arg1, MOZ_KnownLive(NonNullHelper(Constify(arg2)))(NonNullHelper(Constify(arg2))));
34846 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34846); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34846; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34847 args.rval().setUndefined();
34848 return true;
34849}
34850
34851static const JSJitInfo passVariadicThirdArg_methodinfo = {
34852 { (JSJitGetterOp)passVariadicThirdArg },
34853 { prototypes::id::TestExampleInterface },
34854 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34855 JSJitInfo::Method,
34856 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34857 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34858 false, /* isInfallible. False in setters. */
34859 false, /* isMovable. Not relevant for setters. */
34860 false, /* isEliminatable. Not relevant for setters. */
34861 false, /* isAlwaysInSlot. Only relevant for getters. */
34862 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34863 false, /* isTypedMethod. Only relevant for methods. */
34864 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34865};
34866
34867MOZ_CAN_RUN_SCRIPT static bool
34868get_prefable1(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
34869{
34870 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34873( cx, "TestExampleInterface"
, "prefable1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34871 "TestExampleInterface", "prefable1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34873( cx, "TestExampleInterface"
, "prefable1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34872 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject34873( cx, "TestExampleInterface"
, "prefable1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34873 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34873( cx, "TestExampleInterface"
, "prefable1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
34874
34875 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34876 bool result(MOZ_KnownLive(self)(self)->Prefable1());
34877 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34877); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34877; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34878 args.rval().setBoolean(result);
34879 return true;
34880}
34881
34882static const JSJitInfo prefable1_getterinfo = {
34883 { get_prefable1 },
34884 { prototypes::id::TestExampleInterface },
34885 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34886 JSJitInfo::Getter,
34887 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34888 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
34889 true, /* isInfallible. False in setters. */
34890 false, /* isMovable. Not relevant for setters. */
34891 false, /* isEliminatable. Not relevant for setters. */
34892 false, /* isAlwaysInSlot. Only relevant for getters. */
34893 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34894 false, /* isTypedMethod. Only relevant for methods. */
34895 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34896};
34897
34898MOZ_CAN_RUN_SCRIPT static bool
34899get_prefable2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
34900{
34901 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34904( cx, "TestExampleInterface"
, "prefable2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34902 "TestExampleInterface", "prefable2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34904( cx, "TestExampleInterface"
, "prefable2", 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::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject34904( cx, "TestExampleInterface"
, "prefable2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34904 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34904( cx, "TestExampleInterface"
, "prefable2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
34905
34906 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34907 bool result(MOZ_KnownLive(self)(self)->Prefable2());
34908 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34908); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34908; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34909 args.rval().setBoolean(result);
34910 return true;
34911}
34912
34913static const JSJitInfo prefable2_getterinfo = {
34914 { get_prefable2 },
34915 { prototypes::id::TestExampleInterface },
34916 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34917 JSJitInfo::Getter,
34918 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34919 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
34920 true, /* isInfallible. False in setters. */
34921 false, /* isMovable. Not relevant for setters. */
34922 false, /* isEliminatable. Not relevant for setters. */
34923 false, /* isAlwaysInSlot. Only relevant for getters. */
34924 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34925 false, /* isTypedMethod. Only relevant for methods. */
34926 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34927};
34928
34929MOZ_CAN_RUN_SCRIPT static bool
34930get_prefable3(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
34931{
34932 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34935( cx, "TestExampleInterface"
, "prefable3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34933 "TestExampleInterface", "prefable3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34935( cx, "TestExampleInterface"
, "prefable3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34934 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject34935( cx, "TestExampleInterface"
, "prefable3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34935 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34935( cx, "TestExampleInterface"
, "prefable3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
34936
34937 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34938 bool result(MOZ_KnownLive(self)(self)->Prefable3());
34939 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34939); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34939; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34940 args.rval().setBoolean(result);
34941 return true;
34942}
34943
34944static const JSJitInfo prefable3_getterinfo = {
34945 { get_prefable3 },
34946 { prototypes::id::TestExampleInterface },
34947 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34948 JSJitInfo::Getter,
34949 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34950 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
34951 true, /* isInfallible. False in setters. */
34952 false, /* isMovable. Not relevant for setters. */
34953 false, /* isEliminatable. Not relevant for setters. */
34954 false, /* isAlwaysInSlot. Only relevant for getters. */
34955 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34956 false, /* isTypedMethod. Only relevant for methods. */
34957 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34958};
34959
34960MOZ_CAN_RUN_SCRIPT static bool
34961get_prefable4(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
34962{
34963 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34966( cx, "TestExampleInterface"
, "prefable4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34964 "TestExampleInterface", "prefable4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34966( cx, "TestExampleInterface"
, "prefable4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34965 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject34966( cx, "TestExampleInterface"
, "prefable4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34966 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34966( cx, "TestExampleInterface"
, "prefable4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
34967
34968 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
34969 bool result(MOZ_KnownLive(self)(self)->Prefable4());
34970 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 34970); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34970; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34971 args.rval().setBoolean(result);
34972 return true;
34973}
34974
34975static const JSJitInfo prefable4_getterinfo = {
34976 { get_prefable4 },
34977 { prototypes::id::TestExampleInterface },
34978 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
34979 JSJitInfo::Getter,
34980 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34981 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
34982 true, /* isInfallible. False in setters. */
34983 false, /* isMovable. Not relevant for setters. */
34984 false, /* isEliminatable. Not relevant for setters. */
34985 false, /* isAlwaysInSlot. Only relevant for getters. */
34986 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34987 false, /* isTypedMethod. Only relevant for methods. */
34988 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34989};
34990
34991MOZ_CAN_RUN_SCRIPT static bool
34992get_prefable5(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
34993{
34994 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34997( cx, "TestExampleInterface"
, "prefable5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34995 "TestExampleInterface", "prefable5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34997( cx, "TestExampleInterface"
, "prefable5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34996 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject34997( cx, "TestExampleInterface"
, "prefable5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34997 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34997( cx, "TestExampleInterface"
, "prefable5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
34998
34999 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35000 bool result(MOZ_KnownLive(self)(self)->Prefable5());
35001 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35001); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35001; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35002 args.rval().setBoolean(result);
35003 return true;
35004}
35005
35006static const JSJitInfo prefable5_getterinfo = {
35007 { get_prefable5 },
35008 { prototypes::id::TestExampleInterface },
35009 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35010 JSJitInfo::Getter,
35011 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35012 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35013 true, /* isInfallible. False in setters. */
35014 false, /* isMovable. Not relevant for setters. */
35015 false, /* isEliminatable. Not relevant for setters. */
35016 false, /* isAlwaysInSlot. Only relevant for getters. */
35017 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35018 false, /* isTypedMethod. Only relevant for methods. */
35019 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35020};
35021
35022MOZ_CAN_RUN_SCRIPT static bool
35023get_prefable6(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35024{
35025 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35028( cx, "TestExampleInterface"
, "prefable6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35026 "TestExampleInterface", "prefable6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35028( cx, "TestExampleInterface"
, "prefable6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35027 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35028( cx, "TestExampleInterface"
, "prefable6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35028 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35028( cx, "TestExampleInterface"
, "prefable6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
35029
35030 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35031 bool result(MOZ_KnownLive(self)(self)->Prefable6());
35032 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35032); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35032; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35033 args.rval().setBoolean(result);
35034 return true;
35035}
35036
35037static const JSJitInfo prefable6_getterinfo = {
35038 { get_prefable6 },
35039 { prototypes::id::TestExampleInterface },
35040 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35041 JSJitInfo::Getter,
35042 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35043 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35044 true, /* isInfallible. False in setters. */
35045 false, /* isMovable. Not relevant for setters. */
35046 false, /* isEliminatable. Not relevant for setters. */
35047 false, /* isAlwaysInSlot. Only relevant for getters. */
35048 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35049 false, /* isTypedMethod. Only relevant for methods. */
35050 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35051};
35052
35053MOZ_CAN_RUN_SCRIPT static bool
35054get_prefable7(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35055{
35056 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35059( cx, "TestExampleInterface"
, "prefable7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35057 "TestExampleInterface", "prefable7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35059( cx, "TestExampleInterface"
, "prefable7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35058 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35059( cx, "TestExampleInterface"
, "prefable7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35059 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35059( cx, "TestExampleInterface"
, "prefable7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
35060
35061 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35062 bool result(MOZ_KnownLive(self)(self)->Prefable7());
35063 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35063); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35063; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35064 args.rval().setBoolean(result);
35065 return true;
35066}
35067
35068static const JSJitInfo prefable7_getterinfo = {
35069 { get_prefable7 },
35070 { prototypes::id::TestExampleInterface },
35071 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35072 JSJitInfo::Getter,
35073 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35074 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35075 true, /* isInfallible. False in setters. */
35076 false, /* isMovable. Not relevant for setters. */
35077 false, /* isEliminatable. Not relevant for setters. */
35078 false, /* isAlwaysInSlot. Only relevant for getters. */
35079 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35080 false, /* isTypedMethod. Only relevant for methods. */
35081 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35082};
35083
35084MOZ_CAN_RUN_SCRIPT static bool
35085get_prefable8(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35086{
35087 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35090( cx, "TestExampleInterface"
, "prefable8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35088 "TestExampleInterface", "prefable8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35090( cx, "TestExampleInterface"
, "prefable8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35089 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35090( cx, "TestExampleInterface"
, "prefable8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35090 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35090( cx, "TestExampleInterface"
, "prefable8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
35091
35092 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35093 bool result(MOZ_KnownLive(self)(self)->Prefable8());
35094 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35094); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35094; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35095 args.rval().setBoolean(result);
35096 return true;
35097}
35098
35099static const JSJitInfo prefable8_getterinfo = {
35100 { get_prefable8 },
35101 { prototypes::id::TestExampleInterface },
35102 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35103 JSJitInfo::Getter,
35104 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35105 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35106 true, /* isInfallible. False in setters. */
35107 false, /* isMovable. Not relevant for setters. */
35108 false, /* isEliminatable. Not relevant for setters. */
35109 false, /* isAlwaysInSlot. Only relevant for getters. */
35110 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35111 false, /* isTypedMethod. Only relevant for methods. */
35112 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35113};
35114
35115MOZ_CAN_RUN_SCRIPT static bool
35116get_prefable9(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35117{
35118 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35121( cx, "TestExampleInterface"
, "prefable9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35119 "TestExampleInterface", "prefable9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35121( cx, "TestExampleInterface"
, "prefable9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35120 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35121( cx, "TestExampleInterface"
, "prefable9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35121 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35121( cx, "TestExampleInterface"
, "prefable9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
35122
35123 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35124 bool result(MOZ_KnownLive(self)(self)->Prefable9());
35125 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35125); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35125; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35126 args.rval().setBoolean(result);
35127 return true;
35128}
35129
35130static const JSJitInfo prefable9_getterinfo = {
35131 { get_prefable9 },
35132 { prototypes::id::TestExampleInterface },
35133 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35134 JSJitInfo::Getter,
35135 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35136 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35137 true, /* isInfallible. False in setters. */
35138 false, /* isMovable. Not relevant for setters. */
35139 false, /* isEliminatable. Not relevant for setters. */
35140 false, /* isAlwaysInSlot. Only relevant for getters. */
35141 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35142 false, /* isTypedMethod. Only relevant for methods. */
35143 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35144};
35145
35146MOZ_CAN_RUN_SCRIPT static bool
35147prefable10(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35148{
35149 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35152( cx, "TestExampleInterface"
, "prefable10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35150 "TestExampleInterface", "prefable10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35152( cx, "TestExampleInterface"
, "prefable10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35151 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35152( cx, "TestExampleInterface"
, "prefable10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35152 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35152( cx, "TestExampleInterface"
, "prefable10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35153
35154 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35155 // NOTE: This assert does NOT call the function.
35156 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable10())>, "Should be returning void here");
35157 MOZ_KnownLive(self)(self)->Prefable10();
35158 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35158); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35158; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35159 args.rval().setUndefined();
35160 return true;
35161}
35162
35163static const JSJitInfo prefable10_methodinfo = {
35164 { (JSJitGetterOp)prefable10 },
35165 { prototypes::id::TestExampleInterface },
35166 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35167 JSJitInfo::Method,
35168 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35169 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35170 true, /* isInfallible. False in setters. */
35171 false, /* isMovable. Not relevant for setters. */
35172 false, /* isEliminatable. Not relevant for setters. */
35173 false, /* isAlwaysInSlot. Only relevant for getters. */
35174 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35175 false, /* isTypedMethod. Only relevant for methods. */
35176 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35177};
35178
35179MOZ_CAN_RUN_SCRIPT static bool
35180prefable11(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35181{
35182 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35185( cx, "TestExampleInterface"
, "prefable11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35183 "TestExampleInterface", "prefable11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35185( cx, "TestExampleInterface"
, "prefable11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35184 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35185( cx, "TestExampleInterface"
, "prefable11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35185 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35185( cx, "TestExampleInterface"
, "prefable11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35186
35187 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35188 // NOTE: This assert does NOT call the function.
35189 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable11())>, "Should be returning void here");
35190 MOZ_KnownLive(self)(self)->Prefable11();
35191 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35191); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35191; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35192 args.rval().setUndefined();
35193 return true;
35194}
35195
35196static const JSJitInfo prefable11_methodinfo = {
35197 { (JSJitGetterOp)prefable11 },
35198 { prototypes::id::TestExampleInterface },
35199 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35200 JSJitInfo::Method,
35201 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35202 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35203 true, /* isInfallible. False in setters. */
35204 false, /* isMovable. Not relevant for setters. */
35205 false, /* isEliminatable. Not relevant for setters. */
35206 false, /* isAlwaysInSlot. Only relevant for getters. */
35207 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35208 false, /* isTypedMethod. Only relevant for methods. */
35209 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35210};
35211
35212MOZ_CAN_RUN_SCRIPT static bool
35213get_prefable12(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35214{
35215 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35218( cx, "TestExampleInterface"
, "prefable12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35216 "TestExampleInterface", "prefable12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35218( cx, "TestExampleInterface"
, "prefable12", 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::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35218( cx, "TestExampleInterface"
, "prefable12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35218 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35218( cx, "TestExampleInterface"
, "prefable12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35219
35220 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35221 bool result(MOZ_KnownLive(self)(self)->Prefable12());
35222 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35222); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35222; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35223 args.rval().setBoolean(result);
35224 return true;
35225}
35226
35227static const JSJitInfo prefable12_getterinfo = {
35228 { get_prefable12 },
35229 { prototypes::id::TestExampleInterface },
35230 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35231 JSJitInfo::Getter,
35232 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35233 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35234 true, /* isInfallible. False in setters. */
35235 false, /* isMovable. Not relevant for setters. */
35236 false, /* isEliminatable. Not relevant for setters. */
35237 false, /* isAlwaysInSlot. Only relevant for getters. */
35238 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35239 false, /* isTypedMethod. Only relevant for methods. */
35240 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35241};
35242
35243MOZ_CAN_RUN_SCRIPT static bool
35244prefable13(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35245{
35246 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35249( cx, "TestExampleInterface"
, "prefable13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35247 "TestExampleInterface", "prefable13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35249( cx, "TestExampleInterface"
, "prefable13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35248 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35249( cx, "TestExampleInterface"
, "prefable13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35249 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35249( cx, "TestExampleInterface"
, "prefable13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35250
35251 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35252 // NOTE: This assert does NOT call the function.
35253 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable13())>, "Should be returning void here");
35254 MOZ_KnownLive(self)(self)->Prefable13();
35255 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35255); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35255; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35256 args.rval().setUndefined();
35257 return true;
35258}
35259
35260static const JSJitInfo prefable13_methodinfo = {
35261 { (JSJitGetterOp)prefable13 },
35262 { prototypes::id::TestExampleInterface },
35263 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35264 JSJitInfo::Method,
35265 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35266 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35267 true, /* isInfallible. False in setters. */
35268 false, /* isMovable. Not relevant for setters. */
35269 false, /* isEliminatable. Not relevant for setters. */
35270 false, /* isAlwaysInSlot. Only relevant for getters. */
35271 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35272 false, /* isTypedMethod. Only relevant for methods. */
35273 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35274};
35275
35276MOZ_CAN_RUN_SCRIPT static bool
35277get_prefable14(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35278{
35279 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35282( cx, "TestExampleInterface"
, "prefable14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35280 "TestExampleInterface", "prefable14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35282( cx, "TestExampleInterface"
, "prefable14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35281 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35282( cx, "TestExampleInterface"
, "prefable14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35282 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35282( cx, "TestExampleInterface"
, "prefable14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35283
35284 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35285 bool result(MOZ_KnownLive(self)(self)->Prefable14());
35286 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35286); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35286; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35287 args.rval().setBoolean(result);
35288 return true;
35289}
35290
35291static const JSJitInfo prefable14_getterinfo = {
35292 { get_prefable14 },
35293 { prototypes::id::TestExampleInterface },
35294 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35295 JSJitInfo::Getter,
35296 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35297 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35298 true, /* isInfallible. False in setters. */
35299 false, /* isMovable. Not relevant for setters. */
35300 false, /* isEliminatable. Not relevant for setters. */
35301 false, /* isAlwaysInSlot. Only relevant for getters. */
35302 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35303 false, /* isTypedMethod. Only relevant for methods. */
35304 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35305};
35306
35307MOZ_CAN_RUN_SCRIPT static bool
35308get_prefable15(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35309{
35310 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35313( cx, "TestExampleInterface"
, "prefable15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35311 "TestExampleInterface", "prefable15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35313( cx, "TestExampleInterface"
, "prefable15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35312 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35313( cx, "TestExampleInterface"
, "prefable15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35313 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35313( cx, "TestExampleInterface"
, "prefable15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35314
35315 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35316 bool result(MOZ_KnownLive(self)(self)->Prefable15());
35317 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35317); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35317; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35318 args.rval().setBoolean(result);
35319 return true;
35320}
35321
35322static const JSJitInfo prefable15_getterinfo = {
35323 { get_prefable15 },
35324 { prototypes::id::TestExampleInterface },
35325 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35326 JSJitInfo::Getter,
35327 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35328 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35329 true, /* isInfallible. False in setters. */
35330 false, /* isMovable. Not relevant for setters. */
35331 false, /* isEliminatable. Not relevant for setters. */
35332 false, /* isAlwaysInSlot. Only relevant for getters. */
35333 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35334 false, /* isTypedMethod. Only relevant for methods. */
35335 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35336};
35337
35338MOZ_CAN_RUN_SCRIPT static bool
35339get_prefable16(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35340{
35341 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35344( cx, "TestExampleInterface"
, "prefable16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35342 "TestExampleInterface", "prefable16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35344( cx, "TestExampleInterface"
, "prefable16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35343 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35344( cx, "TestExampleInterface"
, "prefable16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35344 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35344( cx, "TestExampleInterface"
, "prefable16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35345
35346 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35347 bool result(MOZ_KnownLive(self)(self)->Prefable16());
35348 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35348); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35348; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35349 args.rval().setBoolean(result);
35350 return true;
35351}
35352
35353static const JSJitInfo prefable16_getterinfo = {
35354 { get_prefable16 },
35355 { prototypes::id::TestExampleInterface },
35356 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35357 JSJitInfo::Getter,
35358 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35359 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35360 true, /* isInfallible. False in setters. */
35361 false, /* isMovable. Not relevant for setters. */
35362 false, /* isEliminatable. Not relevant for setters. */
35363 false, /* isAlwaysInSlot. Only relevant for getters. */
35364 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35365 false, /* isTypedMethod. Only relevant for methods. */
35366 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35367};
35368
35369MOZ_CAN_RUN_SCRIPT static bool
35370prefable17(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35371{
35372 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35375( cx, "TestExampleInterface"
, "prefable17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35373 "TestExampleInterface", "prefable17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35375( cx, "TestExampleInterface"
, "prefable17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35374 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35375( cx, "TestExampleInterface"
, "prefable17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35375 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35375( cx, "TestExampleInterface"
, "prefable17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35376
35377 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35378 // NOTE: This assert does NOT call the function.
35379 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable17())>, "Should be returning void here");
35380 MOZ_KnownLive(self)(self)->Prefable17();
35381 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35381); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35381; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35382 args.rval().setUndefined();
35383 return true;
35384}
35385
35386static const JSJitInfo prefable17_methodinfo = {
35387 { (JSJitGetterOp)prefable17 },
35388 { prototypes::id::TestExampleInterface },
35389 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35390 JSJitInfo::Method,
35391 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35392 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35393 true, /* isInfallible. False in setters. */
35394 false, /* isMovable. Not relevant for setters. */
35395 false, /* isEliminatable. Not relevant for setters. */
35396 false, /* isAlwaysInSlot. Only relevant for getters. */
35397 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35398 false, /* isTypedMethod. Only relevant for methods. */
35399 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35400};
35401
35402MOZ_CAN_RUN_SCRIPT static bool
35403prefable18(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35404{
35405 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35408( cx, "TestExampleInterface"
, "prefable18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35406 "TestExampleInterface", "prefable18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35408( cx, "TestExampleInterface"
, "prefable18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35407 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35408( cx, "TestExampleInterface"
, "prefable18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35408 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35408( cx, "TestExampleInterface"
, "prefable18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35409
35410 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35411 // NOTE: This assert does NOT call the function.
35412 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable18())>, "Should be returning void here");
35413 MOZ_KnownLive(self)(self)->Prefable18();
35414 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35414); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35414; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35415 args.rval().setUndefined();
35416 return true;
35417}
35418
35419static const JSJitInfo prefable18_methodinfo = {
35420 { (JSJitGetterOp)prefable18 },
35421 { prototypes::id::TestExampleInterface },
35422 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35423 JSJitInfo::Method,
35424 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35425 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35426 true, /* isInfallible. False in setters. */
35427 false, /* isMovable. Not relevant for setters. */
35428 false, /* isEliminatable. Not relevant for setters. */
35429 false, /* isAlwaysInSlot. Only relevant for getters. */
35430 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35431 false, /* isTypedMethod. Only relevant for methods. */
35432 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35433};
35434
35435MOZ_CAN_RUN_SCRIPT static bool
35436prefable19(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35437{
35438 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35441( cx, "TestExampleInterface"
, "prefable19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35439 "TestExampleInterface", "prefable19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35441( cx, "TestExampleInterface"
, "prefable19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35440 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35441( cx, "TestExampleInterface"
, "prefable19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35441 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35441( cx, "TestExampleInterface"
, "prefable19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35442
35443 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35444 // NOTE: This assert does NOT call the function.
35445 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable19())>, "Should be returning void here");
35446 MOZ_KnownLive(self)(self)->Prefable19();
35447 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35447); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35447; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35448 args.rval().setUndefined();
35449 return true;
35450}
35451
35452static const JSJitInfo prefable19_methodinfo = {
35453 { (JSJitGetterOp)prefable19 },
35454 { prototypes::id::TestExampleInterface },
35455 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35456 JSJitInfo::Method,
35457 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35458 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35459 true, /* isInfallible. False in setters. */
35460 false, /* isMovable. Not relevant for setters. */
35461 false, /* isEliminatable. Not relevant for setters. */
35462 false, /* isAlwaysInSlot. Only relevant for getters. */
35463 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35464 false, /* isTypedMethod. Only relevant for methods. */
35465 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35466};
35467
35468MOZ_CAN_RUN_SCRIPT static bool
35469prefable20(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35470{
35471 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35474( cx, "TestExampleInterface"
, "prefable20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35472 "TestExampleInterface", "prefable20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35474( cx, "TestExampleInterface"
, "prefable20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35473 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35474( cx, "TestExampleInterface"
, "prefable20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35474 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35474( cx, "TestExampleInterface"
, "prefable20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35475
35476 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35477 // NOTE: This assert does NOT call the function.
35478 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable20())>, "Should be returning void here");
35479 MOZ_KnownLive(self)(self)->Prefable20();
35480 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35480); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35480; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35481 args.rval().setUndefined();
35482 return true;
35483}
35484
35485static const JSJitInfo prefable20_methodinfo = {
35486 { (JSJitGetterOp)prefable20 },
35487 { prototypes::id::TestExampleInterface },
35488 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35489 JSJitInfo::Method,
35490 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35491 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35492 true, /* isInfallible. False in setters. */
35493 false, /* isMovable. Not relevant for setters. */
35494 false, /* isEliminatable. Not relevant for setters. */
35495 false, /* isAlwaysInSlot. Only relevant for getters. */
35496 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35497 false, /* isTypedMethod. Only relevant for methods. */
35498 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35499};
35500
35501MOZ_CAN_RUN_SCRIPT static bool
35502get_prefable21(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35503{
35504 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35507( cx, "TestExampleInterface"
, "prefable21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35505 "TestExampleInterface", "prefable21", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35507( cx, "TestExampleInterface"
, "prefable21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35506 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35507( cx, "TestExampleInterface"
, "prefable21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35507 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35507( cx, "TestExampleInterface"
, "prefable21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35508
35509 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35510 bool result(MOZ_KnownLive(self)(self)->Prefable21());
35511 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35511); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35511; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35512 args.rval().setBoolean(result);
35513 return true;
35514}
35515
35516static const JSJitInfo prefable21_getterinfo = {
35517 { get_prefable21 },
35518 { prototypes::id::TestExampleInterface },
35519 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35520 JSJitInfo::Getter,
35521 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35522 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35523 true, /* isInfallible. False in setters. */
35524 false, /* isMovable. Not relevant for setters. */
35525 false, /* isEliminatable. Not relevant for setters. */
35526 false, /* isAlwaysInSlot. Only relevant for getters. */
35527 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35528 false, /* isTypedMethod. Only relevant for methods. */
35529 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35530};
35531
35532MOZ_CAN_RUN_SCRIPT static bool
35533get_prefable22(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35534{
35535 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35538( cx, "TestExampleInterface"
, "prefable22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35536 "TestExampleInterface", "prefable22", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35538( cx, "TestExampleInterface"
, "prefable22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35537 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35538( cx, "TestExampleInterface"
, "prefable22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35538 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35538( cx, "TestExampleInterface"
, "prefable22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35539
35540 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35541 bool result(MOZ_KnownLive(self)(self)->Prefable22());
35542 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35542); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35542; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35543 args.rval().setBoolean(result);
35544 return true;
35545}
35546
35547static const JSJitInfo prefable22_getterinfo = {
35548 { get_prefable22 },
35549 { prototypes::id::TestExampleInterface },
35550 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35551 JSJitInfo::Getter,
35552 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35553 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35554 true, /* isInfallible. False in setters. */
35555 false, /* isMovable. Not relevant for setters. */
35556 false, /* isEliminatable. Not relevant for setters. */
35557 false, /* isAlwaysInSlot. Only relevant for getters. */
35558 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35559 false, /* isTypedMethod. Only relevant for methods. */
35560 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35561};
35562
35563MOZ_CAN_RUN_SCRIPT static bool
35564get_conditionalOnSecureContext1(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35565{
35566 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35569( cx, "TestExampleInterface"
, "conditionalOnSecureContext1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35567 "TestExampleInterface", "conditionalOnSecureContext1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35569( cx, "TestExampleInterface"
, "conditionalOnSecureContext1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35568 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35569( cx, "TestExampleInterface"
, "conditionalOnSecureContext1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35569 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35569( cx, "TestExampleInterface"
, "conditionalOnSecureContext1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35570
35571 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35572 bool result(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext1());
35573 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35573); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35573; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35574 args.rval().setBoolean(result);
35575 return true;
35576}
35577
35578static const JSJitInfo conditionalOnSecureContext1_getterinfo = {
35579 { get_conditionalOnSecureContext1 },
35580 { prototypes::id::TestExampleInterface },
35581 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35582 JSJitInfo::Getter,
35583 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35584 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35585 true, /* isInfallible. False in setters. */
35586 false, /* isMovable. Not relevant for setters. */
35587 false, /* isEliminatable. Not relevant for setters. */
35588 false, /* isAlwaysInSlot. Only relevant for getters. */
35589 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35590 false, /* isTypedMethod. Only relevant for methods. */
35591 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35592};
35593
35594MOZ_CAN_RUN_SCRIPT static bool
35595get_conditionalOnSecureContext2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35596{
35597 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35600( cx, "TestExampleInterface"
, "conditionalOnSecureContext2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35598 "TestExampleInterface", "conditionalOnSecureContext2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35600( cx, "TestExampleInterface"
, "conditionalOnSecureContext2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35599 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35600( cx, "TestExampleInterface"
, "conditionalOnSecureContext2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35600 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35600( cx, "TestExampleInterface"
, "conditionalOnSecureContext2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35601
35602 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35603 bool result(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext2());
35604 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35604); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35604; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35605 args.rval().setBoolean(result);
35606 return true;
35607}
35608
35609static const JSJitInfo conditionalOnSecureContext2_getterinfo = {
35610 { get_conditionalOnSecureContext2 },
35611 { prototypes::id::TestExampleInterface },
35612 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35613 JSJitInfo::Getter,
35614 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35615 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35616 true, /* isInfallible. False in setters. */
35617 false, /* isMovable. Not relevant for setters. */
35618 false, /* isEliminatable. Not relevant for setters. */
35619 false, /* isAlwaysInSlot. Only relevant for getters. */
35620 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35621 false, /* isTypedMethod. Only relevant for methods. */
35622 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35623};
35624
35625MOZ_CAN_RUN_SCRIPT static bool
35626get_conditionalOnSecureContext3(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35627{
35628 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35631( cx, "TestExampleInterface"
, "conditionalOnSecureContext3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35629 "TestExampleInterface", "conditionalOnSecureContext3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35631( cx, "TestExampleInterface"
, "conditionalOnSecureContext3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35630 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35631( cx, "TestExampleInterface"
, "conditionalOnSecureContext3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35631 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35631( cx, "TestExampleInterface"
, "conditionalOnSecureContext3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35632
35633 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35634 bool result(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext3());
35635 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35635); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35635; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35636 args.rval().setBoolean(result);
35637 return true;
35638}
35639
35640static const JSJitInfo conditionalOnSecureContext3_getterinfo = {
35641 { get_conditionalOnSecureContext3 },
35642 { prototypes::id::TestExampleInterface },
35643 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35644 JSJitInfo::Getter,
35645 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35646 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35647 true, /* isInfallible. False in setters. */
35648 false, /* isMovable. Not relevant for setters. */
35649 false, /* isEliminatable. Not relevant for setters. */
35650 false, /* isAlwaysInSlot. Only relevant for getters. */
35651 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35652 false, /* isTypedMethod. Only relevant for methods. */
35653 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35654};
35655
35656MOZ_CAN_RUN_SCRIPT static bool
35657get_conditionalOnSecureContext4(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35658{
35659 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35662( cx, "TestExampleInterface"
, "conditionalOnSecureContext4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35660 "TestExampleInterface", "conditionalOnSecureContext4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35662( cx, "TestExampleInterface"
, "conditionalOnSecureContext4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35661 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35662( cx, "TestExampleInterface"
, "conditionalOnSecureContext4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35662 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35662( cx, "TestExampleInterface"
, "conditionalOnSecureContext4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35663
35664 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35665 bool result(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext4());
35666 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35666); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35666; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35667 args.rval().setBoolean(result);
35668 return true;
35669}
35670
35671static const JSJitInfo conditionalOnSecureContext4_getterinfo = {
35672 { get_conditionalOnSecureContext4 },
35673 { prototypes::id::TestExampleInterface },
35674 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35675 JSJitInfo::Getter,
35676 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35677 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35678 true, /* isInfallible. False in setters. */
35679 false, /* isMovable. Not relevant for setters. */
35680 false, /* isEliminatable. Not relevant for setters. */
35681 false, /* isAlwaysInSlot. Only relevant for getters. */
35682 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35683 false, /* isTypedMethod. Only relevant for methods. */
35684 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35685};
35686
35687MOZ_CAN_RUN_SCRIPT static bool
35688conditionalOnSecureContext5(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35689{
35690 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35693( cx, "TestExampleInterface"
, "conditionalOnSecureContext5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35691 "TestExampleInterface", "conditionalOnSecureContext5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35693( cx, "TestExampleInterface"
, "conditionalOnSecureContext5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35692 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35693( cx, "TestExampleInterface"
, "conditionalOnSecureContext5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35693 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35693( cx, "TestExampleInterface"
, "conditionalOnSecureContext5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35694
35695 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35696 // NOTE: This assert does NOT call the function.
35697 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext5())>, "Should be returning void here");
35698 MOZ_KnownLive(self)(self)->ConditionalOnSecureContext5();
35699 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35699); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35699; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35700 args.rval().setUndefined();
35701 return true;
35702}
35703
35704static const JSJitInfo conditionalOnSecureContext5_methodinfo = {
35705 { (JSJitGetterOp)conditionalOnSecureContext5 },
35706 { prototypes::id::TestExampleInterface },
35707 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35708 JSJitInfo::Method,
35709 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35710 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35711 true, /* isInfallible. False in setters. */
35712 false, /* isMovable. Not relevant for setters. */
35713 false, /* isEliminatable. Not relevant for setters. */
35714 false, /* isAlwaysInSlot. Only relevant for getters. */
35715 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35716 false, /* isTypedMethod. Only relevant for methods. */
35717 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35718};
35719
35720MOZ_CAN_RUN_SCRIPT static bool
35721conditionalOnSecureContext6(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35722{
35723 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35726( cx, "TestExampleInterface"
, "conditionalOnSecureContext6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35724 "TestExampleInterface", "conditionalOnSecureContext6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35726( cx, "TestExampleInterface"
, "conditionalOnSecureContext6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35725 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35726( cx, "TestExampleInterface"
, "conditionalOnSecureContext6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35726 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35726( cx, "TestExampleInterface"
, "conditionalOnSecureContext6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35727
35728 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35729 // NOTE: This assert does NOT call the function.
35730 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext6())>, "Should be returning void here");
35731 MOZ_KnownLive(self)(self)->ConditionalOnSecureContext6();
35732 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35732); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35732; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35733 args.rval().setUndefined();
35734 return true;
35735}
35736
35737static const JSJitInfo conditionalOnSecureContext6_methodinfo = {
35738 { (JSJitGetterOp)conditionalOnSecureContext6 },
35739 { prototypes::id::TestExampleInterface },
35740 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35741 JSJitInfo::Method,
35742 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35743 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35744 true, /* isInfallible. False in setters. */
35745 false, /* isMovable. Not relevant for setters. */
35746 false, /* isEliminatable. Not relevant for setters. */
35747 false, /* isAlwaysInSlot. Only relevant for getters. */
35748 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35749 false, /* isTypedMethod. Only relevant for methods. */
35750 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35751};
35752
35753MOZ_CAN_RUN_SCRIPT static bool
35754conditionalOnSecureContext7(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35755{
35756 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35759( cx, "TestExampleInterface"
, "conditionalOnSecureContext7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35757 "TestExampleInterface", "conditionalOnSecureContext7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35759( cx, "TestExampleInterface"
, "conditionalOnSecureContext7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35758 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35759( cx, "TestExampleInterface"
, "conditionalOnSecureContext7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35759 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35759( cx, "TestExampleInterface"
, "conditionalOnSecureContext7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35760
35761 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35762 // NOTE: This assert does NOT call the function.
35763 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext7())>, "Should be returning void here");
35764 MOZ_KnownLive(self)(self)->ConditionalOnSecureContext7();
35765 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35765); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35765; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35766 args.rval().setUndefined();
35767 return true;
35768}
35769
35770static const JSJitInfo conditionalOnSecureContext7_methodinfo = {
35771 { (JSJitGetterOp)conditionalOnSecureContext7 },
35772 { prototypes::id::TestExampleInterface },
35773 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35774 JSJitInfo::Method,
35775 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35776 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35777 true, /* isInfallible. False in setters. */
35778 false, /* isMovable. Not relevant for setters. */
35779 false, /* isEliminatable. Not relevant for setters. */
35780 false, /* isAlwaysInSlot. Only relevant for getters. */
35781 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35782 false, /* isTypedMethod. Only relevant for methods. */
35783 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35784};
35785
35786MOZ_CAN_RUN_SCRIPT static bool
35787conditionalOnSecureContext8(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35788{
35789 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35792( cx, "TestExampleInterface"
, "conditionalOnSecureContext8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35790 "TestExampleInterface", "conditionalOnSecureContext8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35792( cx, "TestExampleInterface"
, "conditionalOnSecureContext8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35791 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35792( cx, "TestExampleInterface"
, "conditionalOnSecureContext8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35792 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35792( cx, "TestExampleInterface"
, "conditionalOnSecureContext8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35793
35794 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35795 // NOTE: This assert does NOT call the function.
35796 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext8())>, "Should be returning void here");
35797 MOZ_KnownLive(self)(self)->ConditionalOnSecureContext8();
35798 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35798); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35798; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35799 args.rval().setUndefined();
35800 return true;
35801}
35802
35803static const JSJitInfo conditionalOnSecureContext8_methodinfo = {
35804 { (JSJitGetterOp)conditionalOnSecureContext8 },
35805 { prototypes::id::TestExampleInterface },
35806 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35807 JSJitInfo::Method,
35808 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35809 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35810 true, /* isInfallible. False in setters. */
35811 false, /* isMovable. Not relevant for setters. */
35812 false, /* isEliminatable. Not relevant for setters. */
35813 false, /* isAlwaysInSlot. Only relevant for getters. */
35814 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35815 false, /* isTypedMethod. Only relevant for methods. */
35816 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35817};
35818
35819MOZ_CAN_RUN_SCRIPT static bool
35820get_conditionalOnSecureContext9(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35821{
35822 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35825( cx, "TestExampleInterface"
, "conditionalOnSecureContext9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35823 "TestExampleInterface", "conditionalOnSecureContext9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35825( cx, "TestExampleInterface"
, "conditionalOnSecureContext9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35824 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35825( cx, "TestExampleInterface"
, "conditionalOnSecureContext9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35825 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35825( cx, "TestExampleInterface"
, "conditionalOnSecureContext9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35826
35827 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35828 bool result(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext9());
35829 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35829); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35829; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35830 args.rval().setBoolean(result);
35831 return true;
35832}
35833
35834static const JSJitInfo conditionalOnSecureContext9_getterinfo = {
35835 { get_conditionalOnSecureContext9 },
35836 { prototypes::id::TestExampleInterface },
35837 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35838 JSJitInfo::Getter,
35839 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35840 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
35841 true, /* isInfallible. False in setters. */
35842 false, /* isMovable. Not relevant for setters. */
35843 false, /* isEliminatable. Not relevant for setters. */
35844 false, /* isAlwaysInSlot. Only relevant for getters. */
35845 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35846 false, /* isTypedMethod. Only relevant for methods. */
35847 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35848};
35849
35850MOZ_CAN_RUN_SCRIPT static bool
35851conditionalOnSecureContext10(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35852{
35853 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35856( cx, "TestExampleInterface"
, "conditionalOnSecureContext10", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35854 "TestExampleInterface", "conditionalOnSecureContext10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35856( cx, "TestExampleInterface"
, "conditionalOnSecureContext10", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35855 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35856( cx, "TestExampleInterface"
, "conditionalOnSecureContext10", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35856 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35856( cx, "TestExampleInterface"
, "conditionalOnSecureContext10", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35857
35858 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35859 // NOTE: This assert does NOT call the function.
35860 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext10())>, "Should be returning void here");
35861 MOZ_KnownLive(self)(self)->ConditionalOnSecureContext10();
35862 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35862); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35862; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35863 args.rval().setUndefined();
35864 return true;
35865}
35866
35867static const JSJitInfo conditionalOnSecureContext10_methodinfo = {
35868 { (JSJitGetterOp)conditionalOnSecureContext10 },
35869 { prototypes::id::TestExampleInterface },
35870 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35871 JSJitInfo::Method,
35872 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35873 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35874 true, /* isInfallible. False in setters. */
35875 false, /* isMovable. Not relevant for setters. */
35876 false, /* isEliminatable. Not relevant for setters. */
35877 false, /* isAlwaysInSlot. Only relevant for getters. */
35878 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35879 false, /* isTypedMethod. Only relevant for methods. */
35880 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35881};
35882
35883MOZ_CAN_RUN_SCRIPT static bool
35884get_attrWithLenientThis(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35885{
35886 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35889( cx, "TestExampleInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35887 "TestExampleInterface", "attrWithLenientThis", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35889( cx, "TestExampleInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35888 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35889( cx, "TestExampleInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35889 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35889( cx, "TestExampleInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35890
35891 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35892 int32_t result(MOZ_KnownLive(self)(self)->AttrWithLenientThis());
35893 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35893); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35893; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35894 args.rval().setInt32(int32_t(result));
35895 return true;
35896}
35897
35898MOZ_CAN_RUN_SCRIPT static bool
35899set_attrWithLenientThis(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
35900{
35901 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35904( cx, "TestExampleInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35902 "TestExampleInterface", "attrWithLenientThis", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35904( cx, "TestExampleInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35903 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject35904( cx, "TestExampleInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35904 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35904( cx, "TestExampleInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35905
35906 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35907 int32_t arg0;
35908 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
35909 return false;
35910 }
35911 // NOTE: This assert does NOT call the function.
35912 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAttrWithLenientThis(arg0))>, "Should be returning void here");
35913 MOZ_KnownLive(self)(self)->SetAttrWithLenientThis(arg0);
35914 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35914); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35914; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35915
35916 return true;
35917}
35918
35919static const JSJitInfo attrWithLenientThis_getterinfo = {
35920 { get_attrWithLenientThis },
35921 { prototypes::id::TestExampleInterface },
35922 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35923 JSJitInfo::Getter,
35924 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35925 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
35926 true, /* isInfallible. False in setters. */
35927 false, /* isMovable. Not relevant for setters. */
35928 false, /* isEliminatable. Not relevant for setters. */
35929 false, /* isAlwaysInSlot. Only relevant for getters. */
35930 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35931 false, /* isTypedMethod. Only relevant for methods. */
35932 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35933};
35934static const JSJitInfo attrWithLenientThis_setterinfo = {
35935 { (JSJitGetterOp)set_attrWithLenientThis },
35936 { prototypes::id::TestExampleInterface },
35937 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35938 JSJitInfo::Setter,
35939 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35940 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35941 false, /* isInfallible. False in setters. */
35942 false, /* isMovable. Not relevant for setters. */
35943 false, /* isEliminatable. Not relevant for setters. */
35944 false, /* isAlwaysInSlot. Only relevant for getters. */
35945 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35946 false, /* isTypedMethod. Only relevant for methods. */
35947 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35948};
35949
35950MOZ_CAN_RUN_SCRIPT static bool
35951get_unforgeableAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35952{
35953 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35956( cx, "TestExampleInterface"
, "unforgeableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35954 "TestExampleInterface", "unforgeableAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35956( cx, "TestExampleInterface"
, "unforgeableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35955 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35956( cx, "TestExampleInterface"
, "unforgeableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35956 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35956( cx, "TestExampleInterface"
, "unforgeableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35957
35958 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35959 int32_t result(MOZ_KnownLive(self)(self)->UnforgeableAttr());
35960 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35960); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35960; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35961 args.rval().setInt32(int32_t(result));
35962 return true;
35963}
35964
35965static const JSJitInfo unforgeableAttr_getterinfo = {
35966 { get_unforgeableAttr },
35967 { prototypes::id::TestExampleInterface },
35968 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
35969 JSJitInfo::Getter,
35970 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35971 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
35972 true, /* isInfallible. False in setters. */
35973 false, /* isMovable. Not relevant for setters. */
35974 false, /* isEliminatable. Not relevant for setters. */
35975 false, /* isAlwaysInSlot. Only relevant for getters. */
35976 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35977 false, /* isTypedMethod. Only relevant for methods. */
35978 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35979};
35980
35981MOZ_CAN_RUN_SCRIPT static bool
35982get_unforgeableAttr2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35983{
35984 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35987( cx, "TestExampleInterface"
, "unforgeableAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35985 "TestExampleInterface", "unforgeableAttr2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35987( cx, "TestExampleInterface"
, "unforgeableAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35986 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35987( cx, "TestExampleInterface"
, "unforgeableAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35987 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35987( cx, "TestExampleInterface"
, "unforgeableAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35988
35989 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
35990 int32_t result(MOZ_KnownLive(self)(self)->UnforgeableAttr2());
35991 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 35991); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35991; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35992 args.rval().setInt32(int32_t(result));
35993 return true;
35994}
35995
35996static const JSJitInfo unforgeableAttr2_getterinfo = {
35997 { get_unforgeableAttr2 },
35998 { prototypes::id::TestExampleInterface },
35999 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36000 JSJitInfo::Getter,
36001 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36002 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
36003 true, /* isInfallible. False in setters. */
36004 false, /* isMovable. Not relevant for setters. */
36005 false, /* isEliminatable. Not relevant for setters. */
36006 false, /* isAlwaysInSlot. Only relevant for getters. */
36007 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36008 false, /* isTypedMethod. Only relevant for methods. */
36009 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36010};
36011
36012MOZ_CAN_RUN_SCRIPT static bool
36013unforgeableMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36014{
36015 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36018( cx, "TestExampleInterface"
, "unforgeableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36016 "TestExampleInterface", "unforgeableMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36018( cx, "TestExampleInterface"
, "unforgeableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36017 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36018( cx, "TestExampleInterface"
, "unforgeableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36018 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36018( cx, "TestExampleInterface"
, "unforgeableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36019
36020 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36021 int32_t result(MOZ_KnownLive(self)(self)->UnforgeableMethod());
36022 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36022); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36022; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36023 args.rval().setInt32(int32_t(result));
36024 return true;
36025}
36026
36027static const JSJitInfo unforgeableMethod_methodinfo = {
36028 { (JSJitGetterOp)unforgeableMethod },
36029 { prototypes::id::TestExampleInterface },
36030 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36031 JSJitInfo::Method,
36032 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36033 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
36034 true, /* isInfallible. False in setters. */
36035 false, /* isMovable. Not relevant for setters. */
36036 false, /* isEliminatable. Not relevant for setters. */
36037 false, /* isAlwaysInSlot. Only relevant for getters. */
36038 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36039 false, /* isTypedMethod. Only relevant for methods. */
36040 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36041};
36042
36043MOZ_CAN_RUN_SCRIPT static bool
36044unforgeableMethod2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36045{
36046 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36049( cx, "TestExampleInterface"
, "unforgeableMethod2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36047 "TestExampleInterface", "unforgeableMethod2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36049( cx, "TestExampleInterface"
, "unforgeableMethod2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36048 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36049( cx, "TestExampleInterface"
, "unforgeableMethod2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36049 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36049( cx, "TestExampleInterface"
, "unforgeableMethod2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36050
36051 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36052 int32_t result(MOZ_KnownLive(self)(self)->UnforgeableMethod2());
36053 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36053); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36053; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36054 args.rval().setInt32(int32_t(result));
36055 return true;
36056}
36057
36058static const JSJitInfo unforgeableMethod2_methodinfo = {
36059 { (JSJitGetterOp)unforgeableMethod2 },
36060 { prototypes::id::TestExampleInterface },
36061 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36062 JSJitInfo::Method,
36063 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36064 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
36065 true, /* isInfallible. False in setters. */
36066 false, /* isMovable. Not relevant for setters. */
36067 false, /* isEliminatable. Not relevant for setters. */
36068 false, /* isAlwaysInSlot. Only relevant for getters. */
36069 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36070 false, /* isTypedMethod. Only relevant for methods. */
36071 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36072};
36073
36074MOZ_CAN_RUN_SCRIPT static bool
36075__stringifier(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36076{
36077 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36080( cx, "TestExampleInterface"
, "__stringifier", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36078 "TestExampleInterface", "__stringifier", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36080( cx, "TestExampleInterface"
, "__stringifier", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36079 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36080( cx, "TestExampleInterface"
, "__stringifier", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36080 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36080( cx, "TestExampleInterface"
, "__stringifier", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36081
36082 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36083 DOMString result;
36084 // NOTE: This assert does NOT call the function.
36085 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Stringify(result))>, "Should be returning void here");
36086 MOZ_KnownLive(self)(self)->Stringify(result);
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)"
, "../TestExampleGenBinding.cpp", 36087); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36087; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36088 if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
36089 return false;
36090 }
36091 return true;
36092}
36093
36094static const JSJitInfo __stringifier_methodinfo = {
36095 { (JSJitGetterOp)__stringifier },
36096 { prototypes::id::TestExampleInterface },
36097 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36098 JSJitInfo::Method,
36099 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36100 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
36101 false, /* isInfallible. False in setters. */
36102 false, /* isMovable. Not relevant for setters. */
36103 false, /* isEliminatable. Not relevant for setters. */
36104 false, /* isAlwaysInSlot. Only relevant for getters. */
36105 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36106 false, /* isTypedMethod. Only relevant for methods. */
36107 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36108};
36109
36110MOZ_CAN_RUN_SCRIPT static bool
36111passRenamedInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36112{
36113 BindingCallContext cx(cx_, "TestExampleInterface.passRenamedInterface");
36114 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36117( cx, "TestExampleInterface"
, "passRenamedInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36115 "TestExampleInterface", "passRenamedInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36117( cx, "TestExampleInterface"
, "passRenamedInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36116 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36117( cx, "TestExampleInterface"
, "passRenamedInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36117 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36117( cx, "TestExampleInterface"
, "passRenamedInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36118
36119 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36120 if (!args.requireAtLeast(cx, "TestExampleInterface.passRenamedInterface", 1)) {
36121 return false;
36122 }
36123 NonNull<nsRenamedInterface> arg0;
36124 if (args[0].isObject()) {
36125 {
36126 // Our JSContext should be in the right global to do unwrapping in.
36127 nsresult rv = UnwrapObject<prototypes::id::TestRenamedInterface, nsRenamedInterface>(args[0], arg0, cx);
36128 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
36129 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestRenamedInterface");
36130 return false;
36131 }
36132 }
36133 } else {
36134 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
36135 return false;
36136 }
36137 // NOTE: This assert does NOT call the function.
36138 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRenamedInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
36139 MOZ_KnownLive(self)(self)->PassRenamedInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
36140 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36140); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36140; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36141 args.rval().setUndefined();
36142 return true;
36143}
36144
36145static const JSJitInfo passRenamedInterface_methodinfo = {
36146 { (JSJitGetterOp)passRenamedInterface },
36147 { prototypes::id::TestExampleInterface },
36148 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36149 JSJitInfo::Method,
36150 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36151 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36152 false, /* isInfallible. False in setters. */
36153 false, /* isMovable. Not relevant for setters. */
36154 false, /* isEliminatable. Not relevant for setters. */
36155 false, /* isAlwaysInSlot. Only relevant for getters. */
36156 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36157 false, /* isTypedMethod. Only relevant for methods. */
36158 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36159};
36160
36161MOZ_CAN_RUN_SCRIPT static bool
36162get_putForwardsAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36163{
36164 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36167( cx, "TestExampleInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36165 "TestExampleInterface", "putForwardsAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36167( cx, "TestExampleInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36166 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36167( cx, "TestExampleInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36167 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36167( cx, "TestExampleInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36168
36169 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36170 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(MOZ_KnownLive(self)(self)->PutForwardsAttr()));
36171 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36171); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36171; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36172 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
36173 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36173); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 36173; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
36174 return false;
36175 }
36176 return true;
36177}
36178
36179MOZ_CAN_RUN_SCRIPT static bool
36180set_putForwardsAttr(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36181{
36182 BindingCallContext cx(cx_, "TestExampleInterface.putForwardsAttr setter");
36183 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36186( cx, "TestExampleInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36184 "TestExampleInterface", "putForwardsAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36186( cx, "TestExampleInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36185 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36186( cx, "TestExampleInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36186 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36186( cx, "TestExampleInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36187
36188 JS::Rooted<JS::Value> v(cx);
36189 if (!JS_GetProperty(cx, obj, "putForwardsAttr", &v)) {
36190 return false;
36191 }
36192
36193 if (!v.isObject()) {
36194 return cx.ThrowErrorMessage<MSG_NOT_OBJECT>("TestExampleInterface.putForwardsAttr");
36195 }
36196
36197 JS::Rooted<JSObject*> targetObj(cx, &v.toObject());
36198 return JS_SetProperty(cx, targetObj, "writableByte", args[0]);
36199}
36200
36201static const JSJitInfo putForwardsAttr_getterinfo = {
36202 { get_putForwardsAttr },
36203 { prototypes::id::TestExampleInterface },
36204 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36205 JSJitInfo::Getter,
36206 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36207 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
36208 false, /* isInfallible. False in setters. */
36209 false, /* isMovable. Not relevant for setters. */
36210 false, /* isEliminatable. Not relevant for setters. */
36211 false, /* isAlwaysInSlot. Only relevant for getters. */
36212 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36213 false, /* isTypedMethod. Only relevant for methods. */
36214 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36215};
36216static const JSJitInfo putForwardsAttr_setterinfo = {
36217 { (JSJitGetterOp)set_putForwardsAttr },
36218 { prototypes::id::TestExampleInterface },
36219 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36220 JSJitInfo::Setter,
36221 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36222 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36223 false, /* isInfallible. False in setters. */
36224 false, /* isMovable. Not relevant for setters. */
36225 false, /* isEliminatable. Not relevant for setters. */
36226 false, /* isAlwaysInSlot. Only relevant for getters. */
36227 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36228 false, /* isTypedMethod. Only relevant for methods. */
36229 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36230};
36231
36232MOZ_CAN_RUN_SCRIPT static bool
36233get_putForwardsAttr2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36234{
36235 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36238( cx, "TestExampleInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36236 "TestExampleInterface", "putForwardsAttr2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36238( cx, "TestExampleInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36237 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36238( cx, "TestExampleInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36238 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36238( cx, "TestExampleInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36239
36240 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36241 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(MOZ_KnownLive(self)(self)->PutForwardsAttr2()));
36242 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36242); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36242; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36243 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
36244 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36244); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 36244; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
36245 return false;
36246 }
36247 return true;
36248}
36249
36250MOZ_CAN_RUN_SCRIPT static bool
36251set_putForwardsAttr2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36252{
36253 BindingCallContext cx(cx_, "TestExampleInterface.putForwardsAttr2 setter");
36254 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36257( cx, "TestExampleInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36255 "TestExampleInterface", "putForwardsAttr2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36257( cx, "TestExampleInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36256 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36257( cx, "TestExampleInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36257 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36257( cx, "TestExampleInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36258
36259 JS::Rooted<JS::Value> v(cx);
36260 if (!JS_GetProperty(cx, obj, "putForwardsAttr2", &v)) {
36261 return false;
36262 }
36263
36264 if (!v.isObject()) {
36265 return cx.ThrowErrorMessage<MSG_NOT_OBJECT>("TestExampleInterface.putForwardsAttr2");
36266 }
36267
36268 JS::Rooted<JSObject*> targetObj(cx, &v.toObject());
36269 return JS_SetProperty(cx, targetObj, "writableByte", args[0]);
36270}
36271
36272static const JSJitInfo putForwardsAttr2_getterinfo = {
36273 { get_putForwardsAttr2 },
36274 { prototypes::id::TestExampleInterface },
36275 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36276 JSJitInfo::Getter,
36277 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36278 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
36279 false, /* isInfallible. False in setters. */
36280 false, /* isMovable. Not relevant for setters. */
36281 false, /* isEliminatable. Not relevant for setters. */
36282 false, /* isAlwaysInSlot. Only relevant for getters. */
36283 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36284 false, /* isTypedMethod. Only relevant for methods. */
36285 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36286};
36287static const JSJitInfo putForwardsAttr2_setterinfo = {
36288 { (JSJitGetterOp)set_putForwardsAttr2 },
36289 { prototypes::id::TestExampleInterface },
36290 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36291 JSJitInfo::Setter,
36292 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36293 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36294 false, /* isInfallible. False in setters. */
36295 false, /* isMovable. Not relevant for setters. */
36296 false, /* isEliminatable. Not relevant for setters. */
36297 false, /* isAlwaysInSlot. Only relevant for getters. */
36298 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36299 false, /* isTypedMethod. Only relevant for methods. */
36300 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36301};
36302
36303MOZ_CAN_RUN_SCRIPT static bool
36304get_putForwardsAttr3(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36305{
36306 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36309( cx, "TestExampleInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36307 "TestExampleInterface", "putForwardsAttr3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36309( cx, "TestExampleInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36308 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36309( cx, "TestExampleInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36309 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36309( cx, "TestExampleInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36310
36311 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36312 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(MOZ_KnownLive(self)(self)->PutForwardsAttr3()));
36313 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36313); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36313; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36314 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
36315 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36315); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 36315; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
36316 return false;
36317 }
36318 return true;
36319}
36320
36321MOZ_CAN_RUN_SCRIPT static bool
36322set_putForwardsAttr3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36323{
36324 BindingCallContext cx(cx_, "TestExampleInterface.putForwardsAttr3 setter");
36325 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36328( cx, "TestExampleInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36326 "TestExampleInterface", "putForwardsAttr3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36328( cx, "TestExampleInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36327 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36328( cx, "TestExampleInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36328 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36328( cx, "TestExampleInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36329
36330 JS::Rooted<JS::Value> v(cx);
36331 if (!JS_GetProperty(cx, obj, "putForwardsAttr3", &v)) {
36332 return false;
36333 }
36334
36335 if (!v.isObject()) {
36336 return cx.ThrowErrorMessage<MSG_NOT_OBJECT>("TestExampleInterface.putForwardsAttr3");
36337 }
36338
36339 JS::Rooted<JSObject*> targetObj(cx, &v.toObject());
36340 return JS_SetProperty(cx, targetObj, "writableByte", args[0]);
36341}
36342
36343static const JSJitInfo putForwardsAttr3_getterinfo = {
36344 { get_putForwardsAttr3 },
36345 { prototypes::id::TestExampleInterface },
36346 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36347 JSJitInfo::Getter,
36348 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36349 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
36350 false, /* isInfallible. False in setters. */
36351 false, /* isMovable. Not relevant for setters. */
36352 false, /* isEliminatable. Not relevant for setters. */
36353 false, /* isAlwaysInSlot. Only relevant for getters. */
36354 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36355 false, /* isTypedMethod. Only relevant for methods. */
36356 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36357};
36358static const JSJitInfo putForwardsAttr3_setterinfo = {
36359 { (JSJitGetterOp)set_putForwardsAttr3 },
36360 { prototypes::id::TestExampleInterface },
36361 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36362 JSJitInfo::Setter,
36363 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36364 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36365 false, /* isInfallible. False in setters. */
36366 false, /* isMovable. Not relevant for setters. */
36367 false, /* isEliminatable. Not relevant for setters. */
36368 false, /* isAlwaysInSlot. Only relevant for getters. */
36369 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36370 false, /* isTypedMethod. Only relevant for methods. */
36371 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36372};
36373
36374MOZ_CAN_RUN_SCRIPT static bool
36375throwingMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36376{
36377 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36380( cx, "TestExampleInterface"
, "throwingMethod", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36378 "TestExampleInterface", "throwingMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36380( cx, "TestExampleInterface"
, "throwingMethod", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36379 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36380( cx, "TestExampleInterface"
, "throwingMethod", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36380 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36380( cx, "TestExampleInterface"
, "throwingMethod", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36381
36382 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36383 FastErrorResult rv;
36384 // NOTE: This assert does NOT call the function.
36385 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ThrowingMethod(rv))>, "Should be returning void here");
36386 MOZ_KnownLive(self)(self)->ThrowingMethod(rv);
36387 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingMethod"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingMethod"
)), 0))
) {
36388 return false;
36389 }
36390 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36390); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36390; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36391 args.rval().setUndefined();
36392 return true;
36393}
36394
36395static const JSJitInfo throwingMethod_methodinfo = {
36396 { (JSJitGetterOp)throwingMethod },
36397 { prototypes::id::TestExampleInterface },
36398 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36399 JSJitInfo::Method,
36400 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36401 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36402 false, /* isInfallible. False in setters. */
36403 false, /* isMovable. Not relevant for setters. */
36404 false, /* isEliminatable. Not relevant for setters. */
36405 false, /* isAlwaysInSlot. Only relevant for getters. */
36406 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36407 false, /* isTypedMethod. Only relevant for methods. */
36408 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36409};
36410
36411MOZ_CAN_RUN_SCRIPT static bool
36412get_throwingAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36413{
36414 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36417( cx, "TestExampleInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36415 "TestExampleInterface", "throwingAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36417( cx, "TestExampleInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36416 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36417( cx, "TestExampleInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36417 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36417( cx, "TestExampleInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36418
36419 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36420 FastErrorResult rv;
36421 bool result(MOZ_KnownLive(self)(self)->GetThrowingAttr(rv));
36422 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingAttr getter"
)), 0))
) {
36423 return false;
36424 }
36425 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36425); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36425; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36426 args.rval().setBoolean(result);
36427 return true;
36428}
36429
36430MOZ_CAN_RUN_SCRIPT static bool
36431set_throwingAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36432{
36433 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36436( cx, "TestExampleInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36434 "TestExampleInterface", "throwingAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36436( cx, "TestExampleInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36435 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36436( cx, "TestExampleInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36436 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36436( cx, "TestExampleInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36437
36438 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36439 bool arg0;
36440 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
36441 return false;
36442 }
36443 FastErrorResult rv;
36444 // NOTE: This assert does NOT call the function.
36445 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetThrowingAttr(arg0, rv))>, "Should be returning void here");
36446 MOZ_KnownLive(self)(self)->SetThrowingAttr(arg0, rv);
36447 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingAttr setter"
)), 0))
) {
36448 return false;
36449 }
36450 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36450); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36450; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36451
36452 return true;
36453}
36454
36455static const JSJitInfo throwingAttr_getterinfo = {
36456 { get_throwingAttr },
36457 { prototypes::id::TestExampleInterface },
36458 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36459 JSJitInfo::Getter,
36460 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36461 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
36462 false, /* isInfallible. False in setters. */
36463 false, /* isMovable. Not relevant for setters. */
36464 false, /* isEliminatable. Not relevant for setters. */
36465 false, /* isAlwaysInSlot. Only relevant for getters. */
36466 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36467 false, /* isTypedMethod. Only relevant for methods. */
36468 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36469};
36470static const JSJitInfo throwingAttr_setterinfo = {
36471 { (JSJitGetterOp)set_throwingAttr },
36472 { prototypes::id::TestExampleInterface },
36473 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36474 JSJitInfo::Setter,
36475 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36476 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36477 false, /* isInfallible. False in setters. */
36478 false, /* isMovable. Not relevant for setters. */
36479 false, /* isEliminatable. Not relevant for setters. */
36480 false, /* isAlwaysInSlot. Only relevant for getters. */
36481 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36482 false, /* isTypedMethod. Only relevant for methods. */
36483 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36484};
36485
36486MOZ_CAN_RUN_SCRIPT static bool
36487get_throwingGetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36488{
36489 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36492( cx, "TestExampleInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36490 "TestExampleInterface", "throwingGetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36492( cx, "TestExampleInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36491 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36492( cx, "TestExampleInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36492 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36492( cx, "TestExampleInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36493
36494 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36495 FastErrorResult rv;
36496 bool result(MOZ_KnownLive(self)(self)->GetThrowingGetterAttr(rv));
36497 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingGetterAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingGetterAttr getter"
)), 0))
) {
36498 return false;
36499 }
36500 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36500); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36500; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36501 args.rval().setBoolean(result);
36502 return true;
36503}
36504
36505MOZ_CAN_RUN_SCRIPT static bool
36506set_throwingGetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36507{
36508 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36511( cx, "TestExampleInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36509 "TestExampleInterface", "throwingGetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36511( cx, "TestExampleInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36510 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36511( cx, "TestExampleInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36511 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36511( cx, "TestExampleInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36512
36513 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36514 bool arg0;
36515 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
36516 return false;
36517 }
36518 // NOTE: This assert does NOT call the function.
36519 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetThrowingGetterAttr(arg0))>, "Should be returning void here");
36520 MOZ_KnownLive(self)(self)->SetThrowingGetterAttr(arg0);
36521 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36521); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36521; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36522
36523 return true;
36524}
36525
36526static const JSJitInfo throwingGetterAttr_getterinfo = {
36527 { get_throwingGetterAttr },
36528 { prototypes::id::TestExampleInterface },
36529 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36530 JSJitInfo::Getter,
36531 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36532 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
36533 false, /* isInfallible. False in setters. */
36534 false, /* isMovable. Not relevant for setters. */
36535 false, /* isEliminatable. Not relevant for setters. */
36536 false, /* isAlwaysInSlot. Only relevant for getters. */
36537 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36538 false, /* isTypedMethod. Only relevant for methods. */
36539 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36540};
36541static const JSJitInfo throwingGetterAttr_setterinfo = {
36542 { (JSJitGetterOp)set_throwingGetterAttr },
36543 { prototypes::id::TestExampleInterface },
36544 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36545 JSJitInfo::Setter,
36546 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36547 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36548 false, /* isInfallible. False in setters. */
36549 false, /* isMovable. Not relevant for setters. */
36550 false, /* isEliminatable. Not relevant for setters. */
36551 false, /* isAlwaysInSlot. Only relevant for getters. */
36552 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36553 false, /* isTypedMethod. Only relevant for methods. */
36554 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36555};
36556
36557MOZ_CAN_RUN_SCRIPT static bool
36558get_throwingSetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36559{
36560 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36563( cx, "TestExampleInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36561 "TestExampleInterface", "throwingSetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36563( cx, "TestExampleInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36562 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36563( cx, "TestExampleInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36563 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36563( cx, "TestExampleInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36564
36565 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36566 bool result(MOZ_KnownLive(self)(self)->ThrowingSetterAttr());
36567 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36567); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36567; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36568 args.rval().setBoolean(result);
36569 return true;
36570}
36571
36572MOZ_CAN_RUN_SCRIPT static bool
36573set_throwingSetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36574{
36575 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36578( cx, "TestExampleInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36576 "TestExampleInterface", "throwingSetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36578( cx, "TestExampleInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36577 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36578( cx, "TestExampleInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36578 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36578( cx, "TestExampleInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36579
36580 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36581 bool arg0;
36582 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
36583 return false;
36584 }
36585 FastErrorResult rv;
36586 // NOTE: This assert does NOT call the function.
36587 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetThrowingSetterAttr(arg0, rv))>, "Should be returning void here");
36588 MOZ_KnownLive(self)(self)->SetThrowingSetterAttr(arg0, rv);
36589 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingSetterAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.throwingSetterAttr setter"
)), 0))
) {
36590 return false;
36591 }
36592 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36592); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36592; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36593
36594 return true;
36595}
36596
36597static const JSJitInfo throwingSetterAttr_getterinfo = {
36598 { get_throwingSetterAttr },
36599 { prototypes::id::TestExampleInterface },
36600 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36601 JSJitInfo::Getter,
36602 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36603 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
36604 true, /* isInfallible. False in setters. */
36605 false, /* isMovable. Not relevant for setters. */
36606 false, /* isEliminatable. Not relevant for setters. */
36607 false, /* isAlwaysInSlot. Only relevant for getters. */
36608 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36609 false, /* isTypedMethod. Only relevant for methods. */
36610 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36611};
36612static const JSJitInfo throwingSetterAttr_setterinfo = {
36613 { (JSJitGetterOp)set_throwingSetterAttr },
36614 { prototypes::id::TestExampleInterface },
36615 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36616 JSJitInfo::Setter,
36617 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36618 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36619 false, /* isInfallible. False in setters. */
36620 false, /* isMovable. Not relevant for setters. */
36621 false, /* isEliminatable. Not relevant for setters. */
36622 false, /* isAlwaysInSlot. Only relevant for getters. */
36623 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36624 false, /* isTypedMethod. Only relevant for methods. */
36625 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36626};
36627
36628MOZ_CAN_RUN_SCRIPT static bool
36629canOOMMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36630{
36631 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36634( cx, "TestExampleInterface"
, "canOOMMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36632 "TestExampleInterface", "canOOMMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36634( cx, "TestExampleInterface"
, "canOOMMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36633 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36634( cx, "TestExampleInterface"
, "canOOMMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36634 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36634( cx, "TestExampleInterface"
, "canOOMMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36635
36636 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36637 FastErrorResult rv;
36638 // NOTE: This assert does NOT call the function.
36639 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->CanOOMMethod(OOMReporter::From(rv)))>, "Should be returning void here");
36640 MOZ_KnownLive(self)(self)->CanOOMMethod(OOMReporter::From(rv));
36641 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMMethod"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMMethod"
)), 0))
) {
36642 return false;
36643 }
36644 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36644); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36644; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36645 args.rval().setUndefined();
36646 return true;
36647}
36648
36649static const JSJitInfo canOOMMethod_methodinfo = {
36650 { (JSJitGetterOp)canOOMMethod },
36651 { prototypes::id::TestExampleInterface },
36652 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36653 JSJitInfo::Method,
36654 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36655 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36656 false, /* isInfallible. False in setters. */
36657 false, /* isMovable. Not relevant for setters. */
36658 false, /* isEliminatable. Not relevant for setters. */
36659 false, /* isAlwaysInSlot. Only relevant for getters. */
36660 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36661 false, /* isTypedMethod. Only relevant for methods. */
36662 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36663};
36664
36665MOZ_CAN_RUN_SCRIPT static bool
36666get_canOOMAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36667{
36668 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36671( cx, "TestExampleInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36669 "TestExampleInterface", "canOOMAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36671( cx, "TestExampleInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36670 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36671( cx, "TestExampleInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36671 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36671( cx, "TestExampleInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36672
36673 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36674 FastErrorResult rv;
36675 bool result(MOZ_KnownLive(self)(self)->GetCanOOMAttr(OOMReporter::From(rv)));
36676 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMAttr getter"
)), 0))
) {
36677 return false;
36678 }
36679 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36679); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36679; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36680 args.rval().setBoolean(result);
36681 return true;
36682}
36683
36684MOZ_CAN_RUN_SCRIPT static bool
36685set_canOOMAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36686{
36687 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36690( cx, "TestExampleInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36688 "TestExampleInterface", "canOOMAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36690( cx, "TestExampleInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36689 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36690( cx, "TestExampleInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36690 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36690( cx, "TestExampleInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36691
36692 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36693 bool arg0;
36694 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
36695 return false;
36696 }
36697 FastErrorResult rv;
36698 // NOTE: This assert does NOT call the function.
36699 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetCanOOMAttr(arg0, OOMReporter::From(rv)))>, "Should be returning void here");
36700 MOZ_KnownLive(self)(self)->SetCanOOMAttr(arg0, OOMReporter::From(rv));
36701 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMAttr setter"
)), 0))
) {
36702 return false;
36703 }
36704 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36704); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36704; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36705
36706 return true;
36707}
36708
36709static const JSJitInfo canOOMAttr_getterinfo = {
36710 { get_canOOMAttr },
36711 { prototypes::id::TestExampleInterface },
36712 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36713 JSJitInfo::Getter,
36714 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36715 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
36716 false, /* isInfallible. False in setters. */
36717 false, /* isMovable. Not relevant for setters. */
36718 false, /* isEliminatable. Not relevant for setters. */
36719 false, /* isAlwaysInSlot. Only relevant for getters. */
36720 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36721 false, /* isTypedMethod. Only relevant for methods. */
36722 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36723};
36724static const JSJitInfo canOOMAttr_setterinfo = {
36725 { (JSJitGetterOp)set_canOOMAttr },
36726 { prototypes::id::TestExampleInterface },
36727 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36728 JSJitInfo::Setter,
36729 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36730 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36731 false, /* isInfallible. False in setters. */
36732 false, /* isMovable. Not relevant for setters. */
36733 false, /* isEliminatable. Not relevant for setters. */
36734 false, /* isAlwaysInSlot. Only relevant for getters. */
36735 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36736 false, /* isTypedMethod. Only relevant for methods. */
36737 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36738};
36739
36740MOZ_CAN_RUN_SCRIPT static bool
36741get_canOOMGetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36742{
36743 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36746( cx, "TestExampleInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36744 "TestExampleInterface", "canOOMGetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36746( cx, "TestExampleInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36745 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36746( cx, "TestExampleInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36746 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36746( cx, "TestExampleInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36747
36748 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36749 FastErrorResult rv;
36750 bool result(MOZ_KnownLive(self)(self)->GetCanOOMGetterAttr(OOMReporter::From(rv)));
36751 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMGetterAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMGetterAttr getter"
)), 0))
) {
36752 return false;
36753 }
36754 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36754); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36754; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36755 args.rval().setBoolean(result);
36756 return true;
36757}
36758
36759MOZ_CAN_RUN_SCRIPT static bool
36760set_canOOMGetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36761{
36762 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36765( cx, "TestExampleInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36763 "TestExampleInterface", "canOOMGetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36765( cx, "TestExampleInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36764 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36765( cx, "TestExampleInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36765 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36765( cx, "TestExampleInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36766
36767 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36768 bool arg0;
36769 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
36770 return false;
36771 }
36772 // NOTE: This assert does NOT call the function.
36773 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetCanOOMGetterAttr(arg0))>, "Should be returning void here");
36774 MOZ_KnownLive(self)(self)->SetCanOOMGetterAttr(arg0);
36775 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36775); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36775; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36776
36777 return true;
36778}
36779
36780static const JSJitInfo canOOMGetterAttr_getterinfo = {
36781 { get_canOOMGetterAttr },
36782 { prototypes::id::TestExampleInterface },
36783 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36784 JSJitInfo::Getter,
36785 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36786 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
36787 false, /* isInfallible. False in setters. */
36788 false, /* isMovable. Not relevant for setters. */
36789 false, /* isEliminatable. Not relevant for setters. */
36790 false, /* isAlwaysInSlot. Only relevant for getters. */
36791 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36792 false, /* isTypedMethod. Only relevant for methods. */
36793 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36794};
36795static const JSJitInfo canOOMGetterAttr_setterinfo = {
36796 { (JSJitGetterOp)set_canOOMGetterAttr },
36797 { prototypes::id::TestExampleInterface },
36798 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36799 JSJitInfo::Setter,
36800 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36801 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36802 false, /* isInfallible. False in setters. */
36803 false, /* isMovable. Not relevant for setters. */
36804 false, /* isEliminatable. Not relevant for setters. */
36805 false, /* isAlwaysInSlot. Only relevant for getters. */
36806 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36807 false, /* isTypedMethod. Only relevant for methods. */
36808 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36809};
36810
36811MOZ_CAN_RUN_SCRIPT static bool
36812get_canOOMSetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36813{
36814 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36817( cx, "TestExampleInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36815 "TestExampleInterface", "canOOMSetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36817( cx, "TestExampleInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36816 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36817( cx, "TestExampleInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36817 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36817( cx, "TestExampleInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36818
36819 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36820 bool result(MOZ_KnownLive(self)(self)->CanOOMSetterAttr());
36821 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36821); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36821; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36822 args.rval().setBoolean(result);
36823 return true;
36824}
36825
36826MOZ_CAN_RUN_SCRIPT static bool
36827set_canOOMSetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36828{
36829 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36832( cx, "TestExampleInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36830 "TestExampleInterface", "canOOMSetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36832( cx, "TestExampleInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36831 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36832( cx, "TestExampleInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36832 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36832( cx, "TestExampleInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36833
36834 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36835 bool arg0;
36836 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
36837 return false;
36838 }
36839 FastErrorResult rv;
36840 // NOTE: This assert does NOT call the function.
36841 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetCanOOMSetterAttr(arg0, OOMReporter::From(rv)))>, "Should be returning void here");
36842 MOZ_KnownLive(self)(self)->SetCanOOMSetterAttr(arg0, OOMReporter::From(rv));
36843 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMSetterAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleInterface.canOOMSetterAttr setter"
)), 0))
) {
36844 return false;
36845 }
36846 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36846); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36846; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36847
36848 return true;
36849}
36850
36851static const JSJitInfo canOOMSetterAttr_getterinfo = {
36852 { get_canOOMSetterAttr },
36853 { prototypes::id::TestExampleInterface },
36854 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36855 JSJitInfo::Getter,
36856 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36857 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
36858 true, /* isInfallible. False in setters. */
36859 false, /* isMovable. Not relevant for setters. */
36860 false, /* isEliminatable. Not relevant for setters. */
36861 false, /* isAlwaysInSlot. Only relevant for getters. */
36862 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36863 false, /* isTypedMethod. Only relevant for methods. */
36864 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36865};
36866static const JSJitInfo canOOMSetterAttr_setterinfo = {
36867 { (JSJitGetterOp)set_canOOMSetterAttr },
36868 { prototypes::id::TestExampleInterface },
36869 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36870 JSJitInfo::Setter,
36871 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36872 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36873 false, /* isInfallible. False in setters. */
36874 false, /* isMovable. Not relevant for setters. */
36875 false, /* isEliminatable. Not relevant for setters. */
36876 false, /* isAlwaysInSlot. Only relevant for getters. */
36877 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36878 false, /* isTypedMethod. Only relevant for methods. */
36879 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36880};
36881
36882MOZ_CAN_RUN_SCRIPT static bool
36883needsSubjectPrincipalMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36884{
36885 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36888( cx, "TestExampleInterface"
, "needsSubjectPrincipalMethod", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
36886 "TestExampleInterface", "needsSubjectPrincipalMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36888( cx, "TestExampleInterface"
, "needsSubjectPrincipalMethod", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
36887 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36888( cx, "TestExampleInterface"
, "needsSubjectPrincipalMethod", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
36888 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36888( cx, "TestExampleInterface"
, "needsSubjectPrincipalMethod", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
36889
36890 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36891 NonNull<nsIPrincipal> subjectPrincipal;
36892 {
36893 JS::Realm* realm = js::GetContextRealm(cx);
36894 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 36894); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 36894; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
36895 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
36896 nsIPrincipal* principal = nsJSPrincipals::get(principals);
36897
36898 subjectPrincipal = principal;
36899 }
36900 // NOTE: This assert does NOT call the function.
36901 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NeedsSubjectPrincipalMethod(MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal))))>, "Should be returning void here");
36902 MOZ_KnownLive(self)(self)->NeedsSubjectPrincipalMethod(MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal)));
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)"
, "../TestExampleGenBinding.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
36908static const JSJitInfo needsSubjectPrincipalMethod_methodinfo = {
36909 { (JSJitGetterOp)needsSubjectPrincipalMethod },
36910 { prototypes::id::TestExampleInterface },
36911 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36912 JSJitInfo::Method,
36913 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36914 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36915 true, /* isInfallible. False in setters. */
36916 false, /* isMovable. Not relevant for setters. */
36917 false, /* isEliminatable. Not relevant for setters. */
36918 false, /* isAlwaysInSlot. Only relevant for getters. */
36919 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36920 false, /* isTypedMethod. Only relevant for methods. */
36921 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36922};
36923
36924MOZ_CAN_RUN_SCRIPT static bool
36925get_needsSubjectPrincipalAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
36926{
36927 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36930( cx, "TestExampleInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
36928 "TestExampleInterface", "needsSubjectPrincipalAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36930( cx, "TestExampleInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
36929 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject36930( cx, "TestExampleInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
36930 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36930( cx, "TestExampleInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
36931
36932 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36933 NonNull<nsIPrincipal> subjectPrincipal;
36934 {
36935 JS::Realm* realm = js::GetContextRealm(cx);
36936 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 36936); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 36936; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
36937 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
36938 nsIPrincipal* principal = nsJSPrincipals::get(principals);
36939
36940 subjectPrincipal = principal;
36941 }
36942 bool result(MOZ_KnownLive(self)(self)->NeedsSubjectPrincipalAttr(MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal))));
36943 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36943); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36943; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36944 args.rval().setBoolean(result);
36945 return true;
36946}
36947
36948MOZ_CAN_RUN_SCRIPT static bool
36949set_needsSubjectPrincipalAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
36950{
36951 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36954( cx, "TestExampleInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
36952 "TestExampleInterface", "needsSubjectPrincipalAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36954( cx, "TestExampleInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
36953 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject36954( cx, "TestExampleInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
36954 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36954( cx, "TestExampleInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
36955
36956 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
36957 bool arg0;
36958 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
36959 return false;
36960 }
36961 NonNull<nsIPrincipal> subjectPrincipal;
36962 {
36963 JS::Realm* realm = js::GetContextRealm(cx);
36964 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 36964); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 36964; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
36965 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
36966 nsIPrincipal* principal = nsJSPrincipals::get(principals);
36967
36968 subjectPrincipal = principal;
36969 }
36970 // NOTE: This assert does NOT call the function.
36971 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNeedsSubjectPrincipalAttr(arg0, MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal))))>, "Should be returning void here");
36972 MOZ_KnownLive(self)(self)->SetNeedsSubjectPrincipalAttr(arg0, MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal)));
36973 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 36973); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36973; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36974
36975 return true;
36976}
36977
36978static const JSJitInfo needsSubjectPrincipalAttr_getterinfo = {
36979 { get_needsSubjectPrincipalAttr },
36980 { prototypes::id::TestExampleInterface },
36981 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36982 JSJitInfo::Getter,
36983 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36984 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
36985 true, /* isInfallible. False in setters. */
36986 false, /* isMovable. Not relevant for setters. */
36987 false, /* isEliminatable. Not relevant for setters. */
36988 false, /* isAlwaysInSlot. Only relevant for getters. */
36989 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36990 false, /* isTypedMethod. Only relevant for methods. */
36991 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36992};
36993static const JSJitInfo needsSubjectPrincipalAttr_setterinfo = {
36994 { (JSJitGetterOp)set_needsSubjectPrincipalAttr },
36995 { prototypes::id::TestExampleInterface },
36996 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
36997 JSJitInfo::Setter,
36998 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36999 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37000 false, /* isInfallible. False in setters. */
37001 false, /* isMovable. Not relevant for setters. */
37002 false, /* isEliminatable. Not relevant for setters. */
37003 false, /* isAlwaysInSlot. Only relevant for getters. */
37004 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37005 false, /* isTypedMethod. Only relevant for methods. */
37006 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37007};
37008
37009MOZ_CAN_RUN_SCRIPT static bool
37010needsNonSystemSubjectPrincipalMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37011{
37012 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37015( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalMethod", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37013 "TestExampleInterface", "needsNonSystemSubjectPrincipalMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37015( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalMethod", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37014 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37015( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalMethod", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37015 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37015( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalMethod", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
37016
37017 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37018 nsIPrincipal* subjectPrincipal;
37019 {
37020 JS::Realm* realm = js::GetContextRealm(cx);
37021 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 37021); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 37021; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
37022 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
37023 nsIPrincipal* principal = nsJSPrincipals::get(principals);
37024 if (principal->IsSystemPrincipal()) {
37025 principal = nullptr;
37026 }
37027
37028 subjectPrincipal = principal;
37029 }
37030 // NOTE: This assert does NOT call the function.
37031 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NeedsNonSystemSubjectPrincipalMethod(MOZ_KnownLive(subjectPrincipal)(subjectPrincipal)))>, "Should be returning void here");
37032 MOZ_KnownLive(self)(self)->NeedsNonSystemSubjectPrincipalMethod(MOZ_KnownLive(subjectPrincipal)(subjectPrincipal));
37033 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37033); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37033; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37034 args.rval().setUndefined();
37035 return true;
37036}
37037
37038static const JSJitInfo needsNonSystemSubjectPrincipalMethod_methodinfo = {
37039 { (JSJitGetterOp)needsNonSystemSubjectPrincipalMethod },
37040 { prototypes::id::TestExampleInterface },
37041 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37042 JSJitInfo::Method,
37043 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37044 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37045 true, /* isInfallible. False in setters. */
37046 false, /* isMovable. Not relevant for setters. */
37047 false, /* isEliminatable. Not relevant for setters. */
37048 false, /* isAlwaysInSlot. Only relevant for getters. */
37049 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37050 false, /* isTypedMethod. Only relevant for methods. */
37051 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37052};
37053
37054MOZ_CAN_RUN_SCRIPT static bool
37055get_needsNonSystemSubjectPrincipalAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
37056{
37057 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37060( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37058 "TestExampleInterface", "needsNonSystemSubjectPrincipalAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37060( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37059 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject37060( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37060 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37060( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
37061
37062 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37063 nsIPrincipal* subjectPrincipal;
37064 {
37065 JS::Realm* realm = js::GetContextRealm(cx);
37066 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 37066); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 37066; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
37067 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
37068 nsIPrincipal* principal = nsJSPrincipals::get(principals);
37069 if (principal->IsSystemPrincipal()) {
37070 principal = nullptr;
37071 }
37072
37073 subjectPrincipal = principal;
37074 }
37075 bool result(MOZ_KnownLive(self)(self)->NeedsNonSystemSubjectPrincipalAttr(MOZ_KnownLive(subjectPrincipal)(subjectPrincipal)));
37076 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37076); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37076; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37077 args.rval().setBoolean(result);
37078 return true;
37079}
37080
37081MOZ_CAN_RUN_SCRIPT static bool
37082set_needsNonSystemSubjectPrincipalAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
37083{
37084 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37087( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37085 "TestExampleInterface", "needsNonSystemSubjectPrincipalAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37087( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37086 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject37087( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37087 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37087( cx, "TestExampleInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
37088
37089 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37090 bool arg0;
37091 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
37092 return false;
37093 }
37094 nsIPrincipal* subjectPrincipal;
37095 {
37096 JS::Realm* realm = js::GetContextRealm(cx);
37097 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 37097); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 37097; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
37098 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
37099 nsIPrincipal* principal = nsJSPrincipals::get(principals);
37100 if (principal->IsSystemPrincipal()) {
37101 principal = nullptr;
37102 }
37103
37104 subjectPrincipal = principal;
37105 }
37106 // NOTE: This assert does NOT call the function.
37107 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNeedsNonSystemSubjectPrincipalAttr(arg0, MOZ_KnownLive(subjectPrincipal)(subjectPrincipal)))>, "Should be returning void here");
37108 MOZ_KnownLive(self)(self)->SetNeedsNonSystemSubjectPrincipalAttr(arg0, MOZ_KnownLive(subjectPrincipal)(subjectPrincipal));
37109 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37109); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37109; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37110
37111 return true;
37112}
37113
37114static const JSJitInfo needsNonSystemSubjectPrincipalAttr_getterinfo = {
37115 { get_needsNonSystemSubjectPrincipalAttr },
37116 { prototypes::id::TestExampleInterface },
37117 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37118 JSJitInfo::Getter,
37119 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37120 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
37121 true, /* isInfallible. False in setters. */
37122 false, /* isMovable. Not relevant for setters. */
37123 false, /* isEliminatable. Not relevant for setters. */
37124 false, /* isAlwaysInSlot. Only relevant for getters. */
37125 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37126 false, /* isTypedMethod. Only relevant for methods. */
37127 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37128};
37129static const JSJitInfo needsNonSystemSubjectPrincipalAttr_setterinfo = {
37130 { (JSJitGetterOp)set_needsNonSystemSubjectPrincipalAttr },
37131 { prototypes::id::TestExampleInterface },
37132 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37133 JSJitInfo::Setter,
37134 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37135 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37136 false, /* isInfallible. False in setters. */
37137 false, /* isMovable. Not relevant for setters. */
37138 false, /* isEliminatable. Not relevant for setters. */
37139 false, /* isAlwaysInSlot. Only relevant for getters. */
37140 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37141 false, /* isTypedMethod. Only relevant for methods. */
37142 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37143};
37144
37145MOZ_CAN_RUN_SCRIPT static bool
37146needsCallerTypeMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37147{
37148 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37151( cx, "TestExampleInterface"
, "needsCallerTypeMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37149 "TestExampleInterface", "needsCallerTypeMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37151( cx, "TestExampleInterface"
, "needsCallerTypeMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37150 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37151( cx, "TestExampleInterface"
, "needsCallerTypeMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37151 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37151( cx, "TestExampleInterface"
, "needsCallerTypeMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37152
37153 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37154 // NOTE: This assert does NOT call the function.
37155 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NeedsCallerTypeMethod(nsContentUtils::IsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem))>, "Should be returning void here");
37156 MOZ_KnownLive(self)(self)->NeedsCallerTypeMethod(nsContentUtils::IsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem);
37157 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37157); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37157; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37158 args.rval().setUndefined();
37159 return true;
37160}
37161
37162static const JSJitInfo needsCallerTypeMethod_methodinfo = {
37163 { (JSJitGetterOp)needsCallerTypeMethod },
37164 { prototypes::id::TestExampleInterface },
37165 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37166 JSJitInfo::Method,
37167 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37168 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37169 true, /* isInfallible. False in setters. */
37170 false, /* isMovable. Not relevant for setters. */
37171 false, /* isEliminatable. Not relevant for setters. */
37172 false, /* isAlwaysInSlot. Only relevant for getters. */
37173 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37174 false, /* isTypedMethod. Only relevant for methods. */
37175 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37176};
37177
37178MOZ_CAN_RUN_SCRIPT static bool
37179get_needsCallerTypeAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
37180{
37181 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37184( cx, "TestExampleInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37182 "TestExampleInterface", "needsCallerTypeAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37184( cx, "TestExampleInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37183 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject37184( cx, "TestExampleInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37184 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37184( cx, "TestExampleInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37185
37186 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37187 bool result(MOZ_KnownLive(self)(self)->NeedsCallerTypeAttr(nsContentUtils::IsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem));
37188 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37188); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37188; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37189 args.rval().setBoolean(result);
37190 return true;
37191}
37192
37193MOZ_CAN_RUN_SCRIPT static bool
37194set_needsCallerTypeAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
37195{
37196 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37199( cx, "TestExampleInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37197 "TestExampleInterface", "needsCallerTypeAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37199( cx, "TestExampleInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37198 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject37199( cx, "TestExampleInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37199 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37199( cx, "TestExampleInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37200
37201 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37202 bool arg0;
37203 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
37204 return false;
37205 }
37206 // NOTE: This assert does NOT call the function.
37207 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNeedsCallerTypeAttr(arg0, nsContentUtils::IsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem))>, "Should be returning void here");
37208 MOZ_KnownLive(self)(self)->SetNeedsCallerTypeAttr(arg0, nsContentUtils::IsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem);
37209 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37209); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37209; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37210
37211 return true;
37212}
37213
37214static const JSJitInfo needsCallerTypeAttr_getterinfo = {
37215 { get_needsCallerTypeAttr },
37216 { prototypes::id::TestExampleInterface },
37217 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37218 JSJitInfo::Getter,
37219 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37220 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
37221 true, /* isInfallible. False in setters. */
37222 false, /* isMovable. Not relevant for setters. */
37223 false, /* isEliminatable. Not relevant for setters. */
37224 false, /* isAlwaysInSlot. Only relevant for getters. */
37225 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37226 false, /* isTypedMethod. Only relevant for methods. */
37227 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37228};
37229static const JSJitInfo needsCallerTypeAttr_setterinfo = {
37230 { (JSJitGetterOp)set_needsCallerTypeAttr },
37231 { prototypes::id::TestExampleInterface },
37232 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37233 JSJitInfo::Setter,
37234 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37235 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37236 false, /* isInfallible. False in setters. */
37237 false, /* isMovable. Not relevant for setters. */
37238 false, /* isEliminatable. Not relevant for setters. */
37239 false, /* isAlwaysInSlot. Only relevant for getters. */
37240 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37241 false, /* isTypedMethod. Only relevant for methods. */
37242 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37243};
37244
37245MOZ_CAN_RUN_SCRIPT static bool
37246ceReactionsMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37247{
37248 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37251( cx, "TestExampleInterface"
, "ceReactionsMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37249 "TestExampleInterface", "ceReactionsMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37251( cx, "TestExampleInterface"
, "ceReactionsMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37250 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37251( cx, "TestExampleInterface"
, "ceReactionsMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37251 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37251( cx, "TestExampleInterface"
, "ceReactionsMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37252
37253 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37254 Maybe<AutoCEReaction> ceReaction;
37255 DocGroup* docGroup = self->GetDocGroup();
37256 if (docGroup) {
37257 ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx);
37258 }
37259 // NOTE: This assert does NOT call the function.
37260 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->CeReactionsMethod())>, "Should be returning void here");
37261 MOZ_KnownLive(self)(self)->CeReactionsMethod();
37262 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37262); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37262; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37263 args.rval().setUndefined();
37264 return true;
37265}
37266
37267static const JSJitInfo ceReactionsMethod_methodinfo = {
37268 { (JSJitGetterOp)ceReactionsMethod },
37269 { prototypes::id::TestExampleInterface },
37270 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37271 JSJitInfo::Method,
37272 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37273 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37274 true, /* isInfallible. False in setters. */
37275 false, /* isMovable. Not relevant for setters. */
37276 false, /* isEliminatable. Not relevant for setters. */
37277 false, /* isAlwaysInSlot. Only relevant for getters. */
37278 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37279 false, /* isTypedMethod. Only relevant for methods. */
37280 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37281};
37282
37283MOZ_CAN_RUN_SCRIPT static bool
37284ceReactionsMethodOverload(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37285{
37286 BindingCallContext cx(cx_, "TestExampleInterface.ceReactionsMethodOverload");
37287 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37290( cx, "TestExampleInterface"
, "ceReactionsMethodOverload", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37288 "TestExampleInterface", "ceReactionsMethodOverload", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37290( cx, "TestExampleInterface"
, "ceReactionsMethodOverload", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37289 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37290( cx, "TestExampleInterface"
, "ceReactionsMethodOverload", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37290 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37290( cx, "TestExampleInterface"
, "ceReactionsMethodOverload", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
37291
37292 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37293 unsigned argcount = std::min(args.length(), 1u);
37294 switch (argcount) {
37295 case 0: {
37296 Maybe<AutoCEReaction> ceReaction;
37297 DocGroup* docGroup = self->GetDocGroup();
37298 if (docGroup) {
37299 ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx);
37300 }
37301 // NOTE: This assert does NOT call the function.
37302 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->CeReactionsMethodOverload())>, "Should be returning void here");
37303 MOZ_KnownLive(self)(self)->CeReactionsMethodOverload();
37304 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37304); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37304; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37305 args.rval().setUndefined();
37306 return true;
37307 break;
37308 }
37309 case 1: {
37310 binding_detail::FakeString<char16_t> arg0;
37311 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
37312 return false;
37313 }
37314 Maybe<AutoCEReaction> ceReaction;
37315 DocGroup* docGroup = self->GetDocGroup();
37316 if (docGroup) {
37317 ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx);
37318 }
37319 // NOTE: This assert does NOT call the function.
37320 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->CeReactionsMethodOverload(NonNullHelper(Constify(arg0))))>, "Should be returning void here");
37321 MOZ_KnownLive(self)(self)->CeReactionsMethodOverload(NonNullHelper(Constify(arg0)));
37322 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37322); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37322; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37323 args.rval().setUndefined();
37324 return true;
37325 break;
37326 }
37327 default: {
37328 // Using nsPrintfCString here would require including that
37329 // header. Let's not worry about it.
37330 nsAutoCString argCountStr;
37331 argCountStr.AppendPrintf("%u", args.length());
37332 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
37333 }
37334 }
37335 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 37335); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 37335; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
37336 return false;
37337}
37338
37339static const JSJitInfo ceReactionsMethodOverload_methodinfo = {
37340 { (JSJitGetterOp)ceReactionsMethodOverload },
37341 { prototypes::id::TestExampleInterface },
37342 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37343 JSJitInfo::Method,
37344 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37345 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37346 false, /* isInfallible. False in setters. */
37347 false, /* isMovable. Not relevant for setters. */
37348 false, /* isEliminatable. Not relevant for setters. */
37349 false, /* isAlwaysInSlot. Only relevant for getters. */
37350 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37351 false, /* isTypedMethod. Only relevant for methods. */
37352 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37353};
37354
37355MOZ_CAN_RUN_SCRIPT static bool
37356get_ceReactionsAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
37357{
37358 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37361( cx, "TestExampleInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37359 "TestExampleInterface", "ceReactionsAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37361( cx, "TestExampleInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37360 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject37361( cx, "TestExampleInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37361 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37361( cx, "TestExampleInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37362
37363 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37364 bool result(MOZ_KnownLive(self)(self)->CeReactionsAttr());
37365 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37365); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37365; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37366 args.rval().setBoolean(result);
37367 return true;
37368}
37369
37370MOZ_CAN_RUN_SCRIPT static bool
37371set_ceReactionsAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
37372{
37373 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37376( cx, "TestExampleInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37374 "TestExampleInterface", "ceReactionsAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37376( cx, "TestExampleInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37375 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject37376( cx, "TestExampleInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37376 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37376( cx, "TestExampleInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37377
37378 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37379 bool arg0;
37380 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
37381 return false;
37382 }
37383 Maybe<AutoCEReaction> ceReaction;
37384 DocGroup* docGroup = self->GetDocGroup();
37385 if (docGroup) {
37386 ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx);
37387 }
37388 // NOTE: This assert does NOT call the function.
37389 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetCeReactionsAttr(arg0))>, "Should be returning void here");
37390 MOZ_KnownLive(self)(self)->SetCeReactionsAttr(arg0);
37391 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37391); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37391; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37392
37393 return true;
37394}
37395
37396static const JSJitInfo ceReactionsAttr_getterinfo = {
37397 { get_ceReactionsAttr },
37398 { prototypes::id::TestExampleInterface },
37399 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37400 JSJitInfo::Getter,
37401 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37402 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
37403 true, /* isInfallible. False in setters. */
37404 false, /* isMovable. Not relevant for setters. */
37405 false, /* isEliminatable. Not relevant for setters. */
37406 false, /* isAlwaysInSlot. Only relevant for getters. */
37407 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37408 false, /* isTypedMethod. Only relevant for methods. */
37409 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37410};
37411static const JSJitInfo ceReactionsAttr_setterinfo = {
37412 { (JSJitGetterOp)set_ceReactionsAttr },
37413 { prototypes::id::TestExampleInterface },
37414 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37415 JSJitInfo::Setter,
37416 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37417 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37418 false, /* isInfallible. False in setters. */
37419 false, /* isMovable. Not relevant for setters. */
37420 false, /* isEliminatable. Not relevant for setters. */
37421 false, /* isAlwaysInSlot. Only relevant for getters. */
37422 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37423 false, /* isTypedMethod. Only relevant for methods. */
37424 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37425};
37426
37427MOZ_CAN_RUN_SCRIPT static bool
37428passArgsWithDefaults(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37429{
37430 BindingCallContext cx(cx_, "TestExampleInterface.passArgsWithDefaults");
37431 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37434( cx, "TestExampleInterface"
, "passArgsWithDefaults", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37432 "TestExampleInterface", "passArgsWithDefaults", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37434( cx, "TestExampleInterface"
, "passArgsWithDefaults", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37433 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37434( cx, "TestExampleInterface"
, "passArgsWithDefaults", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37434 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37434( cx, "TestExampleInterface"
, "passArgsWithDefaults", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37435
37436 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37437 Optional<int32_t> arg0;
37438 if (args.hasDefined(0)) {
37439 arg0.Construct();
37440 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
37441 return false;
37442 }
37443 }
37444 mozilla::dom::TestInterface* arg1;
37445 if (args.hasDefined(1)) {
37446 if (args[1].isObject()) {
37447 {
37448 // Our JSContext should be in the right global to do unwrapping in.
37449 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[1], arg1, cx);
37450 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
37451 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 2", "TestInterface");
37452 return false;
37453 }
37454 }
37455 } else if (args[1].isNullOrUndefined()) {
37456 arg1 = nullptr;
37457 } else {
37458 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 2");
37459 return false;
37460 }
37461 } else {
37462 arg1 = nullptr;
37463 }
37464 RootedDictionary<binding_detail::FastDict> arg2(cx);
37465 if (!arg2.Init(cx, (args.hasDefined(2)) ? args[2] : JS::NullHandleValue, "Argument 3", false)) {
37466 return false;
37467 }
37468 double arg3;
37469 if (args.hasDefined(3)) {
37470 if (!ValueToPrimitive<double, eDefault>(cx, args[3], "Argument 4", &arg3)) {
37471 return false;
37472 } else if (!std::isfinite(arg3)) {
37473 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 4");
37474 return false;
37475 }
37476 } else {
37477 arg3 = 5.0;
37478 }
37479 Optional<float> arg4;
37480 if (args.hasDefined(4)) {
37481 arg4.Construct();
37482 if (!ValueToPrimitive<float, eDefault>(cx, args[4], "Argument 5", &arg4.Value())) {
37483 return false;
37484 } else if (!std::isfinite(arg4.Value())) {
37485 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 5");
37486 return false;
37487 }
37488 }
37489 // NOTE: This assert does NOT call the function.
37490 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassArgsWithDefaults(cx, Constify(arg0), MOZ_KnownLive(Constify(arg1))(Constify(arg1)), Constify(arg2), arg3, Constify(arg4)))>, "Should be returning void here");
37491 MOZ_KnownLive(self)(self)->PassArgsWithDefaults(cx, Constify(arg0), MOZ_KnownLive(Constify(arg1))(Constify(arg1)), Constify(arg2), arg3, Constify(arg4));
37492 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37492); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37492; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37493 args.rval().setUndefined();
37494 return true;
37495}
37496
37497static const JSJitInfo passArgsWithDefaults_methodinfo = {
37498 { (JSJitGetterOp)passArgsWithDefaults },
37499 { prototypes::id::TestExampleInterface },
37500 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37501 JSJitInfo::Method,
37502 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37503 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37504 false, /* isInfallible. False in setters. */
37505 false, /* isMovable. Not relevant for setters. */
37506 false, /* isEliminatable. Not relevant for setters. */
37507 false, /* isAlwaysInSlot. Only relevant for getters. */
37508 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37509 false, /* isTypedMethod. Only relevant for methods. */
37510 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37511};
37512
37513MOZ_CAN_RUN_SCRIPT static bool
37514get_toJSONShouldSkipThis(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
37515{
37516 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37519( cx, "TestExampleInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37517 "TestExampleInterface", "toJSONShouldSkipThis", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37519( cx, "TestExampleInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37518 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject37519( cx, "TestExampleInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37519 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37519( cx, "TestExampleInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37520
37521 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37522 JS::Rooted<JS::Value> result(cx);
37523 // NOTE: This assert does NOT call the function.
37524 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetToJSONShouldSkipThis(cx, &result))>, "Should be returning void here");
37525 MOZ_KnownLive(self)(self)->GetToJSONShouldSkipThis(cx, &result);
37526 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37526); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37526; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37527 JS::ExposeValueToActiveJS(result);
37528 args.rval().set(result);
37529 if (!MaybeWrapValue(cx, args.rval())) {
37530 return false;
37531 }
37532 return true;
37533}
37534
37535MOZ_CAN_RUN_SCRIPT static bool
37536set_toJSONShouldSkipThis(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
37537{
37538 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37541( cx, "TestExampleInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37539 "TestExampleInterface", "toJSONShouldSkipThis", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37541( cx, "TestExampleInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37540 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject37541( cx, "TestExampleInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37541 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37541( cx, "TestExampleInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37542
37543 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37544 JS::Rooted<JS::Value> arg0(cx);
37545 arg0 = args[0];
37546 // NOTE: This assert does NOT call the function.
37547 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis(cx, arg0))>, "Should be returning void here");
37548 MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis(cx, arg0);
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)"
, "../TestExampleGenBinding.cpp", 37549); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37549; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37550
37551 return true;
37552}
37553
37554static const JSJitInfo toJSONShouldSkipThis_getterinfo = {
37555 { get_toJSONShouldSkipThis },
37556 { prototypes::id::TestExampleInterface },
37557 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37558 JSJitInfo::Getter,
37559 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37560 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
37561 false, /* isInfallible. False in setters. */
37562 false, /* isMovable. Not relevant for setters. */
37563 false, /* isEliminatable. Not relevant for setters. */
37564 false, /* isAlwaysInSlot. Only relevant for getters. */
37565 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37566 false, /* isTypedMethod. Only relevant for methods. */
37567 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37568};
37569static const JSJitInfo toJSONShouldSkipThis_setterinfo = {
37570 { (JSJitGetterOp)set_toJSONShouldSkipThis },
37571 { prototypes::id::TestExampleInterface },
37572 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37573 JSJitInfo::Setter,
37574 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37575 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37576 false, /* isInfallible. False in setters. */
37577 false, /* isMovable. Not relevant for setters. */
37578 false, /* isEliminatable. Not relevant for setters. */
37579 false, /* isAlwaysInSlot. Only relevant for getters. */
37580 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37581 false, /* isTypedMethod. Only relevant for methods. */
37582 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37583};
37584
37585MOZ_CAN_RUN_SCRIPT static bool
37586get_toJSONShouldSkipThis2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
37587{
37588 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37591( cx, "TestExampleInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37589 "TestExampleInterface", "toJSONShouldSkipThis2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37591( cx, "TestExampleInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37590 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject37591( cx, "TestExampleInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37591 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37591( cx, "TestExampleInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37592
37593 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37594 auto result(StrongOrRawPtr<mozilla::dom::TestParentInterface>(MOZ_KnownLive(self)(self)->ToJSONShouldSkipThis2()));
37595 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37595); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37595; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37596 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
37597 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37597); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 37597; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
37598 return false;
37599 }
37600 return true;
37601}
37602
37603MOZ_CAN_RUN_SCRIPT static bool
37604set_toJSONShouldSkipThis2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
37605{
37606 BindingCallContext cx(cx_, "TestExampleInterface.toJSONShouldSkipThis2 setter");
37607 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37610( cx, "TestExampleInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37608 "TestExampleInterface", "toJSONShouldSkipThis2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37610( cx, "TestExampleInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37609 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject37610( cx, "TestExampleInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37610 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37610( cx, "TestExampleInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37611
37612 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37613 NonNull<mozilla::dom::TestParentInterface> arg0;
37614 if (args[0].isObject()) {
37615 {
37616 // Our JSContext should be in the right global to do unwrapping in.
37617 nsresult rv = UnwrapObject<prototypes::id::TestParentInterface, mozilla::dom::TestParentInterface>(args[0], arg0, cx);
37618 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
37619 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestParentInterface");
37620 return false;
37621 }
37622 }
37623 } else {
37624 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
37625 return false;
37626 }
37627 // NOTE: This assert does NOT call the function.
37628 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis2(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
37629 MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis2(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
37630 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37630); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37630; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37631
37632 return true;
37633}
37634
37635static const JSJitInfo toJSONShouldSkipThis2_getterinfo = {
37636 { get_toJSONShouldSkipThis2 },
37637 { prototypes::id::TestExampleInterface },
37638 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37639 JSJitInfo::Getter,
37640 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37641 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
37642 false, /* isInfallible. False in setters. */
37643 false, /* isMovable. Not relevant for setters. */
37644 false, /* isEliminatable. Not relevant for setters. */
37645 false, /* isAlwaysInSlot. Only relevant for getters. */
37646 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37647 false, /* isTypedMethod. Only relevant for methods. */
37648 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37649};
37650static const JSJitInfo toJSONShouldSkipThis2_setterinfo = {
37651 { (JSJitGetterOp)set_toJSONShouldSkipThis2 },
37652 { prototypes::id::TestExampleInterface },
37653 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37654 JSJitInfo::Setter,
37655 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37656 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37657 false, /* isInfallible. False in setters. */
37658 false, /* isMovable. Not relevant for setters. */
37659 false, /* isEliminatable. Not relevant for setters. */
37660 false, /* isAlwaysInSlot. Only relevant for getters. */
37661 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37662 false, /* isTypedMethod. Only relevant for methods. */
37663 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37664};
37665
37666MOZ_CAN_RUN_SCRIPT static bool
37667get_toJSONShouldSkipThis3(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
37668{
37669 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37672( cx, "TestExampleInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37670 "TestExampleInterface", "toJSONShouldSkipThis3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37672( cx, "TestExampleInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37671 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject37672( cx, "TestExampleInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37672 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37672( cx, "TestExampleInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37673
37674 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37675 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->ToJSONShouldSkipThis3()));
37676 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37676); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37676; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37677 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
37678 if (!MaybeWrapObjectValue(cx, args.rval())) {
37679 return false;
37680 }
37681 return true;
37682}
37683
37684MOZ_CAN_RUN_SCRIPT static bool
37685set_toJSONShouldSkipThis3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
37686{
37687 BindingCallContext cx(cx_, "TestExampleInterface.toJSONShouldSkipThis3 setter");
37688 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37691( cx, "TestExampleInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37689 "TestExampleInterface", "toJSONShouldSkipThis3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37691( cx, "TestExampleInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37690 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject37691( cx, "TestExampleInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37691 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37691( cx, "TestExampleInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37692
37693 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37694 RootedCallback<OwningNonNull<binding_detail::FastTestCallbackInterface>> arg0(cx);
37695 if (args[0].isObject()) {
37696 { // scope for tempRoot and tempGlobalRoot if needed
37697 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
37698 }
37699 } else {
37700 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
37701 return false;
37702 }
37703 // NOTE: This assert does NOT call the function.
37704 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0))))>, "Should be returning void here");
37705 MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)));
37706 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37706); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37706; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37707
37708 return true;
37709}
37710
37711static const JSJitInfo toJSONShouldSkipThis3_getterinfo = {
37712 { get_toJSONShouldSkipThis3 },
37713 { prototypes::id::TestExampleInterface },
37714 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37715 JSJitInfo::Getter,
37716 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37717 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
37718 false, /* isInfallible. False in setters. */
37719 false, /* isMovable. Not relevant for setters. */
37720 false, /* isEliminatable. Not relevant for setters. */
37721 false, /* isAlwaysInSlot. Only relevant for getters. */
37722 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37723 false, /* isTypedMethod. Only relevant for methods. */
37724 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37725};
37726static const JSJitInfo toJSONShouldSkipThis3_setterinfo = {
37727 { (JSJitGetterOp)set_toJSONShouldSkipThis3 },
37728 { prototypes::id::TestExampleInterface },
37729 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37730 JSJitInfo::Setter,
37731 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37732 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37733 false, /* isInfallible. False in setters. */
37734 false, /* isMovable. Not relevant for setters. */
37735 false, /* isEliminatable. Not relevant for setters. */
37736 false, /* isAlwaysInSlot. Only relevant for getters. */
37737 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37738 false, /* isTypedMethod. Only relevant for methods. */
37739 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37740};
37741
37742MOZ_CAN_RUN_SCRIPT static bool
37743get_dashed_attribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
37744{
37745 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37748( cx, "TestExampleInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37746 "TestExampleInterface", "dashed-attribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37748( cx, "TestExampleInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37747 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject37748( cx, "TestExampleInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37748 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37748( cx, "TestExampleInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37749
37750 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37751 int8_t result(MOZ_KnownLive(self)(self)->Dashed_attribute());
37752 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37752); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37752; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37753 args.rval().setInt32(int32_t(result));
37754 return true;
37755}
37756
37757MOZ_CAN_RUN_SCRIPT static bool
37758set_dashed_attribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
37759{
37760 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37763( cx, "TestExampleInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37761 "TestExampleInterface", "dashed-attribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37763( cx, "TestExampleInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37762 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject37763( cx, "TestExampleInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37763 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37763( cx, "TestExampleInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37764
37765 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37766 int8_t arg0;
37767 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
37768 return false;
37769 }
37770 // NOTE: This assert does NOT call the function.
37771 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetDashed_attribute(arg0))>, "Should be returning void here");
37772 MOZ_KnownLive(self)(self)->SetDashed_attribute(arg0);
37773 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37773); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37773; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37774
37775 return true;
37776}
37777
37778static const JSJitInfo dashed_attribute_getterinfo = {
37779 { get_dashed_attribute },
37780 { prototypes::id::TestExampleInterface },
37781 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37782 JSJitInfo::Getter,
37783 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37784 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
37785 true, /* isInfallible. False in setters. */
37786 false, /* isMovable. Not relevant for setters. */
37787 false, /* isEliminatable. Not relevant for setters. */
37788 false, /* isAlwaysInSlot. Only relevant for getters. */
37789 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37790 false, /* isTypedMethod. Only relevant for methods. */
37791 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37792};
37793static const JSJitInfo dashed_attribute_setterinfo = {
37794 { (JSJitGetterOp)set_dashed_attribute },
37795 { prototypes::id::TestExampleInterface },
37796 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37797 JSJitInfo::Setter,
37798 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37799 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37800 false, /* isInfallible. False in setters. */
37801 false, /* isMovable. Not relevant for setters. */
37802 false, /* isEliminatable. Not relevant for setters. */
37803 false, /* isAlwaysInSlot. Only relevant for getters. */
37804 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37805 false, /* isTypedMethod. Only relevant for methods. */
37806 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37807};
37808
37809MOZ_CAN_RUN_SCRIPT static bool
37810dashed_method(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37811{
37812 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37815( cx, "TestExampleInterface"
, "dashed-method", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37813 "TestExampleInterface", "dashed-method", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37815( cx, "TestExampleInterface"
, "dashed-method", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37814 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37815( cx, "TestExampleInterface"
, "dashed-method", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37815 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37815( cx, "TestExampleInterface"
, "dashed-method", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37816
37817 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37818 // NOTE: This assert does NOT call the function.
37819 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Dashed_method())>, "Should be returning void here");
37820 MOZ_KnownLive(self)(self)->Dashed_method();
37821 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37821); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37821; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37822 args.rval().setUndefined();
37823 return true;
37824}
37825
37826static const JSJitInfo dashed_method_methodinfo = {
37827 { (JSJitGetterOp)dashed_method },
37828 { prototypes::id::TestExampleInterface },
37829 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37830 JSJitInfo::Method,
37831 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37832 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37833 true, /* isInfallible. False in setters. */
37834 false, /* isMovable. Not relevant for setters. */
37835 false, /* isEliminatable. Not relevant for setters. */
37836 false, /* isAlwaysInSlot. Only relevant for getters. */
37837 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37838 false, /* isTypedMethod. Only relevant for methods. */
37839 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37840};
37841
37842MOZ_CAN_RUN_SCRIPT static bool
37843get_nonEnumerableAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
37844{
37845 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37848( cx, "TestExampleInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37846 "TestExampleInterface", "nonEnumerableAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37848( cx, "TestExampleInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37847 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject37848( cx, "TestExampleInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37848 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37848( cx, "TestExampleInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37849
37850 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37851 bool result(MOZ_KnownLive(self)(self)->NonEnumerableAttr());
37852 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37852); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37852; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37853 args.rval().setBoolean(result);
37854 return true;
37855}
37856
37857MOZ_CAN_RUN_SCRIPT static bool
37858set_nonEnumerableAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
37859{
37860 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37863( cx, "TestExampleInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37861 "TestExampleInterface", "nonEnumerableAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37863( cx, "TestExampleInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37862 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject37863( cx, "TestExampleInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37863 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37863( cx, "TestExampleInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37864
37865 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37866 bool arg0;
37867 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
37868 return false;
37869 }
37870 // NOTE: This assert does NOT call the function.
37871 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNonEnumerableAttr(arg0))>, "Should be returning void here");
37872 MOZ_KnownLive(self)(self)->SetNonEnumerableAttr(arg0);
37873 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37873); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37873; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37874
37875 return true;
37876}
37877
37878static const JSJitInfo nonEnumerableAttr_getterinfo = {
37879 { get_nonEnumerableAttr },
37880 { prototypes::id::TestExampleInterface },
37881 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37882 JSJitInfo::Getter,
37883 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37884 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
37885 true, /* isInfallible. False in setters. */
37886 false, /* isMovable. Not relevant for setters. */
37887 false, /* isEliminatable. Not relevant for setters. */
37888 false, /* isAlwaysInSlot. Only relevant for getters. */
37889 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37890 false, /* isTypedMethod. Only relevant for methods. */
37891 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37892};
37893static const JSJitInfo nonEnumerableAttr_setterinfo = {
37894 { (JSJitGetterOp)set_nonEnumerableAttr },
37895 { prototypes::id::TestExampleInterface },
37896 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37897 JSJitInfo::Setter,
37898 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37899 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37900 false, /* isInfallible. False in setters. */
37901 false, /* isMovable. Not relevant for setters. */
37902 false, /* isEliminatable. Not relevant for setters. */
37903 false, /* isAlwaysInSlot. Only relevant for getters. */
37904 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37905 false, /* isTypedMethod. Only relevant for methods. */
37906 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37907};
37908
37909MOZ_CAN_RUN_SCRIPT static bool
37910nonEnumerableMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37911{
37912 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37915( cx, "TestExampleInterface"
, "nonEnumerableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37913 "TestExampleInterface", "nonEnumerableMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37915( cx, "TestExampleInterface"
, "nonEnumerableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37914 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37915( cx, "TestExampleInterface"
, "nonEnumerableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37915 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37915( cx, "TestExampleInterface"
, "nonEnumerableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37916
37917 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37918 // NOTE: This assert does NOT call the function.
37919 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NonEnumerableMethod())>, "Should be returning void here");
37920 MOZ_KnownLive(self)(self)->NonEnumerableMethod();
37921 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37921); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37921; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37922 args.rval().setUndefined();
37923 return true;
37924}
37925
37926static const JSJitInfo nonEnumerableMethod_methodinfo = {
37927 { (JSJitGetterOp)nonEnumerableMethod },
37928 { prototypes::id::TestExampleInterface },
37929 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
37930 JSJitInfo::Method,
37931 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37932 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37933 true, /* isInfallible. False in setters. */
37934 false, /* isMovable. Not relevant for setters. */
37935 false, /* isEliminatable. Not relevant for setters. */
37936 false, /* isAlwaysInSlot. Only relevant for getters. */
37937 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37938 false, /* isTypedMethod. Only relevant for methods. */
37939 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37940};
37941
37942MOZ_CAN_RUN_SCRIPT static bool
37943get_allowSharedArrayBufferViewTypedef(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
37944{
37945 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37948( cx, "TestExampleInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37946 "TestExampleInterface", "allowSharedArrayBufferViewTypedef", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37948( cx, "TestExampleInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37947 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject37948( cx, "TestExampleInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37948 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37948( cx, "TestExampleInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
37949
37950 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37951 JS::Rooted<JSObject*> result(cx);
37952 // NOTE: This assert does NOT call the function.
37953 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedArrayBufferViewTypedef(cx, &result))>, "Should be returning void here");
37954 MOZ_KnownLive(self)(self)->GetAllowSharedArrayBufferViewTypedef(cx, &result);
37955 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37955); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37955; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37956 JS::ExposeObjectToActiveJS(result);
37957 args.rval().setObject(*result);
37958 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
37959 return false;
37960 }
37961 return true;
37962}
37963
37964MOZ_CAN_RUN_SCRIPT static bool
37965set_allowSharedArrayBufferViewTypedef(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
37966{
37967 BindingCallContext cx(cx_, "TestExampleInterface.allowSharedArrayBufferViewTypedef setter");
37968 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37971( cx, "TestExampleInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37969 "TestExampleInterface", "allowSharedArrayBufferViewTypedef", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37971( cx, "TestExampleInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37970 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject37971( cx, "TestExampleInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
37971 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37971( cx, "TestExampleInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
37972
37973 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
37974 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
37975 if (args[0].isObject()) {
37976 if (!arg0.Init(&args[0].toObject())) {
37977 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBufferView");
37978 return false;
37979 }
37980 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
37981 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
37982 return false;
37983 }
37984 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
37985 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
37986 return false;
37987 }
37988 } else {
37989 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
37990 return false;
37991 }
37992 // NOTE: This assert does NOT call the function.
37993 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedArrayBufferViewTypedef(Constify(arg0)))>, "Should be returning void here");
37994 MOZ_KnownLive(self)(self)->SetAllowSharedArrayBufferViewTypedef(Constify(arg0));
37995 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 37995); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37995; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37996
37997 return true;
37998}
37999
38000static const JSJitInfo allowSharedArrayBufferViewTypedef_getterinfo = {
38001 { get_allowSharedArrayBufferViewTypedef },
38002 { prototypes::id::TestExampleInterface },
38003 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38004 JSJitInfo::Getter,
38005 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38006 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
38007 false, /* isInfallible. False in setters. */
38008 false, /* isMovable. Not relevant for setters. */
38009 false, /* isEliminatable. Not relevant for setters. */
38010 false, /* isAlwaysInSlot. Only relevant for getters. */
38011 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38012 false, /* isTypedMethod. Only relevant for methods. */
38013 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38014};
38015static const JSJitInfo allowSharedArrayBufferViewTypedef_setterinfo = {
38016 { (JSJitGetterOp)set_allowSharedArrayBufferViewTypedef },
38017 { prototypes::id::TestExampleInterface },
38018 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38019 JSJitInfo::Setter,
38020 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38021 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38022 false, /* isInfallible. False in setters. */
38023 false, /* isMovable. Not relevant for setters. */
38024 false, /* isEliminatable. Not relevant for setters. */
38025 false, /* isAlwaysInSlot. Only relevant for getters. */
38026 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38027 false, /* isTypedMethod. Only relevant for methods. */
38028 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38029};
38030
38031MOZ_CAN_RUN_SCRIPT static bool
38032get_allowSharedArrayBufferView(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38033{
38034 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38037( cx, "TestExampleInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38035 "TestExampleInterface", "allowSharedArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38037( cx, "TestExampleInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38036 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38037( cx, "TestExampleInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38037 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38037( cx, "TestExampleInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38038
38039 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38040 JS::Rooted<JSObject*> result(cx);
38041 // NOTE: This assert does NOT call the function.
38042 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedArrayBufferView(cx, &result))>, "Should be returning void here");
38043 MOZ_KnownLive(self)(self)->GetAllowSharedArrayBufferView(cx, &result);
38044 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38044); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38044; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38045 JS::ExposeObjectToActiveJS(result);
38046 args.rval().setObject(*result);
38047 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
38048 return false;
38049 }
38050 return true;
38051}
38052
38053MOZ_CAN_RUN_SCRIPT static bool
38054set_allowSharedArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
38055{
38056 BindingCallContext cx(cx_, "TestExampleInterface.allowSharedArrayBufferView setter");
38057 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38060( cx, "TestExampleInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38058 "TestExampleInterface", "allowSharedArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38060( cx, "TestExampleInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38059 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject38060( cx, "TestExampleInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38060 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38060( cx, "TestExampleInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38061
38062 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38063 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
38064 if (args[0].isObject()) {
38065 if (!arg0.Init(&args[0].toObject())) {
38066 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBufferView");
38067 return false;
38068 }
38069 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
38070 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
38071 return false;
38072 }
38073 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
38074 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
38075 return false;
38076 }
38077 } else {
38078 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
38079 return false;
38080 }
38081 // NOTE: This assert does NOT call the function.
38082 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedArrayBufferView(Constify(arg0)))>, "Should be returning void here");
38083 MOZ_KnownLive(self)(self)->SetAllowSharedArrayBufferView(Constify(arg0));
38084 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38084); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38084; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38085
38086 return true;
38087}
38088
38089static const JSJitInfo allowSharedArrayBufferView_getterinfo = {
38090 { get_allowSharedArrayBufferView },
38091 { prototypes::id::TestExampleInterface },
38092 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38093 JSJitInfo::Getter,
38094 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38095 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
38096 false, /* isInfallible. False in setters. */
38097 false, /* isMovable. Not relevant for setters. */
38098 false, /* isEliminatable. Not relevant for setters. */
38099 false, /* isAlwaysInSlot. Only relevant for getters. */
38100 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38101 false, /* isTypedMethod. Only relevant for methods. */
38102 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38103};
38104static const JSJitInfo allowSharedArrayBufferView_setterinfo = {
38105 { (JSJitGetterOp)set_allowSharedArrayBufferView },
38106 { prototypes::id::TestExampleInterface },
38107 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38108 JSJitInfo::Setter,
38109 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38110 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38111 false, /* isInfallible. False in setters. */
38112 false, /* isMovable. Not relevant for setters. */
38113 false, /* isEliminatable. Not relevant for setters. */
38114 false, /* isAlwaysInSlot. Only relevant for getters. */
38115 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38116 false, /* isTypedMethod. Only relevant for methods. */
38117 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38118};
38119
38120MOZ_CAN_RUN_SCRIPT static bool
38121get_allowSharedNullableArrayBufferView(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38122{
38123 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38126( cx, "TestExampleInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38124 "TestExampleInterface", "allowSharedNullableArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38126( cx, "TestExampleInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38125 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38126( cx, "TestExampleInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38126 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38126( cx, "TestExampleInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38127
38128 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38129 JS::Rooted<JSObject*> result(cx);
38130 // NOTE: This assert does NOT call the function.
38131 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedNullableArrayBufferView(cx, &result))>, "Should be returning void here");
38132 MOZ_KnownLive(self)(self)->GetAllowSharedNullableArrayBufferView(cx, &result);
38133 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38133); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38133; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38134 if (result) {
38135 JS::ExposeObjectToActiveJS(result);
38136 }
38137 args.rval().setObjectOrNull(result);
38138 if (!MaybeWrapNonDOMObjectOrNullValue(cx, args.rval())) {
38139 return false;
38140 }
38141 return true;
38142}
38143
38144MOZ_CAN_RUN_SCRIPT static bool
38145set_allowSharedNullableArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
38146{
38147 BindingCallContext cx(cx_, "TestExampleInterface.allowSharedNullableArrayBufferView setter");
38148 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38151( cx, "TestExampleInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38149 "TestExampleInterface", "allowSharedNullableArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38151( cx, "TestExampleInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38150 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject38151( cx, "TestExampleInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38151 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38151( cx, "TestExampleInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38152
38153 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38154 RootedSpiderMonkeyInterface<Nullable<ArrayBufferView>> arg0(cx);
38155 if (args[0].isObject()) {
38156 if (!arg0.SetValue().Init(&args[0].toObject())) {
38157 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBufferViewOrNull");
38158 return false;
38159 }
38160 if (JS::IsLargeArrayBufferView(arg0.SetValue().Obj())) {
38161 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
38162 return false;
38163 }
38164 if (JS::IsResizableArrayBufferView(arg0.SetValue().Obj())) {
38165 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
38166 return false;
38167 }
38168 } else if (args[0].isNullOrUndefined()) {
38169 arg0.SetNull();
38170 } else {
38171 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
38172 return false;
38173 }
38174 // NOTE: This assert does NOT call the function.
38175 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedNullableArrayBufferView(Constify(arg0)))>, "Should be returning void here");
38176 MOZ_KnownLive(self)(self)->SetAllowSharedNullableArrayBufferView(Constify(arg0));
38177 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38177); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38177; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38178
38179 return true;
38180}
38181
38182static const JSJitInfo allowSharedNullableArrayBufferView_getterinfo = {
38183 { get_allowSharedNullableArrayBufferView },
38184 { prototypes::id::TestExampleInterface },
38185 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38186 JSJitInfo::Getter,
38187 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38188 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
38189 false, /* isInfallible. False in setters. */
38190 false, /* isMovable. Not relevant for setters. */
38191 false, /* isEliminatable. Not relevant for setters. */
38192 false, /* isAlwaysInSlot. Only relevant for getters. */
38193 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38194 false, /* isTypedMethod. Only relevant for methods. */
38195 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38196};
38197static const JSJitInfo allowSharedNullableArrayBufferView_setterinfo = {
38198 { (JSJitGetterOp)set_allowSharedNullableArrayBufferView },
38199 { prototypes::id::TestExampleInterface },
38200 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38201 JSJitInfo::Setter,
38202 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38203 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38204 false, /* isInfallible. False in setters. */
38205 false, /* isMovable. Not relevant for setters. */
38206 false, /* isEliminatable. Not relevant for setters. */
38207 false, /* isAlwaysInSlot. Only relevant for getters. */
38208 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38209 false, /* isTypedMethod. Only relevant for methods. */
38210 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38211};
38212
38213MOZ_CAN_RUN_SCRIPT static bool
38214get_allowSharedArrayBuffer(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38215{
38216 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38219( cx, "TestExampleInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38217 "TestExampleInterface", "allowSharedArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38219( cx, "TestExampleInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38218 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38219( cx, "TestExampleInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38219 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38219( cx, "TestExampleInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
38220
38221 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38222 JS::Rooted<JSObject*> result(cx);
38223 // NOTE: This assert does NOT call the function.
38224 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedArrayBuffer(cx, &result))>, "Should be returning void here");
38225 MOZ_KnownLive(self)(self)->GetAllowSharedArrayBuffer(cx, &result);
38226 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38226); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38226; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38227 JS::ExposeObjectToActiveJS(result);
38228 args.rval().setObject(*result);
38229 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
38230 return false;
38231 }
38232 return true;
38233}
38234
38235MOZ_CAN_RUN_SCRIPT static bool
38236set_allowSharedArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
38237{
38238 BindingCallContext cx(cx_, "TestExampleInterface.allowSharedArrayBuffer setter");
38239 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38242( cx, "TestExampleInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38240 "TestExampleInterface", "allowSharedArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38242( cx, "TestExampleInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38241 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject38242( cx, "TestExampleInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38242 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38242( cx, "TestExampleInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
38243
38244 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38245 RootedSpiderMonkeyInterface<ArrayBuffer> arg0(cx);
38246 if (args[0].isObject()) {
38247 if (!arg0.Init(&args[0].toObject())) {
38248 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBuffer");
38249 return false;
38250 }
38251 if (JS::IsLargeArrayBufferMaybeShared(arg0.Obj())) {
38252 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
38253 return false;
38254 }
38255 if (JS::IsResizableArrayBufferMaybeShared(arg0.Obj())) {
38256 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
38257 return false;
38258 }
38259 } else {
38260 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
38261 return false;
38262 }
38263 // NOTE: This assert does NOT call the function.
38264 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedArrayBuffer(Constify(arg0)))>, "Should be returning void here");
38265 MOZ_KnownLive(self)(self)->SetAllowSharedArrayBuffer(Constify(arg0));
38266 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38266); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38266; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38267
38268 return true;
38269}
38270
38271static const JSJitInfo allowSharedArrayBuffer_getterinfo = {
38272 { get_allowSharedArrayBuffer },
38273 { prototypes::id::TestExampleInterface },
38274 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38275 JSJitInfo::Getter,
38276 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38277 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
38278 false, /* isInfallible. False in setters. */
38279 false, /* isMovable. Not relevant for setters. */
38280 false, /* isEliminatable. Not relevant for setters. */
38281 false, /* isAlwaysInSlot. Only relevant for getters. */
38282 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38283 false, /* isTypedMethod. Only relevant for methods. */
38284 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38285};
38286static const JSJitInfo allowSharedArrayBuffer_setterinfo = {
38287 { (JSJitGetterOp)set_allowSharedArrayBuffer },
38288 { prototypes::id::TestExampleInterface },
38289 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38290 JSJitInfo::Setter,
38291 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38292 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38293 false, /* isInfallible. False in setters. */
38294 false, /* isMovable. Not relevant for setters. */
38295 false, /* isEliminatable. Not relevant for setters. */
38296 false, /* isAlwaysInSlot. Only relevant for getters. */
38297 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38298 false, /* isTypedMethod. Only relevant for methods. */
38299 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38300};
38301
38302MOZ_CAN_RUN_SCRIPT static bool
38303get_allowSharedNullableArrayBuffer(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38304{
38305 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38308( cx, "TestExampleInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38306 "TestExampleInterface", "allowSharedNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38308( cx, "TestExampleInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38307 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38308( cx, "TestExampleInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38308 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38308( cx, "TestExampleInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38309
38310 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38311 JS::Rooted<JSObject*> result(cx);
38312 // NOTE: This assert does NOT call the function.
38313 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedNullableArrayBuffer(cx, &result))>, "Should be returning void here");
38314 MOZ_KnownLive(self)(self)->GetAllowSharedNullableArrayBuffer(cx, &result);
38315 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38315); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38315; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38316 if (result) {
38317 JS::ExposeObjectToActiveJS(result);
38318 }
38319 args.rval().setObjectOrNull(result);
38320 if (!MaybeWrapNonDOMObjectOrNullValue(cx, args.rval())) {
38321 return false;
38322 }
38323 return true;
38324}
38325
38326MOZ_CAN_RUN_SCRIPT static bool
38327set_allowSharedNullableArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
38328{
38329 BindingCallContext cx(cx_, "TestExampleInterface.allowSharedNullableArrayBuffer setter");
38330 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38333( cx, "TestExampleInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38331 "TestExampleInterface", "allowSharedNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38333( cx, "TestExampleInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38332 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject38333( cx, "TestExampleInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38333 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38333( cx, "TestExampleInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38334
38335 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38336 RootedSpiderMonkeyInterface<Nullable<ArrayBuffer>> arg0(cx);
38337 if (args[0].isObject()) {
38338 if (!arg0.SetValue().Init(&args[0].toObject())) {
38339 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBufferOrNull");
38340 return false;
38341 }
38342 if (JS::IsLargeArrayBufferMaybeShared(arg0.SetValue().Obj())) {
38343 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
38344 return false;
38345 }
38346 if (JS::IsResizableArrayBufferMaybeShared(arg0.SetValue().Obj())) {
38347 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
38348 return false;
38349 }
38350 } else if (args[0].isNullOrUndefined()) {
38351 arg0.SetNull();
38352 } else {
38353 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
38354 return false;
38355 }
38356 // NOTE: This assert does NOT call the function.
38357 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedNullableArrayBuffer(Constify(arg0)))>, "Should be returning void here");
38358 MOZ_KnownLive(self)(self)->SetAllowSharedNullableArrayBuffer(Constify(arg0));
38359 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38359); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38359; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38360
38361 return true;
38362}
38363
38364static const JSJitInfo allowSharedNullableArrayBuffer_getterinfo = {
38365 { get_allowSharedNullableArrayBuffer },
38366 { prototypes::id::TestExampleInterface },
38367 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38368 JSJitInfo::Getter,
38369 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38370 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
38371 false, /* isInfallible. False in setters. */
38372 false, /* isMovable. Not relevant for setters. */
38373 false, /* isEliminatable. Not relevant for setters. */
38374 false, /* isAlwaysInSlot. Only relevant for getters. */
38375 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38376 false, /* isTypedMethod. Only relevant for methods. */
38377 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38378};
38379static const JSJitInfo allowSharedNullableArrayBuffer_setterinfo = {
38380 { (JSJitGetterOp)set_allowSharedNullableArrayBuffer },
38381 { prototypes::id::TestExampleInterface },
38382 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38383 JSJitInfo::Setter,
38384 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38385 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38386 false, /* isInfallible. False in setters. */
38387 false, /* isMovable. Not relevant for setters. */
38388 false, /* isEliminatable. Not relevant for setters. */
38389 false, /* isAlwaysInSlot. Only relevant for getters. */
38390 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38391 false, /* isTypedMethod. Only relevant for methods. */
38392 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38393};
38394
38395MOZ_CAN_RUN_SCRIPT static bool
38396passAllowSharedArrayBufferViewTypedef(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38397{
38398 BindingCallContext cx(cx_, "TestExampleInterface.passAllowSharedArrayBufferViewTypedef");
38399 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38402( cx, "TestExampleInterface"
, "passAllowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38400 "TestExampleInterface", "passAllowSharedArrayBufferViewTypedef", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38402( cx, "TestExampleInterface"
, "passAllowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38401 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38402( cx, "TestExampleInterface"
, "passAllowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38402 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38402( cx, "TestExampleInterface"
, "passAllowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38403
38404 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38405 if (!args.requireAtLeast(cx, "TestExampleInterface.passAllowSharedArrayBufferViewTypedef", 1)) {
38406 return false;
38407 }
38408 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
38409 if (args[0].isObject()) {
38410 if (!arg0.Init(&args[0].toObject())) {
38411 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferView");
38412 return false;
38413 }
38414 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
38415 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
38416 return false;
38417 }
38418 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
38419 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
38420 return false;
38421 }
38422 } else {
38423 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
38424 return false;
38425 }
38426 // NOTE: This assert does NOT call the function.
38427 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedArrayBufferViewTypedef(Constify(arg0)))>, "Should be returning void here");
38428 MOZ_KnownLive(self)(self)->PassAllowSharedArrayBufferViewTypedef(Constify(arg0));
38429 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38429); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38429; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38430 args.rval().setUndefined();
38431 return true;
38432}
38433
38434static const JSJitInfo passAllowSharedArrayBufferViewTypedef_methodinfo = {
38435 { (JSJitGetterOp)passAllowSharedArrayBufferViewTypedef },
38436 { prototypes::id::TestExampleInterface },
38437 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38438 JSJitInfo::Method,
38439 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38440 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38441 false, /* isInfallible. False in setters. */
38442 false, /* isMovable. Not relevant for setters. */
38443 false, /* isEliminatable. Not relevant for setters. */
38444 false, /* isAlwaysInSlot. Only relevant for getters. */
38445 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38446 false, /* isTypedMethod. Only relevant for methods. */
38447 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38448};
38449
38450MOZ_CAN_RUN_SCRIPT static bool
38451passAllowSharedArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38452{
38453 BindingCallContext cx(cx_, "TestExampleInterface.passAllowSharedArrayBufferView");
38454 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38457( cx, "TestExampleInterface"
, "passAllowSharedArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38455 "TestExampleInterface", "passAllowSharedArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38457( cx, "TestExampleInterface"
, "passAllowSharedArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38456 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38457( cx, "TestExampleInterface"
, "passAllowSharedArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38457 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38457( cx, "TestExampleInterface"
, "passAllowSharedArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38458
38459 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38460 if (!args.requireAtLeast(cx, "TestExampleInterface.passAllowSharedArrayBufferView", 1)) {
38461 return false;
38462 }
38463 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
38464 if (args[0].isObject()) {
38465 if (!arg0.Init(&args[0].toObject())) {
38466 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferView");
38467 return false;
38468 }
38469 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
38470 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
38471 return false;
38472 }
38473 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
38474 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
38475 return false;
38476 }
38477 } else {
38478 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
38479 return false;
38480 }
38481 // NOTE: This assert does NOT call the function.
38482 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedArrayBufferView(Constify(arg0)))>, "Should be returning void here");
38483 MOZ_KnownLive(self)(self)->PassAllowSharedArrayBufferView(Constify(arg0));
38484 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38484); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38484; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38485 args.rval().setUndefined();
38486 return true;
38487}
38488
38489static const JSJitInfo passAllowSharedArrayBufferView_methodinfo = {
38490 { (JSJitGetterOp)passAllowSharedArrayBufferView },
38491 { prototypes::id::TestExampleInterface },
38492 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38493 JSJitInfo::Method,
38494 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38495 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38496 false, /* isInfallible. False in setters. */
38497 false, /* isMovable. Not relevant for setters. */
38498 false, /* isEliminatable. Not relevant for setters. */
38499 false, /* isAlwaysInSlot. Only relevant for getters. */
38500 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38501 false, /* isTypedMethod. Only relevant for methods. */
38502 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38503};
38504
38505MOZ_CAN_RUN_SCRIPT static bool
38506passAllowSharedNullableArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38507{
38508 BindingCallContext cx(cx_, "TestExampleInterface.passAllowSharedNullableArrayBufferView");
38509 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38512( cx, "TestExampleInterface"
, "passAllowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38510 "TestExampleInterface", "passAllowSharedNullableArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38512( cx, "TestExampleInterface"
, "passAllowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38511 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38512( cx, "TestExampleInterface"
, "passAllowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38512 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38512( cx, "TestExampleInterface"
, "passAllowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38513
38514 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38515 if (!args.requireAtLeast(cx, "TestExampleInterface.passAllowSharedNullableArrayBufferView", 1)) {
38516 return false;
38517 }
38518 RootedSpiderMonkeyInterface<Nullable<ArrayBufferView>> arg0(cx);
38519 if (args[0].isObject()) {
38520 if (!arg0.SetValue().Init(&args[0].toObject())) {
38521 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferViewOrNull");
38522 return false;
38523 }
38524 if (JS::IsLargeArrayBufferView(arg0.SetValue().Obj())) {
38525 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
38526 return false;
38527 }
38528 if (JS::IsResizableArrayBufferView(arg0.SetValue().Obj())) {
38529 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
38530 return false;
38531 }
38532 } else if (args[0].isNullOrUndefined()) {
38533 arg0.SetNull();
38534 } else {
38535 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
38536 return false;
38537 }
38538 // NOTE: This assert does NOT call the function.
38539 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedNullableArrayBufferView(Constify(arg0)))>, "Should be returning void here");
38540 MOZ_KnownLive(self)(self)->PassAllowSharedNullableArrayBufferView(Constify(arg0));
38541 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38541); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38541; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38542 args.rval().setUndefined();
38543 return true;
38544}
38545
38546static const JSJitInfo passAllowSharedNullableArrayBufferView_methodinfo = {
38547 { (JSJitGetterOp)passAllowSharedNullableArrayBufferView },
38548 { prototypes::id::TestExampleInterface },
38549 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38550 JSJitInfo::Method,
38551 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38552 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38553 false, /* isInfallible. False in setters. */
38554 false, /* isMovable. Not relevant for setters. */
38555 false, /* isEliminatable. Not relevant for setters. */
38556 false, /* isAlwaysInSlot. Only relevant for getters. */
38557 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38558 false, /* isTypedMethod. Only relevant for methods. */
38559 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38560};
38561
38562MOZ_CAN_RUN_SCRIPT static bool
38563passAllowSharedArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38564{
38565 BindingCallContext cx(cx_, "TestExampleInterface.passAllowSharedArrayBuffer");
38566 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38569( cx, "TestExampleInterface"
, "passAllowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38567 "TestExampleInterface", "passAllowSharedArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38569( cx, "TestExampleInterface"
, "passAllowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38568 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38569( cx, "TestExampleInterface"
, "passAllowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38569 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38569( cx, "TestExampleInterface"
, "passAllowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38570
38571 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38572 if (!args.requireAtLeast(cx, "TestExampleInterface.passAllowSharedArrayBuffer", 1)) {
38573 return false;
38574 }
38575 RootedSpiderMonkeyInterface<ArrayBuffer> arg0(cx);
38576 if (args[0].isObject()) {
38577 if (!arg0.Init(&args[0].toObject())) {
38578 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBuffer");
38579 return false;
38580 }
38581 if (JS::IsLargeArrayBufferMaybeShared(arg0.Obj())) {
38582 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
38583 return false;
38584 }
38585 if (JS::IsResizableArrayBufferMaybeShared(arg0.Obj())) {
38586 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
38587 return false;
38588 }
38589 } else {
38590 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
38591 return false;
38592 }
38593 // NOTE: This assert does NOT call the function.
38594 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedArrayBuffer(Constify(arg0)))>, "Should be returning void here");
38595 MOZ_KnownLive(self)(self)->PassAllowSharedArrayBuffer(Constify(arg0));
38596 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38596); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38596; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38597 args.rval().setUndefined();
38598 return true;
38599}
38600
38601static const JSJitInfo passAllowSharedArrayBuffer_methodinfo = {
38602 { (JSJitGetterOp)passAllowSharedArrayBuffer },
38603 { prototypes::id::TestExampleInterface },
38604 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38605 JSJitInfo::Method,
38606 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38607 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38608 false, /* isInfallible. False in setters. */
38609 false, /* isMovable. Not relevant for setters. */
38610 false, /* isEliminatable. Not relevant for setters. */
38611 false, /* isAlwaysInSlot. Only relevant for getters. */
38612 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38613 false, /* isTypedMethod. Only relevant for methods. */
38614 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38615};
38616
38617MOZ_CAN_RUN_SCRIPT static bool
38618passAllowSharedNullableArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38619{
38620 BindingCallContext cx(cx_, "TestExampleInterface.passAllowSharedNullableArrayBuffer");
38621 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38624( cx, "TestExampleInterface"
, "passAllowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38622 "TestExampleInterface", "passAllowSharedNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38624( cx, "TestExampleInterface"
, "passAllowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38623 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38624( cx, "TestExampleInterface"
, "passAllowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38624 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38624( cx, "TestExampleInterface"
, "passAllowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38625
38626 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38627 if (!args.requireAtLeast(cx, "TestExampleInterface.passAllowSharedNullableArrayBuffer", 1)) {
38628 return false;
38629 }
38630 RootedSpiderMonkeyInterface<Nullable<ArrayBuffer>> arg0(cx);
38631 if (args[0].isObject()) {
38632 if (!arg0.SetValue().Init(&args[0].toObject())) {
38633 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferOrNull");
38634 return false;
38635 }
38636 if (JS::IsLargeArrayBufferMaybeShared(arg0.SetValue().Obj())) {
38637 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
38638 return false;
38639 }
38640 if (JS::IsResizableArrayBufferMaybeShared(arg0.SetValue().Obj())) {
38641 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
38642 return false;
38643 }
38644 } else if (args[0].isNullOrUndefined()) {
38645 arg0.SetNull();
38646 } else {
38647 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
38648 return false;
38649 }
38650 // NOTE: This assert does NOT call the function.
38651 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedNullableArrayBuffer(Constify(arg0)))>, "Should be returning void here");
38652 MOZ_KnownLive(self)(self)->PassAllowSharedNullableArrayBuffer(Constify(arg0));
38653 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38653); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38653; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38654 args.rval().setUndefined();
38655 return true;
38656}
38657
38658static const JSJitInfo passAllowSharedNullableArrayBuffer_methodinfo = {
38659 { (JSJitGetterOp)passAllowSharedNullableArrayBuffer },
38660 { prototypes::id::TestExampleInterface },
38661 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38662 JSJitInfo::Method,
38663 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38664 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38665 false, /* isInfallible. False in setters. */
38666 false, /* isMovable. Not relevant for setters. */
38667 false, /* isEliminatable. Not relevant for setters. */
38668 false, /* isAlwaysInSlot. Only relevant for getters. */
38669 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38670 false, /* isTypedMethod. Only relevant for methods. */
38671 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38672};
38673
38674MOZ_CAN_RUN_SCRIPT static bool
38675passUnionArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38676{
38677 BindingCallContext cx(cx_, "TestExampleInterface.passUnionArrayBuffer");
38678 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38681( cx, "TestExampleInterface"
, "passUnionArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38679 "TestExampleInterface", "passUnionArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38681( cx, "TestExampleInterface"
, "passUnionArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38680 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38681( cx, "TestExampleInterface"
, "passUnionArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38681 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38681( cx, "TestExampleInterface"
, "passUnionArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
38682
38683 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38684 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionArrayBuffer", 1)) {
38685 return false;
38686 }
38687 StringOrArrayBuffer arg0;
38688 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
38689 return false;
38690 }
38691 // NOTE: This assert does NOT call the function.
38692 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionArrayBuffer(Constify(arg0)))>, "Should be returning void here");
38693 MOZ_KnownLive(self)(self)->PassUnionArrayBuffer(Constify(arg0));
38694 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38694); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38694; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38695 args.rval().setUndefined();
38696 return true;
38697}
38698
38699static const JSJitInfo passUnionArrayBuffer_methodinfo = {
38700 { (JSJitGetterOp)passUnionArrayBuffer },
38701 { prototypes::id::TestExampleInterface },
38702 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38703 JSJitInfo::Method,
38704 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38705 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38706 false, /* isInfallible. False in setters. */
38707 false, /* isMovable. Not relevant for setters. */
38708 false, /* isEliminatable. Not relevant for setters. */
38709 false, /* isAlwaysInSlot. Only relevant for getters. */
38710 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38711 false, /* isTypedMethod. Only relevant for methods. */
38712 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38713};
38714
38715MOZ_CAN_RUN_SCRIPT static bool
38716passUnionAllowSharedArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38717{
38718 BindingCallContext cx(cx_, "TestExampleInterface.passUnionAllowSharedArrayBuffer");
38719 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38722( cx, "TestExampleInterface"
, "passUnionAllowSharedArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38720 "TestExampleInterface", "passUnionAllowSharedArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38722( cx, "TestExampleInterface"
, "passUnionAllowSharedArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38721 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38722( cx, "TestExampleInterface"
, "passUnionAllowSharedArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38722 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38722( cx, "TestExampleInterface"
, "passUnionAllowSharedArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38723
38724 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38725 if (!args.requireAtLeast(cx, "TestExampleInterface.passUnionAllowSharedArrayBuffer", 1)) {
38726 return false;
38727 }
38728 StringOrMaybeSharedArrayBuffer arg0;
38729 if (!arg0.Init(cx, args[0], "Argument 1", false)) {
38730 return false;
38731 }
38732 // NOTE: This assert does NOT call the function.
38733 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionAllowSharedArrayBuffer(Constify(arg0)))>, "Should be returning void here");
38734 MOZ_KnownLive(self)(self)->PassUnionAllowSharedArrayBuffer(Constify(arg0));
38735 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38735); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38735; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38736 args.rval().setUndefined();
38737 return true;
38738}
38739
38740static const JSJitInfo passUnionAllowSharedArrayBuffer_methodinfo = {
38741 { (JSJitGetterOp)passUnionAllowSharedArrayBuffer },
38742 { prototypes::id::TestExampleInterface },
38743 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38744 JSJitInfo::Method,
38745 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38746 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38747 false, /* isInfallible. False in setters. */
38748 false, /* isMovable. Not relevant for setters. */
38749 false, /* isEliminatable. Not relevant for setters. */
38750 false, /* isAlwaysInSlot. Only relevant for getters. */
38751 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38752 false, /* isTypedMethod. Only relevant for methods. */
38753 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38754};
38755
38756MOZ_CAN_RUN_SCRIPT static bool
38757get_reflectedHTMLAttributeReturningFrozenArray(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38758{
38759 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38762( cx, "TestExampleInterface"
, "reflectedHTMLAttributeReturningFrozenArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38760 "TestExampleInterface", "reflectedHTMLAttributeReturningFrozenArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38762( cx, "TestExampleInterface"
, "reflectedHTMLAttributeReturningFrozenArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38761 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38762( cx, "TestExampleInterface"
, "reflectedHTMLAttributeReturningFrozenArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38762 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38762( cx, "TestExampleInterface"
, "reflectedHTMLAttributeReturningFrozenArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38763
38764 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38765 // Have to either root across the getter call or reget after.
38766 bool isXray;
38767 JS::Rooted<JSObject*> slotStorage(cx, GetCachedSlotStorageObject(cx, obj, &isXray));
38768 if (!slotStorage) {
38769 return false;
38770 }
38771 const size_t slotIndex = isXray ? (xpc::JSSLOT_EXPANDO_COUNT + 20) : (DOM_INSTANCE_RESERVED_SLOTS1 + 20);
38772 MOZ_ASSERT(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
)))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage
))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
, "../TestExampleGenBinding.cpp", 38772); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "slotIndex < JSCLASS_RESERVED_SLOTS(JS::GetClass(slotStorage))"
")"); do { *((volatile int*)__null) = 38772; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
38773 JS::Rooted<JS::Value> cachedVal(cx, JS::GetReservedSlot(slotStorage, slotIndex));
38774 bool hasCachedValue = !cachedVal.isUndefined();
38775 bool useCachedValue = false;
38776 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::Element>>> result;
38777 // NOTE: This assert does NOT call the function.
38778 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReflectedHTMLAttributeReturningFrozenArray(hasCachedValue ? &useCachedValue : nullptr, result))>, "Should be returning void here");
38779 MOZ_KnownLive(self)(self)->GetReflectedHTMLAttributeReturningFrozenArray(hasCachedValue ? &useCachedValue : nullptr, result);
38780 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38780); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38780; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38781 MOZ_ASSERT_IF(useCachedValue, hasCachedValue)do { if (useCachedValue) { do { static_assert( mozilla::detail
::AssertionConditionType<decltype(hasCachedValue)>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(hasCachedValue))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("hasCachedValue", "../TestExampleGenBinding.cpp", 38781); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "hasCachedValue" ")"); do { *((volatile int
*)__null) = 38781; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false); } } while (false)
;
38782 if (hasCachedValue && useCachedValue) {
38783 args.rval().set(cachedVal);
38784 // The cached value is in the compartment of slotStorage,
38785 // so wrap into the caller compartment as needed.
38786 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
38787 }
38788
38789 ClearCachedReflectedHTMLAttributeReturningFrozenArrayValue(self);
38790
38791 {
38792 JS::Rooted<JSObject*> conversionScope(cx, isXray ? JS::CurrentGlobalOrNull(cx) : slotStorage);
38793 JSAutoRealm ar(cx, conversionScope);
38794 do { // block we break out of when done wrapping
38795
38796 if (result.IsNull()) {
38797 args.rval().setNull();
38798 break;
38799 }
38800
38801 uint32_t length = result.Value().Length();
38802 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
38803 if (!returnArray) {
38804 return false;
38805 }
38806 // Scope for 'tmp'
38807 {
38808 JS::Rooted<JS::Value> tmp(cx);
38809 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
38810 // Control block to let us common up the JS_DefineElement calls when there
38811 // are different ways to succeed at wrapping the object.
38812 do {
38813 if (!GetOrCreateDOMReflector(cx, result.Value()[sequenceIdx0], &tmp)) {
38814 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38814); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 38814; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
38815 return false;
38816 }
38817 break;
38818 } while (false);
38819 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
38820 JSPROP_ENUMERATE)) {
38821 return false;
38822 }
38823 }
38824 }
38825 args.rval().setObject(*returnArray);
38826 break;
38827 } while (false);
38828 if (args.rval().isObject()) {
38829 JS::Rooted<JSObject*> rvalObj(cx, &args.rval().toObject());
38830 if (!JS_FreezeObject(cx, rvalObj)) {
38831 return false;
38832 }
38833 }
38834 }
38835 { // And now store things in the realm of our slotStorage.
38836 JSAutoRealm ar(cx, slotStorage);
38837 // Make a copy so that we don't do unnecessary wrapping on args.rval().
38838 JS::Rooted<JS::Value> storedVal(cx, args.rval());
38839 if (!MaybeWrapNonDOMObjectOrNullValue(cx, &storedVal)) {
38840 return false;
38841 }
38842 JS::SetReservedSlot(slotStorage, slotIndex, storedVal);
38843 if (!isXray) {
38844 // In the Xray case we don't need to do this, because getting the
38845 // expando object already preserved our wrapper.
38846 PreserveWrapper(self);
38847 }
38848 }
38849 // And now make sure args.rval() is in the caller realm.
38850 return MaybeWrapNonDOMObjectOrNullValue(cx, args.rval());
38851}
38852
38853MOZ_CAN_RUN_SCRIPT static bool
38854set_reflectedHTMLAttributeReturningFrozenArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
38855{
38856 BindingCallContext cx(cx_, "TestExampleInterface.reflectedHTMLAttributeReturningFrozenArray setter");
38857 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38860( cx, "TestExampleInterface"
, "reflectedHTMLAttributeReturningFrozenArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38858 "TestExampleInterface", "reflectedHTMLAttributeReturningFrozenArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38860( cx, "TestExampleInterface"
, "reflectedHTMLAttributeReturningFrozenArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38859 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject38860( cx, "TestExampleInterface"
, "reflectedHTMLAttributeReturningFrozenArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
38860 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38860( cx, "TestExampleInterface"
, "reflectedHTMLAttributeReturningFrozenArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
38861
38862 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38863 Nullable<Sequence<OwningNonNull<mozilla::dom::Element>>> arg0;
38864 if (args[0].isObject()) {
38865 JS::ForOfIterator iter(cx);
38866 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
38867 return false;
38868 }
38869 if (!iter.valueIsIterable()) {
38870 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "sequence");
38871 return false;
38872 }
38873 Sequence<OwningNonNull<mozilla::dom::Element>> &arr = arg0.SetValue();
38874 JS::Rooted<JS::Value> temp(cx);
38875 while (true) {
38876 bool done;
38877 if (!iter.next(&temp, &done)) {
38878 return false;
38879 }
38880 if (done) {
38881 break;
38882 }
38883 OwningNonNull<mozilla::dom::Element>* slotPtr = arr.AppendElement(mozilla::fallible);
38884 if (!slotPtr) {
38885 JS_ReportOutOfMemory(cx);
38886 return false;
38887 }
38888 OwningNonNull<mozilla::dom::Element>& slot = *slotPtr;
38889 if (temp.isObject()) {
38890 static_assert(IsRefcounted<mozilla::dom::Element>::value, "We can only store refcounted classes.");
38891 {
38892 // Our JSContext should be in the right global to do unwrapping in.
38893 nsresult rv = UnwrapObject<prototypes::id::Element, mozilla::dom::Element>(&temp, slot, cx);
38894 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
38895 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of value being assigned", "Element");
38896 return false;
38897 }
38898 }
38899 } else {
38900 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of value being assigned");
38901 return false;
38902 }
38903 }
38904 } else if (args[0].isNullOrUndefined()) {
38905 arg0.SetNull();
38906 } else {
38907 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value being assigned", "sequence");
38908 return false;
38909 }
38910 // NOTE: This assert does NOT call the function.
38911 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetReflectedHTMLAttributeReturningFrozenArray(Constify(arg0)))>, "Should be returning void here");
38912 MOZ_KnownLive(self)(self)->SetReflectedHTMLAttributeReturningFrozenArray(Constify(arg0));
38913 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 38913); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38913; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38914
38915 return true;
38916}
38917
38918static const JSJitInfo reflectedHTMLAttributeReturningFrozenArray_getterinfo = {
38919 { get_reflectedHTMLAttributeReturningFrozenArray },
38920 { prototypes::id::TestExampleInterface },
38921 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38922 JSJitInfo::Getter,
38923 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38924 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
38925 false, /* isInfallible. False in setters. */
38926 false, /* isMovable. Not relevant for setters. */
38927 false, /* isEliminatable. Not relevant for setters. */
38928 false, /* isAlwaysInSlot. Only relevant for getters. */
38929 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38930 false, /* isTypedMethod. Only relevant for methods. */
38931 (DOM_INSTANCE_RESERVED_SLOTS1 + 20) /* Reserved slot index, if we're stored in a slot, else 0. */
38932};
38933static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 20) <= JSJitInfo::maxSlotIndex, "We won't fit");
38934static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 20) < 22, "There is no slot for us");
38935static const JSJitInfo reflectedHTMLAttributeReturningFrozenArray_setterinfo = {
38936 { (JSJitGetterOp)set_reflectedHTMLAttributeReturningFrozenArray },
38937 { prototypes::id::TestExampleInterface },
38938 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38939 JSJitInfo::Setter,
38940 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38941 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38942 false, /* isInfallible. False in setters. */
38943 false, /* isMovable. Not relevant for setters. */
38944 false, /* isEliminatable. Not relevant for setters. */
38945 false, /* isAlwaysInSlot. Only relevant for getters. */
38946 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38947 false, /* isTypedMethod. Only relevant for methods. */
38948 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38949};
38950
38951MOZ_CAN_RUN_SCRIPT static bool
38952toJSON(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38953{
38954 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38957( cx, "TestExampleInterface"
, "toJSON", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38955 "TestExampleInterface", "toJSON", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38957( cx, "TestExampleInterface"
, "toJSON", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38956 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38957( cx, "TestExampleInterface"
, "toJSON", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38957 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38957( cx, "TestExampleInterface"
, "toJSON", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38958
38959 auto* self = static_cast<mozilla::dom::TestExampleInterface*>(void_self);
38960 JS::Rooted<JSObject*> result(cx, JS_NewPlainObject(cx));
38961 if (!result) {
38962 return false;
38963 }
38964 if (!TestExampleInterface_Binding::CollectJSONAttributes(cx, obj, MOZ_KnownLive(self)(self), result)) {
38965 return false;
38966 }
38967 args.rval().setObject(*result);
38968 return true;
38969}
38970
38971static const JSJitInfo toJSON_methodinfo = {
38972 { (JSJitGetterOp)toJSON },
38973 { prototypes::id::TestExampleInterface },
38974 { PrototypeTraits<prototypes::id::TestExampleInterface>::Depth },
38975 JSJitInfo::Method,
38976 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38977 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
38978 false, /* isInfallible. False in setters. */
38979 false, /* isMovable. Not relevant for setters. */
38980 false, /* isEliminatable. Not relevant for setters. */
38981 false, /* isAlwaysInSlot. Only relevant for getters. */
38982 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38983 false, /* isTypedMethod. Only relevant for methods. */
38984 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38985};
38986
38987static bool
38988_addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
38989{
38990 mozilla::dom::TestExampleInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleInterface>(obj);
38991 // We don't want to preserve if we don't have a wrapper, and we
38992 // obviously can't preserve if we're not initialized.
38993 if (self && self->GetWrapperPreserveColor()) {
38994 PreserveWrapper(self);
38995 }
38996 return true;
38997}
38998
38999static void
39000_finalize(JS::GCContext* gcx, JSObject* obj)
39001{
39002 mozilla::dom::TestExampleInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleInterface>(obj);
39003 if (self) {
39004 JS::SetReservedSlot(obj, DOM_OBJECT_SLOT0, JS::UndefinedValue());
39005 {
39006 JS::Value val = JS::GetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 9));
39007 if (!val.isUndefined()) {
39008 JSObject* obj = &val.toObject();
39009 js::SetProxyReservedSlot(obj, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0, JS::UndefinedValue());
39010 }
39011 }
39012 {
39013 JS::Value val = JS::GetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 10));
39014 if (!val.isUndefined()) {
39015 JSObject* obj = &val.toObject();
39016 js::SetProxyReservedSlot(obj, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0, JS::UndefinedValue());
39017 }
39018 }
39019 {
39020 JS::Value val = JS::GetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 11));
39021 if (!val.isUndefined()) {
39022 JSObject* obj = &val.toObject();
39023 js::SetProxyReservedSlot(obj, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0, JS::UndefinedValue());
39024 }
39025 }
39026 {
39027 JS::Value val = JS::GetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 12));
39028 if (!val.isUndefined()) {
39029 JSObject* obj = &val.toObject();
39030 js::SetProxyReservedSlot(obj, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0, JS::UndefinedValue());
39031 }
39032 }
39033 {
39034 JS::Value val = JS::GetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 13));
39035 if (!val.isUndefined()) {
39036 JSObject* obj = &val.toObject();
39037 js::SetProxyReservedSlot(obj, OBSERVABLE_ARRAY_DOM_INTERFACE_SLOT0, JS::UndefinedValue());
39038 }
39039 }
39040 ClearWrapper(self, self, obj);
39041 if (size_t mallocBytes = BindingJSObjectMallocBytes(self)) {
39042 JS::RemoveAssociatedMemory(obj, mallocBytes,
39043 JS::MemoryUse::DOMBinding);
39044 }
39045 AddForDeferredFinalization<mozilla::dom::TestExampleInterface>(self);
39046 }
39047}
39048
39049static nsWrapperCache*
39050_getWrapperCache(JS::Handle<JSObject*> obj)
39051{
39052 mozilla::dom::TestExampleInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleInterface>(obj);
39053 return self;
39054}
39055
39056static size_t
39057_objectMoved(JSObject* obj, JSObject* old)
39058{
39059 mozilla::dom::TestExampleInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleInterface>(obj);
39060 if (self) {
39061 UpdateWrapper(self, self, obj, old);
39062 }
39063
39064 return 0;
39065}
39066
39067static const JSFunctionSpec sStaticMethods_specs[] = {
39068 JS_FNSPEC("staticMethod", staticMethod, nullptr, 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("staticMethod"), {staticMethod, nullptr
}, 1, JSPROP_ENUMERATE, nullptr}
,
39069 JS_FNSPEC("staticMethodWithContext", staticMethodWithContext, nullptr, 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("staticMethodWithContext"), {staticMethodWithContext
, nullptr}, 1, JSPROP_ENUMERATE, nullptr}
,
39070 JS_FNSPEC("staticDeprecatedMethod", staticDeprecatedMethod, nullptr, 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("staticDeprecatedMethod"), {staticDeprecatedMethod
, nullptr}, 1, JSPROP_ENUMERATE, nullptr}
,
39071 JS_FNSPEC("staticDeprecatedMethodWithContext", staticDeprecatedMethodWithContext, nullptr, 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("staticDeprecatedMethodWithContext"), {
staticDeprecatedMethodWithContext, nullptr}, 1, JSPROP_ENUMERATE
, nullptr}
,
39072 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
39073};
39074
39075
39076static const Prefable<const JSFunctionSpec> sStaticMethods[] = {
39077 { nullptr, &sStaticMethods_specs[0] },
39078 { nullptr, nullptr }
39079};
39080
39081static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39082 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39083static_assert(4 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39084 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39085
39086static const JSPropertySpec sStaticAttributes_specs[] = {
39087 JSPropertySpec::nativeAccessors("staticAttribute", JSPROP_ENUMERATE, get_staticAttribute, nullptr, set_staticAttribute, nullptr),
39088 JSPropertySpec::nativeAccessors("staticDeprecatedAttribute", JSPROP_ENUMERATE, get_staticDeprecatedAttribute, nullptr, set_staticDeprecatedAttribute, nullptr),
39089 JS_PS_ENDJSPropertySpec::sentinel()
39090};
39091
39092
39093static const Prefable<const JSPropertySpec> sStaticAttributes[] = {
39094 { nullptr, &sStaticAttributes_specs[0] },
39095 { nullptr, nullptr }
39096};
39097
39098static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39099 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39100static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39101 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39102
39103static const JSFunctionSpec sMethods_specs[] = {
39104 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}
,
39105 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}
,
39106 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}
,
39107 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}
,
39108 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}
,
39109 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}
,
39110 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}
,
39111 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}
,
39112 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}
,
39113 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}
,
39114 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}
,
39115 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}
,
39116 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}
,
39117 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}
,
39118 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
}
,
39119 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}
,
39120 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}
,
39121 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}
,
39122 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}
,
39123 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}
,
39124 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}
,
39125 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
}
,
39126 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}
,
39127 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}
,
39128 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}
,
39129 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}
,
39130 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
}
,
39131 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}
,
39132 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}
,
39133 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}
,
39134 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}
,
39135 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}
,
39136 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}
,
39137 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}
,
39138 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}
,
39139 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}
,
39140 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}
,
39141 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}
,
39142 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}
,
39143 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}
,
39144 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}
,
39145 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}
,
39146 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}
,
39147 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}
,
39148 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}
,
39149 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}
,
39150 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}
,
39151 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}
,
39152 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}
,
39153 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}
,
39154 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}
,
39155 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}
,
39156 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}
,
39157 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}
,
39158 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}
,
39159 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}
,
39160 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}
,
39161 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}
,
39162 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}
,
39163 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}
,
39164 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}
,
39165 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}
,
39166 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
}
,
39167 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}
,
39168 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}
,
39169 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}
,
39170 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}
,
39171 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}
,
39172 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}
,
39173 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}
,
39174 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}
,
39175 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}
,
39176 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}
,
39177 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}
,
39178 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}
,
39179 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}
,
39180 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}
,
39181 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}
,
39182 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}
,
39183 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}
,
39184 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
}
,
39185 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}
,
39186 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}
,
39187 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}
,
39188 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}
,
39189 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}
,
39190 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}
,
39191 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}
,
39192 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}
,
39193 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}
,
39194 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}
,
39195 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}
,
39196 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}
,
39197 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}
,
39198 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}
,
39199 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}
,
39200 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}
,
39201 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}
,
39202 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}
,
39203 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}
,
39204 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}
,
39205 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}
,
39206 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}
,
39207 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}
,
39208 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}
,
39209 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}
,
39210 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}
,
39211 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}
,
39212 JS_FNSPEC("passStringSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passStringSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passStringSequence"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passStringSequence_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
39213 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}
,
39214 JS_FNSPEC("passByteStringSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passByteStringSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passByteStringSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passByteStringSequence_methodinfo)}
, 1, JSPROP_ENUMERATE, nullptr}
,
39215 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}
,
39216 JS_FNSPEC("passUTF8StringSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUTF8StringSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUTF8StringSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUTF8StringSequence_methodinfo)}
, 1, JSPROP_ENUMERATE, nullptr}
,
39217 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}
,
39218 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}
,
39219 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}
,
39220 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}
,
39221 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}
,
39222 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}
,
39223 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}
,
39224 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}
,
39225 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}
,
39226 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}
,
39227 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}
,
39228 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}
,
39229 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}
,
39230 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}
,
39231 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}
,
39232 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}
,
39233 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}
,
39234 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}
,
39235 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}
,
39236 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}
,
39237 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}
,
39238 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}
,
39239 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}
,
39240 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}
,
39241 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}
,
39242 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
}
,
39243 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}
,
39244 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}
,
39245 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}
,
39246 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}
,
39247 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}
,
39248 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}
,
39249 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}
,
39250 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}
,
39251 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}
,
39252 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}
,
39253 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
}
,
39254 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
}
,
39255 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
}
,
39256 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
}
,
39257 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}
,
39258 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}
,
39259 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}
,
39260 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}
,
39261 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}
,
39262 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}
,
39263 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}
,
39264 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}
,
39265 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}
,
39266 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}
,
39267 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}
,
39268 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}
,
39269 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}
,
39270 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}
,
39271 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}
,
39272 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}
,
39273 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}
,
39274 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}
,
39275 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}
,
39276 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
}
,
39277 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}
,
39278 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}
,
39279 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}
,
39280 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}
,
39281 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}
,
39282 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}
,
39283 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}
,
39284 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}
,
39285 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}
,
39286 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
}
,
39287 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}
,
39288 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}
,
39289 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}
,
39290 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}
,
39291 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}
,
39292 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}
,
39293 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}
,
39294 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}
,
39295 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}
,
39296 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}
,
39297 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}
,
39298 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}
,
39299 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}
,
39300 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}
,
39301 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}
,
39302 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}
,
39303 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}
,
39304 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
}
,
39305 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}
,
39306 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}
,
39307 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}
,
39308 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}
,
39309 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}
,
39310 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}
,
39311 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}
,
39312 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}
,
39313 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}
,
39314 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}
,
39315 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}
,
39316 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
}
,
39317 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}
,
39318 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}
,
39319 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}
,
39320 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}
,
39321 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}
,
39322 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}
,
39323 JS_FNSPEC("passNullableTreatAsNullCallback", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableTreatAsNullCallback_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableTreatAsNullCallback"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableTreatAsNullCallback_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
39324 JS_FNSPEC("passOptionalNullableTreatAsNullCallback", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableTreatAsNullCallback_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableTreatAsNullCallback"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableTreatAsNullCallback_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
39325 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}
,
39326 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}
,
39327 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}
,
39328 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}
,
39329 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}
,
39330 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}
,
39331 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}
,
39332 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}
,
39333 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}
,
39334 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}
,
39335 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}
,
39336 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}
,
39337 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}
,
39338 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}
,
39339 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}
,
39340 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}
,
39341 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}
,
39342 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}
,
39343 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}
,
39344 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}
,
39345 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}
,
39346 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}
,
39347 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}
,
39348 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}
,
39349 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}
,
39350 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}
,
39351 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}
,
39352 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}
,
39353 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}
,
39354 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}
,
39355 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}
,
39356 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}
,
39357 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}
,
39358 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}
,
39359 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}
,
39360 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}
,
39361 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}
,
39362 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}
,
39363 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}
,
39364 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
}
,
39365 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}
,
39366 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}
,
39367 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}
,
39368 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}
,
39369 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}
,
39370 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}
,
39371 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}
,
39372 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}
,
39373 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}
,
39374 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}
,
39375 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}
,
39376 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}
,
39377 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}
,
39378 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}
,
39379 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}
,
39380 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}
,
39381 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}
,
39382 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}
,
39383 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}
,
39384 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}
,
39385 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}
,
39386 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}
,
39387 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}
,
39388 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}
,
39389 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}
,
39390 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}
,
39391 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}
,
39392 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}
,
39393 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}
,
39394 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}
,
39395 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}
,
39396 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}
,
39397 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}
,
39398 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}
,
39399 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}
,
39400 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}
,
39401 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}
,
39402 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}
,
39403 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}
,
39404 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}
,
39405 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}
,
39406 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}
,
39407 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}
,
39408 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}
,
39409 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}
,
39410 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}
,
39411 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}
,
39412 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}
,
39413 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}
,
39414 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}
,
39415 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}
,
39416 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}
,
39417 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}
,
39418 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}
,
39419 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}
,
39420 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}
,
39421 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}
,
39422 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}
,
39423 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}
,
39424 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}
,
39425 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}
,
39426 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}
,
39427 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}
,
39428 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}
,
39429 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}
,
39430 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}
,
39431 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}
,
39432 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}
,
39433 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}
,
39434 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}
,
39435 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}
,
39436 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}
,
39437 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}
,
39438 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}
,
39439 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}
,
39440 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}
,
39441 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}
,
39442 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}
,
39443 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}
,
39444 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}
,
39445 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}
,
39446 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}
,
39447 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}
,
39448 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}
,
39449 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}
,
39450 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}
,
39451 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}
,
39452 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}
,
39453 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}
,
39454 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}
,
39455 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}
,
39456 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}
,
39457 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}
,
39458 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}
,
39459 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}
,
39460 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}
,
39461 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}
,
39462 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}
,
39463 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}
,
39464 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}
,
39465 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}
,
39466 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}
,
39467 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}
,
39468 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}
,
39469 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}
,
39470 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}
,
39471 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}
,
39472 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
}
,
39473 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
}
,
39474 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}
,
39475 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}
,
39476 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}
,
39477 JS_FNSPEC("receiveUnionWithUndefined", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUnionWithUndefined_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUnionWithUndefined"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveUnionWithUndefined_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
39478 JS_FNSPEC("receiveUnionWithNullableUndefined", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUnionWithNullableUndefined_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUnionWithNullableUndefined"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&receiveUnionWithNullableUndefined_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
39479 JS_FNSPEC("receiveUnionWithUndefinedAndNullable", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUnionWithUndefinedAndNullable_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUnionWithUndefinedAndNullable")
, {(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&receiveUnionWithUndefinedAndNullable_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
39480 JS_FNSPEC("receiveNullableUnionWithUndefined", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableUnionWithUndefined_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableUnionWithUndefined"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&receiveNullableUnionWithUndefined_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
39481 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}
,
39482 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}
,
39483 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}
,
39484 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}
,
39485 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}
,
39486 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}
,
39487 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
}
,
39488 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}
,
39489 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}
,
39490 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}
,
39491 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}
,
39492 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}
,
39493 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}
,
39494 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}
,
39495 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}
,
39496 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}
,
39497 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}
,
39498 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}
,
39499 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}
,
39500 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
}
,
39501 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}
,
39502 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}
,
39503 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}
,
39504 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}
,
39505 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}
,
39506 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}
,
39507 JS_FNSPEC("deprecatedMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&deprecatedMethod_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("deprecatedMethod"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&deprecatedMethod_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
39508 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}
,
39509 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}
,
39510 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}
,
39511 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}
,
39512 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}
,
39513 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}
,
39514 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}
,
39515 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}
,
39516 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}
,
39517 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}
,
39518 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}
,
39519 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}
,
39520 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}
,
39521 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}
,
39522 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}
,
39523 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}
,
39524 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}
,
39525 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}
,
39526 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}
,
39527 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}
,
39528 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}
,
39529 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}
,
39530 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39531 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}
,
39532 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39533 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}
,
39534 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}
,
39535 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39536 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}
,
39537 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39538 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}
,
39539 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}
,
39540 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39541 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}
,
39542 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39543 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}
,
39544 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39545 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}
,
39546 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39547 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}
,
39548 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39549 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}
,
39550 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39551 JS_FNSPEC("conditionalOnSecureContext10", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&conditionalOnSecureContext10_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("conditionalOnSecureContext10"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&conditionalOnSecureContext10_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
39552 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
39553 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}
,
39554 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
}
,
39555 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
}
,
39556 JS_FNSPEC("needsSubjectPrincipalMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&needsSubjectPrincipalMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("needsSubjectPrincipalMethod"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&needsSubjectPrincipalMethod_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
39557 JS_FNSPEC("needsNonSystemSubjectPrincipalMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&needsNonSystemSubjectPrincipalMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("needsNonSystemSubjectPrincipalMethod")
, {(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&needsNonSystemSubjectPrincipalMethod_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
39558 JS_FNSPEC("needsCallerTypeMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&needsCallerTypeMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("needsCallerTypeMethod"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&needsCallerTypeMethod_methodinfo)},
0, JSPROP_ENUMERATE, nullptr}
,
39559 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}
,
39560 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}
,
39561 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}
,
39562 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}
,
39563 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
}
,
39564 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}
,
39565 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}
,
39566 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}
,
39567 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}
,
39568 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}
,
39569 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}
,
39570 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}
,
39571 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}
,
39572 JS_FNSPEC("toString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&__stringifier_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("toString"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&__stringifier_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
39573 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
39574};
39575
39576static const PrefableDisablers sMethods_disablers427 = {
39577 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), nullptr
39578};
39579
39580static const PrefableDisablers sMethods_disablers429 = {
39581 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
39582};
39583
39584static const PrefableDisablers sMethods_disablers432 = {
39585 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &TestFuncControlledMember
39586};
39587
39588static const PrefableDisablers sMethods_disablers434 = {
39589 WebIDLPrefIndex::NoPref, 0, false, OriginTrial(0), &TestFuncControlledMember
39590};
39591
39592static const PrefableDisablers sMethods_disablers437 = {
39593 WebIDLPrefIndex::NoPref, 0, false, OriginTrial::TestTrial, nullptr
39594};
39595
39596static const PrefableDisablers sMethods_disablers439 = {
39597 WebIDLPrefIndex::NoPref, 0, true, OriginTrial(0), nullptr
39598};
39599
39600static const PrefableDisablers sMethods_disablers441 = {
39601 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), nullptr
39602};
39603
39604static const PrefableDisablers sMethods_disablers443 = {
39605 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
39606};
39607
39608static const PrefableDisablers sMethods_disablers445 = {
39609 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), &TestFuncControlledMember
39610};
39611
39612static const PrefableDisablers sMethods_disablers447 = {
39613 WebIDLPrefIndex::NoPref, 0, true, OriginTrial::TestTrial, nullptr
39614};
39615
39616static const Prefable<const JSFunctionSpec> sMethods[] = {
39617 { nullptr, &sMethods_specs[0] },
39618 { &sMethods_disablers427, &sMethods_specs[427] },
39619 { &sMethods_disablers429, &sMethods_specs[429] },
39620 { &sMethods_disablers432, &sMethods_specs[432] },
39621 { &sMethods_disablers434, &sMethods_specs[434] },
39622 { &sMethods_disablers437, &sMethods_specs[437] },
39623 { &sMethods_disablers439, &sMethods_specs[439] },
39624 { &sMethods_disablers441, &sMethods_specs[441] },
39625 { &sMethods_disablers443, &sMethods_specs[443] },
39626 { &sMethods_disablers445, &sMethods_specs[445] },
39627 { &sMethods_disablers447, &sMethods_specs[447] },
39628 { nullptr, &sMethods_specs[449] },
39629 { nullptr, nullptr }
39630};
39631
39632static_assert(12 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39633 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39634static_assert(426 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39635 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39636
39637static const JSPropertySpec sAttributes_specs[] = {
39638 JSPropertySpec::nativeAccessors("readonlyByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyByte_getterinfo, nullptr, nullptr),
39639 JSPropertySpec::nativeAccessors("writableByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableByte_getterinfo, GenericSetter<NormalThisPolicy>, &writableByte_setterinfo),
39640 JSPropertySpec::nativeAccessors("cachedByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &cachedByte_getterinfo, nullptr, nullptr),
39641 JSPropertySpec::nativeAccessors("cachedConstantByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &cachedConstantByte_getterinfo, nullptr, nullptr),
39642 JSPropertySpec::nativeAccessors("cachedWritableByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &cachedWritableByte_getterinfo, GenericSetter<NormalThisPolicy>, &cachedWritableByte_setterinfo),
39643 JSPropertySpec::nativeAccessors("sideEffectFreeByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &sideEffectFreeByte_getterinfo, GenericSetter<NormalThisPolicy>, &sideEffectFreeByte_setterinfo),
39644 JSPropertySpec::nativeAccessors("domDependentByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &domDependentByte_getterinfo, GenericSetter<NormalThisPolicy>, &domDependentByte_setterinfo),
39645 JSPropertySpec::nativeAccessors("constantByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &constantByte_getterinfo, nullptr, nullptr),
39646 JSPropertySpec::nativeAccessors("deviceStateDependentByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &deviceStateDependentByte_getterinfo, nullptr, nullptr),
39647 JSPropertySpec::nativeAccessors("readonlyShort", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyShort_getterinfo, nullptr, nullptr),
39648 JSPropertySpec::nativeAccessors("writableShort", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableShort_getterinfo, GenericSetter<NormalThisPolicy>, &writableShort_setterinfo),
39649 JSPropertySpec::nativeAccessors("readonlyLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyLong_getterinfo, nullptr, nullptr),
39650 JSPropertySpec::nativeAccessors("writableLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableLong_getterinfo, GenericSetter<NormalThisPolicy>, &writableLong_setterinfo),
39651 JSPropertySpec::nativeAccessors("readonlyLongLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyLongLong_getterinfo, nullptr, nullptr),
39652 JSPropertySpec::nativeAccessors("writableLongLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableLongLong_getterinfo, GenericSetter<NormalThisPolicy>, &writableLongLong_setterinfo),
39653 JSPropertySpec::nativeAccessors("readonlyOctet", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyOctet_getterinfo, nullptr, nullptr),
39654 JSPropertySpec::nativeAccessors("writableOctet", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableOctet_getterinfo, GenericSetter<NormalThisPolicy>, &writableOctet_setterinfo),
39655 JSPropertySpec::nativeAccessors("readonlyUnsignedShort", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyUnsignedShort_getterinfo, nullptr, nullptr),
39656 JSPropertySpec::nativeAccessors("writableUnsignedShort", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnsignedShort_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnsignedShort_setterinfo),
39657 JSPropertySpec::nativeAccessors("readonlyUnsignedLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyUnsignedLong_getterinfo, nullptr, nullptr),
39658 JSPropertySpec::nativeAccessors("writableUnsignedLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnsignedLong_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnsignedLong_setterinfo),
39659 JSPropertySpec::nativeAccessors("readonlyUnsignedLongLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyUnsignedLongLong_getterinfo, nullptr, nullptr),
39660 JSPropertySpec::nativeAccessors("writableUnsignedLongLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnsignedLongLong_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnsignedLongLong_setterinfo),
39661 JSPropertySpec::nativeAccessors("writableFloat", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableFloat_getterinfo, GenericSetter<NormalThisPolicy>, &writableFloat_setterinfo),
39662 JSPropertySpec::nativeAccessors("writableUnrestrictedFloat", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnrestrictedFloat_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnrestrictedFloat_setterinfo),
39663 JSPropertySpec::nativeAccessors("writableNullableFloat", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableFloat_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableFloat_setterinfo),
39664 JSPropertySpec::nativeAccessors("writableNullableUnrestrictedFloat", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableUnrestrictedFloat_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableUnrestrictedFloat_setterinfo),
39665 JSPropertySpec::nativeAccessors("writableDouble", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableDouble_getterinfo, GenericSetter<NormalThisPolicy>, &writableDouble_setterinfo),
39666 JSPropertySpec::nativeAccessors("writableUnrestrictedDouble", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnrestrictedDouble_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnrestrictedDouble_setterinfo),
39667 JSPropertySpec::nativeAccessors("writableNullableDouble", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableDouble_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableDouble_setterinfo),
39668 JSPropertySpec::nativeAccessors("writableNullableUnrestrictedDouble", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableUnrestrictedDouble_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableUnrestrictedDouble_setterinfo),
39669 JSPropertySpec::nativeAccessors("lenientFloatAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &lenientFloatAttr_getterinfo, GenericSetter<NormalThisPolicy>, &lenientFloatAttr_setterinfo),
39670 JSPropertySpec::nativeAccessors("lenientDoubleAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &lenientDoubleAttr_getterinfo, GenericSetter<NormalThisPolicy>, &lenientDoubleAttr_setterinfo),
39671 JSPropertySpec::nativeAccessors("nonNullSelf", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nonNullSelf_getterinfo, GenericSetter<NormalThisPolicy>, &nonNullSelf_setterinfo),
39672 JSPropertySpec::nativeAccessors("nullableSelf", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nullableSelf_getterinfo, GenericSetter<NormalThisPolicy>, &nullableSelf_setterinfo),
39673 JSPropertySpec::nativeAccessors("cachedSelf", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &cachedSelf_getterinfo, nullptr, nullptr),
39674 JSPropertySpec::nativeAccessors("nonNullExternal", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nonNullExternal_getterinfo, GenericSetter<NormalThisPolicy>, &nonNullExternal_setterinfo),
39675 JSPropertySpec::nativeAccessors("nullableExternal", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nullableExternal_getterinfo, GenericSetter<NormalThisPolicy>, &nullableExternal_setterinfo),
39676 JSPropertySpec::nativeAccessors("nonNullCallbackInterface", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nonNullCallbackInterface_getterinfo, GenericSetter<NormalThisPolicy>, &nonNullCallbackInterface_setterinfo),
39677 JSPropertySpec::nativeAccessors("nullableCallbackInterface", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nullableCallbackInterface_getterinfo, GenericSetter<NormalThisPolicy>, &nullableCallbackInterface_setterinfo),
39678 JSPropertySpec::nativeAccessors("readonlySequence", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlySequence_getterinfo, nullptr, nullptr),
39679 JSPropertySpec::nativeAccessors("readonlySequenceOfDictionaries", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlySequenceOfDictionaries_getterinfo, nullptr, nullptr),
39680 JSPropertySpec::nativeAccessors("readonlyNullableSequenceOfDictionaries", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyNullableSequenceOfDictionaries_getterinfo, nullptr, nullptr),
39681 JSPropertySpec::nativeAccessors("readonlyFrozenSequence", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyFrozenSequence_getterinfo, nullptr, nullptr),
39682 JSPropertySpec::nativeAccessors("readonlyFrozenNullableSequence", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyFrozenNullableSequence_getterinfo, nullptr, nullptr),
39683 JSPropertySpec::nativeAccessors("uint8ArrayAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &uint8ArrayAttr_getterinfo, GenericSetter<NormalThisPolicy>, &uint8ArrayAttr_setterinfo),
39684 JSPropertySpec::nativeAccessors("readonlyJSStringAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyJSStringAttr_getterinfo, nullptr, nullptr),
39685 JSPropertySpec::nativeAccessors("jsStringAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &jsStringAttr_getterinfo, GenericSetter<NormalThisPolicy>, &jsStringAttr_setterinfo),
39686 JSPropertySpec::nativeAccessors("enumAttribute", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &enumAttribute_getterinfo, GenericSetter<NormalThisPolicy>, &enumAttribute_setterinfo),
39687 JSPropertySpec::nativeAccessors("readonlyEnumAttribute", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyEnumAttribute_getterinfo, nullptr, nullptr),
39688 JSPropertySpec::nativeAccessors("writableUnion", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnion_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnion_setterinfo),
39689 JSPropertySpec::nativeAccessors("writableUnionContainingNull", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnionContainingNull_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnionContainingNull_setterinfo),
39690 JSPropertySpec::nativeAccessors("writableNullableUnion", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableUnion_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableUnion_setterinfo),
39691 JSPropertySpec::nativeAccessors("writableUnionWithUndefined", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnionWithUndefined_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnionWithUndefined_setterinfo),
39692 JSPropertySpec::nativeAccessors("writableUnionWithNullableUndefined", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnionWithNullableUndefined_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnionWithNullableUndefined_setterinfo),
39693 JSPropertySpec::nativeAccessors("writableUnionWithUndefinedAndNullable", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnionWithUndefinedAndNullable_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnionWithUndefinedAndNullable_setterinfo),
39694 JSPropertySpec::nativeAccessors("writableNullableUnionWithUndefined", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableUnionWithUndefined_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableUnionWithUndefined_setterinfo),
39695 JSPropertySpec::nativeAccessors("booleanObservableArray", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &booleanObservableArray_getterinfo, GenericSetter<NormalThisPolicy>, &booleanObservableArray_setterinfo),
39696 JSPropertySpec::nativeAccessors("objectObservableArray", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &objectObservableArray_getterinfo, GenericSetter<NormalThisPolicy>, &objectObservableArray_setterinfo),
39697 JSPropertySpec::nativeAccessors("anyObservableArray", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &anyObservableArray_getterinfo, GenericSetter<NormalThisPolicy>, &anyObservableArray_setterinfo),
39698 JSPropertySpec::nativeAccessors("interfaceObservableArray", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &interfaceObservableArray_getterinfo, GenericSetter<NormalThisPolicy>, &interfaceObservableArray_setterinfo),
39699 JSPropertySpec::nativeAccessors("nullableObservableArray", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nullableObservableArray_getterinfo, GenericSetter<NormalThisPolicy>, &nullableObservableArray_setterinfo),
39700 JSPropertySpec::nativeAccessors("attributeGetterRenamedFrom", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &attributeGetterRenamedFrom_getterinfo, nullptr, nullptr),
39701 JSPropertySpec::nativeAccessors("attributeRenamedFrom", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &attributeRenamedFrom_getterinfo, GenericSetter<NormalThisPolicy>, &attributeRenamedFrom_setterinfo),
39702 JSPropertySpec::nativeAccessors("readonlyDictionary", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyDictionary_getterinfo, nullptr, nullptr),
39703 JSPropertySpec::nativeAccessors("readonlyNullableDictionary", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyNullableDictionary_getterinfo, nullptr, nullptr),
39704 JSPropertySpec::nativeAccessors("writableDictionary", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableDictionary_getterinfo, GenericSetter<NormalThisPolicy>, &writableDictionary_setterinfo),
39705 JSPropertySpec::nativeAccessors("readonlyFrozenDictionary", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyFrozenDictionary_getterinfo, nullptr, nullptr),
39706 JSPropertySpec::nativeAccessors("readonlyFrozenNullableDictionary", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyFrozenNullableDictionary_getterinfo, nullptr, nullptr),
39707 JSPropertySpec::nativeAccessors("writableFrozenDictionary", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableFrozenDictionary_getterinfo, GenericSetter<NormalThisPolicy>, &writableFrozenDictionary_setterinfo),
39708 JSPropertySpec::nativeAccessors("enforcedByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &enforcedByte_getterinfo, GenericSetter<NormalThisPolicy>, &enforcedByte_setterinfo),
39709 JSPropertySpec::nativeAccessors("enforcedByteNullable", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &enforcedByteNullable_getterinfo, GenericSetter<NormalThisPolicy>, &enforcedByteNullable_setterinfo),
39710 JSPropertySpec::nativeAccessors("clampedByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &clampedByte_getterinfo, GenericSetter<NormalThisPolicy>, &clampedByte_setterinfo),
39711 JSPropertySpec::nativeAccessors("clampedByteNullable", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &clampedByteNullable_getterinfo, GenericSetter<NormalThisPolicy>, &clampedByteNullable_setterinfo),
39712 JSPropertySpec::nativeAccessors("deprecatedAttribute", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &deprecatedAttribute_getterinfo, GenericSetter<NormalThisPolicy>, &deprecatedAttribute_setterinfo),
39713 JS_PS_ENDJSPropertySpec::sentinel(),
39714 JSPropertySpec::nativeAccessors("prefable1", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable1_getterinfo, nullptr, nullptr),
39715 JSPropertySpec::nativeAccessors("prefable2", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable2_getterinfo, nullptr, nullptr),
39716 JS_PS_ENDJSPropertySpec::sentinel(),
39717 JSPropertySpec::nativeAccessors("prefable3", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable3_getterinfo, nullptr, nullptr),
39718 JSPropertySpec::nativeAccessors("prefable4", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable4_getterinfo, nullptr, nullptr),
39719 JS_PS_ENDJSPropertySpec::sentinel(),
39720 JSPropertySpec::nativeAccessors("prefable5", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable5_getterinfo, nullptr, nullptr),
39721 JS_PS_ENDJSPropertySpec::sentinel(),
39722 JSPropertySpec::nativeAccessors("prefable6", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable6_getterinfo, nullptr, nullptr),
39723 JSPropertySpec::nativeAccessors("prefable7", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable7_getterinfo, nullptr, nullptr),
39724 JS_PS_ENDJSPropertySpec::sentinel(),
39725 JSPropertySpec::nativeAccessors("prefable8", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable8_getterinfo, nullptr, nullptr),
39726 JS_PS_ENDJSPropertySpec::sentinel(),
39727 JSPropertySpec::nativeAccessors("prefable9", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable9_getterinfo, nullptr, nullptr),
39728 JS_PS_ENDJSPropertySpec::sentinel(),
39729 JSPropertySpec::nativeAccessors("prefable12", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable12_getterinfo, nullptr, nullptr),
39730 JSPropertySpec::nativeAccessors("prefable14", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable14_getterinfo, nullptr, nullptr),
39731 JS_PS_ENDJSPropertySpec::sentinel(),
39732 JSPropertySpec::nativeAccessors("prefable15", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable15_getterinfo, nullptr, nullptr),
39733 JSPropertySpec::nativeAccessors("prefable16", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable16_getterinfo, nullptr, nullptr),
39734 JS_PS_ENDJSPropertySpec::sentinel(),
39735 JSPropertySpec::nativeAccessors("prefable21", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable21_getterinfo, nullptr, nullptr),
39736 JS_PS_ENDJSPropertySpec::sentinel(),
39737 JSPropertySpec::nativeAccessors("prefable22", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable22_getterinfo, nullptr, nullptr),
39738 JS_PS_ENDJSPropertySpec::sentinel(),
39739 JSPropertySpec::nativeAccessors("conditionalOnSecureContext1", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &conditionalOnSecureContext1_getterinfo, nullptr, nullptr),
39740 JS_PS_ENDJSPropertySpec::sentinel(),
39741 JSPropertySpec::nativeAccessors("conditionalOnSecureContext2", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &conditionalOnSecureContext2_getterinfo, nullptr, nullptr),
39742 JS_PS_ENDJSPropertySpec::sentinel(),
39743 JSPropertySpec::nativeAccessors("conditionalOnSecureContext3", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &conditionalOnSecureContext3_getterinfo, nullptr, nullptr),
39744 JS_PS_ENDJSPropertySpec::sentinel(),
39745 JSPropertySpec::nativeAccessors("conditionalOnSecureContext4", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &conditionalOnSecureContext4_getterinfo, nullptr, nullptr),
39746 JS_PS_ENDJSPropertySpec::sentinel(),
39747 JSPropertySpec::nativeAccessors("conditionalOnSecureContext9", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &conditionalOnSecureContext9_getterinfo, nullptr, nullptr),
39748 JS_PS_ENDJSPropertySpec::sentinel(),
39749 JSPropertySpec::nativeAccessors("attrWithLenientThis", JSPROP_ENUMERATE, GenericGetter<LenientThisPolicy, ThrowExceptions>, &attrWithLenientThis_getterinfo, GenericSetter<LenientThisPolicy>, &attrWithLenientThis_setterinfo),
39750 JSPropertySpec::nativeAccessors("putForwardsAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &putForwardsAttr_getterinfo, GenericSetter<NormalThisPolicy>, &putForwardsAttr_setterinfo),
39751 JSPropertySpec::nativeAccessors("putForwardsAttr2", JSPROP_ENUMERATE, GenericGetter<LenientThisPolicy, ThrowExceptions>, &putForwardsAttr2_getterinfo, GenericSetter<LenientThisPolicy>, &putForwardsAttr2_setterinfo),
39752 JSPropertySpec::nativeAccessors("throwingAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &throwingAttr_getterinfo, GenericSetter<NormalThisPolicy>, &throwingAttr_setterinfo),
39753 JSPropertySpec::nativeAccessors("throwingGetterAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &throwingGetterAttr_getterinfo, GenericSetter<NormalThisPolicy>, &throwingGetterAttr_setterinfo),
39754 JSPropertySpec::nativeAccessors("throwingSetterAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &throwingSetterAttr_getterinfo, GenericSetter<NormalThisPolicy>, &throwingSetterAttr_setterinfo),
39755 JSPropertySpec::nativeAccessors("canOOMAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &canOOMAttr_getterinfo, GenericSetter<NormalThisPolicy>, &canOOMAttr_setterinfo),
39756 JSPropertySpec::nativeAccessors("canOOMGetterAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &canOOMGetterAttr_getterinfo, GenericSetter<NormalThisPolicy>, &canOOMGetterAttr_setterinfo),
39757 JSPropertySpec::nativeAccessors("canOOMSetterAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &canOOMSetterAttr_getterinfo, GenericSetter<NormalThisPolicy>, &canOOMSetterAttr_setterinfo),
39758 JSPropertySpec::nativeAccessors("needsSubjectPrincipalAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &needsSubjectPrincipalAttr_getterinfo, GenericSetter<NormalThisPolicy>, &needsSubjectPrincipalAttr_setterinfo),
39759 JSPropertySpec::nativeAccessors("needsNonSystemSubjectPrincipalAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &needsNonSystemSubjectPrincipalAttr_getterinfo, GenericSetter<NormalThisPolicy>, &needsNonSystemSubjectPrincipalAttr_setterinfo),
39760 JSPropertySpec::nativeAccessors("needsCallerTypeAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &needsCallerTypeAttr_getterinfo, GenericSetter<NormalThisPolicy>, &needsCallerTypeAttr_setterinfo),
39761 JSPropertySpec::nativeAccessors("ceReactionsAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ceReactionsAttr_getterinfo, GenericSetter<NormalThisPolicy>, &ceReactionsAttr_setterinfo),
39762 JSPropertySpec::nativeAccessors("toJSONShouldSkipThis", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &toJSONShouldSkipThis_getterinfo, GenericSetter<NormalThisPolicy>, &toJSONShouldSkipThis_setterinfo),
39763 JSPropertySpec::nativeAccessors("toJSONShouldSkipThis2", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &toJSONShouldSkipThis2_getterinfo, GenericSetter<NormalThisPolicy>, &toJSONShouldSkipThis2_setterinfo),
39764 JSPropertySpec::nativeAccessors("toJSONShouldSkipThis3", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &toJSONShouldSkipThis3_getterinfo, GenericSetter<NormalThisPolicy>, &toJSONShouldSkipThis3_setterinfo),
39765 JSPropertySpec::nativeAccessors("dashed-attribute", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &dashed_attribute_getterinfo, GenericSetter<NormalThisPolicy>, &dashed_attribute_setterinfo),
39766 JSPropertySpec::nativeAccessors("nonEnumerableAttr", 0, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nonEnumerableAttr_getterinfo, GenericSetter<NormalThisPolicy>, &nonEnumerableAttr_setterinfo),
39767 JSPropertySpec::nativeAccessors("allowSharedArrayBufferViewTypedef", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedArrayBufferViewTypedef_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedArrayBufferViewTypedef_setterinfo),
39768 JSPropertySpec::nativeAccessors("allowSharedArrayBufferView", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedArrayBufferView_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedArrayBufferView_setterinfo),
39769 JSPropertySpec::nativeAccessors("allowSharedNullableArrayBufferView", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedNullableArrayBufferView_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedNullableArrayBufferView_setterinfo),
39770 JSPropertySpec::nativeAccessors("allowSharedArrayBuffer", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedArrayBuffer_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedArrayBuffer_setterinfo),
39771 JSPropertySpec::nativeAccessors("allowSharedNullableArrayBuffer", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedNullableArrayBuffer_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedNullableArrayBuffer_setterinfo),
39772 JSPropertySpec::nativeAccessors("reflectedHTMLAttributeReturningFrozenArray", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &reflectedHTMLAttributeReturningFrozenArray_getterinfo, GenericSetter<NormalThisPolicy>, &reflectedHTMLAttributeReturningFrozenArray_setterinfo),
39773 JS_PS_ENDJSPropertySpec::sentinel()
39774};
39775
39776static const PrefableDisablers sAttributes_disablers76 = {
39777 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), nullptr
39778};
39779
39780static const PrefableDisablers sAttributes_disablers79 = {
39781 WebIDLPrefIndex::dom_webidl_test2, 0, false, OriginTrial(0), nullptr
39782};
39783
39784static const PrefableDisablers sAttributes_disablers82 = {
39785 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), nullptr
39786};
39787
39788static const PrefableDisablers sAttributes_disablers84 = {
39789 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
39790};
39791
39792static const PrefableDisablers sAttributes_disablers87 = {
39793 WebIDLPrefIndex::dom_webidl_test2, 0, false, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
39794};
39795
39796static const PrefableDisablers sAttributes_disablers89 = {
39797 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
39798};
39799
39800static const PrefableDisablers sAttributes_disablers91 = {
39801 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &TestFuncControlledMember
39802};
39803
39804static const PrefableDisablers sAttributes_disablers94 = {
39805 WebIDLPrefIndex::NoPref, 0, false, OriginTrial(0), &TestFuncControlledMember
39806};
39807
39808static const PrefableDisablers sAttributes_disablers97 = {
39809 WebIDLPrefIndex::NoPref, 0, false, OriginTrial::TestTrial, nullptr
39810};
39811
39812static const PrefableDisablers sAttributes_disablers99 = {
39813 WebIDLPrefIndex::NoPref, 0, false, OriginTrial::TestTrial, &TestFuncControlledMember
39814};
39815
39816static const PrefableDisablers sAttributes_disablers101 = {
39817 WebIDLPrefIndex::NoPref, 0, true, OriginTrial(0), nullptr
39818};
39819
39820static const PrefableDisablers sAttributes_disablers103 = {
39821 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), nullptr
39822};
39823
39824static const PrefableDisablers sAttributes_disablers105 = {
39825 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
39826};
39827
39828static const PrefableDisablers sAttributes_disablers107 = {
39829 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), &TestFuncControlledMember
39830};
39831
39832static const PrefableDisablers sAttributes_disablers109 = {
39833 WebIDLPrefIndex::NoPref, 0, true, OriginTrial::TestTrial, nullptr
39834};
39835
39836static const Prefable<const JSPropertySpec> sAttributes[] = {
39837 { nullptr, &sAttributes_specs[0] },
39838 { &sAttributes_disablers76, &sAttributes_specs[76] },
39839 { &sAttributes_disablers79, &sAttributes_specs[79] },
39840 { &sAttributes_disablers82, &sAttributes_specs[82] },
39841 { &sAttributes_disablers84, &sAttributes_specs[84] },
39842 { &sAttributes_disablers87, &sAttributes_specs[87] },
39843 { &sAttributes_disablers89, &sAttributes_specs[89] },
39844 { &sAttributes_disablers91, &sAttributes_specs[91] },
39845 { &sAttributes_disablers94, &sAttributes_specs[94] },
39846 { &sAttributes_disablers97, &sAttributes_specs[97] },
39847 { &sAttributes_disablers99, &sAttributes_specs[99] },
39848 { &sAttributes_disablers101, &sAttributes_specs[101] },
39849 { &sAttributes_disablers103, &sAttributes_specs[103] },
39850 { &sAttributes_disablers105, &sAttributes_specs[105] },
39851 { &sAttributes_disablers107, &sAttributes_specs[107] },
39852 { &sAttributes_disablers109, &sAttributes_specs[109] },
39853 { nullptr, &sAttributes_specs[111] },
39854 { nullptr, nullptr }
39855};
39856
39857static_assert(17 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39858 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39859static_assert(75 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39860 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39861
39862static const JSPropertySpec sChromeAttributes_specs[] = {
39863 JSPropertySpec::nativeAccessors("putForwardsAttr3", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &putForwardsAttr3_getterinfo, GenericSetter<NormalThisPolicy>, &putForwardsAttr3_setterinfo),
39864 JS_PS_ENDJSPropertySpec::sentinel()
39865};
39866
39867
39868static const Prefable<const JSPropertySpec> sChromeAttributes[] = {
39869 { nullptr, &sChromeAttributes_specs[0] },
39870 { nullptr, nullptr }
39871};
39872
39873static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39874 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39875static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39876 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39877
39878static const JSFunctionSpec sUnforgeableMethods_specs[] = {
39879 JS_FNSPEC("unforgeableMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&unforgeableMethod_methodinfo), 0, JSPROP_ENUMERATE | JSPROP_PERMANENT | JSPROP_READONLY, nullptr){JSFunctionSpec::Name("unforgeableMethod"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&unforgeableMethod_methodinfo)}, 0, JSPROP_ENUMERATE
| JSPROP_PERMANENT | JSPROP_READONLY, nullptr}
,
39880 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
39881};
39882
39883
39884static const Prefable<const JSFunctionSpec> sUnforgeableMethods[] = {
39885 { nullptr, &sUnforgeableMethods_specs[0] },
39886 { nullptr, nullptr }
39887};
39888
39889static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39890 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39891static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39892 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39893
39894static const JSFunctionSpec sChromeUnforgeableMethods_specs[] = {
39895 JS_FNSPEC("unforgeableMethod2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&unforgeableMethod2_methodinfo), 0, JSPROP_ENUMERATE | JSPROP_PERMANENT | JSPROP_READONLY, nullptr){JSFunctionSpec::Name("unforgeableMethod2"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&unforgeableMethod2_methodinfo)}, 0, JSPROP_ENUMERATE
| JSPROP_PERMANENT | JSPROP_READONLY, nullptr}
,
39896 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
39897};
39898
39899
39900static const Prefable<const JSFunctionSpec> sChromeUnforgeableMethods[] = {
39901 { nullptr, &sChromeUnforgeableMethods_specs[0] },
39902 { nullptr, nullptr }
39903};
39904
39905static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39906 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39907static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39908 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39909
39910static const JSPropertySpec sUnforgeableAttributes_specs[] = {
39911 JSPropertySpec::nativeAccessors("unforgeableAttr", JSPROP_ENUMERATE | JSPROP_PERMANENT, GenericGetter<NormalThisPolicy, ThrowExceptions>, &unforgeableAttr_getterinfo, nullptr, nullptr),
39912 JS_PS_ENDJSPropertySpec::sentinel()
39913};
39914
39915
39916static const Prefable<const JSPropertySpec> sUnforgeableAttributes[] = {
39917 { nullptr, &sUnforgeableAttributes_specs[0] },
39918 { nullptr, nullptr }
39919};
39920
39921static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39922 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39923static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39924 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39925
39926static const JSPropertySpec sChromeUnforgeableAttributes_specs[] = {
39927 JSPropertySpec::nativeAccessors("unforgeableAttr2", JSPROP_ENUMERATE | JSPROP_PERMANENT, GenericGetter<NormalThisPolicy, ThrowExceptions>, &unforgeableAttr2_getterinfo, nullptr, nullptr),
39928 JS_PS_ENDJSPropertySpec::sentinel()
39929};
39930
39931
39932static const Prefable<const JSPropertySpec> sChromeUnforgeableAttributes[] = {
39933 { nullptr, &sChromeUnforgeableAttributes_specs[0] },
39934 { nullptr, nullptr }
39935};
39936
39937static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39938 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39939static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39940 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39941
39942static const ConstantSpec sConstants_specs[] = {
39943 { "myLongConstant", JS::Int32Value(5) },
39944 { "nonEnumerableConst", JS::BooleanValue(true) },
39945 { 0, JS::UndefinedValue() }
39946};
39947
39948
39949static const Prefable<const ConstantSpec> sConstants[] = {
39950 { nullptr, &sConstants_specs[0] },
39951 { nullptr, nullptr }
39952};
39953
39954static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
39955 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
39956static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
39957 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
39958
39959
39960static uint16_t sNativeProperties_sortedPropertyIndices[587];
39961static PropertyInfo sNativeProperties_propertyInfos[587];
39962
39963static const NativePropertiesN<7> sNativeProperties = {
39964 true, 0 /* sStaticMethods */,
39965 true, 1 /* sStaticAttributes */,
39966 true, 2 /* sMethods */,
39967 true, 3 /* sAttributes */,
39968 true, 4 /* sUnforgeableMethods */,
39969 true, 5 /* sUnforgeableAttributes */,
39970 true, 6 /* sConstants */,
39971 -1,
39972 587,
39973 sNativeProperties_sortedPropertyIndices,
39974 {
39975 { sStaticMethods, &sNativeProperties_propertyInfos[0] },
39976 { sStaticAttributes, &sNativeProperties_propertyInfos[4] },
39977 { sMethods, &sNativeProperties_propertyInfos[6] },
39978 { sAttributes, &sNativeProperties_propertyInfos[464] },
39979 { sUnforgeableMethods, &sNativeProperties_propertyInfos[583] },
39980 { sUnforgeableAttributes, &sNativeProperties_propertyInfos[584] },
39981 { sConstants, &sNativeProperties_propertyInfos[585] }
39982 }
39983};
39984static_assert(587 < 1ull << (CHAR_BIT8 * sizeof(sNativeProperties.propertyInfoCount)),
39985 "We have a property info count that is oversized");
39986
39987static uint16_t sChromeOnlyNativeProperties_sortedPropertyIndices[3];
39988static PropertyInfo sChromeOnlyNativeProperties_propertyInfos[3];
39989
39990static const NativePropertiesN<3> sChromeOnlyNativeProperties = {
39991 false, 0,
39992 false, 0,
39993 false, 0,
39994 true, 0 /* sChromeAttributes */,
39995 true, 1 /* sChromeUnforgeableMethods */,
39996 true, 2 /* sChromeUnforgeableAttributes */,
39997 false, 0,
39998 -1,
39999 3,
40000 sChromeOnlyNativeProperties_sortedPropertyIndices,
40001 {
40002 { sChromeAttributes, &sChromeOnlyNativeProperties_propertyInfos[0] },
40003 { sChromeUnforgeableMethods, &sChromeOnlyNativeProperties_propertyInfos[1] },
40004 { sChromeUnforgeableAttributes, &sChromeOnlyNativeProperties_propertyInfos[2] }
40005 }
40006};
40007static_assert(3 < 1ull << (CHAR_BIT8 * sizeof(sChromeOnlyNativeProperties.propertyInfoCount)),
40008 "We have a property info count that is oversized");
40009
40010MOZ_CAN_RUN_SCRIPT bool
40011CollectJSONAttributes(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::TestExampleInterface* self, JS::Rooted<JSObject*>& result)
40012{
40013 JS::Rooted<JSObject*> unwrappedObj(cx, js::CheckedUnwrapStatic(obj));
40014 if (!unwrappedObj) {
40015 // How did that happen? We managed to get called with that
40016 // object as "this"! Just give up on sanity.
40017 return false;
40018 }
40019
40020 { // scope for "temp"
40021 JS::Rooted<JS::Value> temp(cx);
40022 if (!get_readonlyByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40023 return false;
40024 }
40025 if (!JS_DefineProperty(cx, result, "readonlyByte", temp, JSPROP_ENUMERATE)) {
40026 return false;
40027 }
40028 }
40029 { // scope for "temp"
40030 JS::Rooted<JS::Value> temp(cx);
40031 if (!get_writableByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40032 return false;
40033 }
40034 if (!JS_DefineProperty(cx, result, "writableByte", temp, JSPROP_ENUMERATE)) {
40035 return false;
40036 }
40037 }
40038 { // scope for "temp"
40039 JS::Rooted<JS::Value> temp(cx);
40040 if (!get_cachedByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40041 return false;
40042 }
40043 if (!JS_DefineProperty(cx, result, "cachedByte", temp, JSPROP_ENUMERATE)) {
40044 return false;
40045 }
40046 }
40047 { // scope for "temp"
40048 JS::Rooted<JS::Value> temp(cx);
40049 if (!get_cachedConstantByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40050 return false;
40051 }
40052 if (!JS_DefineProperty(cx, result, "cachedConstantByte", temp, JSPROP_ENUMERATE)) {
40053 return false;
40054 }
40055 }
40056 { // scope for "temp"
40057 JS::Rooted<JS::Value> temp(cx);
40058 if (!get_cachedWritableByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40059 return false;
40060 }
40061 if (!JS_DefineProperty(cx, result, "cachedWritableByte", temp, JSPROP_ENUMERATE)) {
40062 return false;
40063 }
40064 }
40065 { // scope for "temp"
40066 JS::Rooted<JS::Value> temp(cx);
40067 if (!get_sideEffectFreeByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40068 return false;
40069 }
40070 if (!JS_DefineProperty(cx, result, "sideEffectFreeByte", temp, JSPROP_ENUMERATE)) {
40071 return false;
40072 }
40073 }
40074 { // scope for "temp"
40075 JS::Rooted<JS::Value> temp(cx);
40076 if (!get_domDependentByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40077 return false;
40078 }
40079 if (!JS_DefineProperty(cx, result, "domDependentByte", temp, JSPROP_ENUMERATE)) {
40080 return false;
40081 }
40082 }
40083 { // scope for "temp"
40084 JS::Rooted<JS::Value> temp(cx);
40085 if (!get_constantByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40086 return false;
40087 }
40088 if (!JS_DefineProperty(cx, result, "constantByte", temp, JSPROP_ENUMERATE)) {
40089 return false;
40090 }
40091 }
40092 { // scope for "temp"
40093 JS::Rooted<JS::Value> temp(cx);
40094 if (!get_deviceStateDependentByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40095 return false;
40096 }
40097 if (!JS_DefineProperty(cx, result, "deviceStateDependentByte", temp, JSPROP_ENUMERATE)) {
40098 return false;
40099 }
40100 }
40101 { // scope for "temp"
40102 JS::Rooted<JS::Value> temp(cx);
40103 if (!get_readonlyShort(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40104 return false;
40105 }
40106 if (!JS_DefineProperty(cx, result, "readonlyShort", temp, JSPROP_ENUMERATE)) {
40107 return false;
40108 }
40109 }
40110 { // scope for "temp"
40111 JS::Rooted<JS::Value> temp(cx);
40112 if (!get_writableShort(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40113 return false;
40114 }
40115 if (!JS_DefineProperty(cx, result, "writableShort", temp, JSPROP_ENUMERATE)) {
40116 return false;
40117 }
40118 }
40119 { // scope for "temp"
40120 JS::Rooted<JS::Value> temp(cx);
40121 if (!get_readonlyLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40122 return false;
40123 }
40124 if (!JS_DefineProperty(cx, result, "readonlyLong", temp, JSPROP_ENUMERATE)) {
40125 return false;
40126 }
40127 }
40128 { // scope for "temp"
40129 JS::Rooted<JS::Value> temp(cx);
40130 if (!get_writableLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40131 return false;
40132 }
40133 if (!JS_DefineProperty(cx, result, "writableLong", temp, JSPROP_ENUMERATE)) {
40134 return false;
40135 }
40136 }
40137 { // scope for "temp"
40138 JS::Rooted<JS::Value> temp(cx);
40139 if (!get_readonlyLongLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40140 return false;
40141 }
40142 if (!JS_DefineProperty(cx, result, "readonlyLongLong", temp, JSPROP_ENUMERATE)) {
40143 return false;
40144 }
40145 }
40146 { // scope for "temp"
40147 JS::Rooted<JS::Value> temp(cx);
40148 if (!get_writableLongLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40149 return false;
40150 }
40151 if (!JS_DefineProperty(cx, result, "writableLongLong", temp, JSPROP_ENUMERATE)) {
40152 return false;
40153 }
40154 }
40155 { // scope for "temp"
40156 JS::Rooted<JS::Value> temp(cx);
40157 if (!get_readonlyOctet(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40158 return false;
40159 }
40160 if (!JS_DefineProperty(cx, result, "readonlyOctet", temp, JSPROP_ENUMERATE)) {
40161 return false;
40162 }
40163 }
40164 { // scope for "temp"
40165 JS::Rooted<JS::Value> temp(cx);
40166 if (!get_writableOctet(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40167 return false;
40168 }
40169 if (!JS_DefineProperty(cx, result, "writableOctet", temp, JSPROP_ENUMERATE)) {
40170 return false;
40171 }
40172 }
40173 { // scope for "temp"
40174 JS::Rooted<JS::Value> temp(cx);
40175 if (!get_readonlyUnsignedShort(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40176 return false;
40177 }
40178 if (!JS_DefineProperty(cx, result, "readonlyUnsignedShort", temp, JSPROP_ENUMERATE)) {
40179 return false;
40180 }
40181 }
40182 { // scope for "temp"
40183 JS::Rooted<JS::Value> temp(cx);
40184 if (!get_writableUnsignedShort(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40185 return false;
40186 }
40187 if (!JS_DefineProperty(cx, result, "writableUnsignedShort", temp, JSPROP_ENUMERATE)) {
40188 return false;
40189 }
40190 }
40191 { // scope for "temp"
40192 JS::Rooted<JS::Value> temp(cx);
40193 if (!get_readonlyUnsignedLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40194 return false;
40195 }
40196 if (!JS_DefineProperty(cx, result, "readonlyUnsignedLong", temp, JSPROP_ENUMERATE)) {
40197 return false;
40198 }
40199 }
40200 { // scope for "temp"
40201 JS::Rooted<JS::Value> temp(cx);
40202 if (!get_writableUnsignedLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40203 return false;
40204 }
40205 if (!JS_DefineProperty(cx, result, "writableUnsignedLong", temp, JSPROP_ENUMERATE)) {
40206 return false;
40207 }
40208 }
40209 { // scope for "temp"
40210 JS::Rooted<JS::Value> temp(cx);
40211 if (!get_readonlyUnsignedLongLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40212 return false;
40213 }
40214 if (!JS_DefineProperty(cx, result, "readonlyUnsignedLongLong", temp, JSPROP_ENUMERATE)) {
40215 return false;
40216 }
40217 }
40218 { // scope for "temp"
40219 JS::Rooted<JS::Value> temp(cx);
40220 if (!get_writableUnsignedLongLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40221 return false;
40222 }
40223 if (!JS_DefineProperty(cx, result, "writableUnsignedLongLong", temp, JSPROP_ENUMERATE)) {
40224 return false;
40225 }
40226 }
40227 { // scope for "temp"
40228 JS::Rooted<JS::Value> temp(cx);
40229 if (!get_writableFloat(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40230 return false;
40231 }
40232 if (!JS_DefineProperty(cx, result, "writableFloat", temp, JSPROP_ENUMERATE)) {
40233 return false;
40234 }
40235 }
40236 { // scope for "temp"
40237 JS::Rooted<JS::Value> temp(cx);
40238 if (!get_writableUnrestrictedFloat(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40239 return false;
40240 }
40241 if (!JS_DefineProperty(cx, result, "writableUnrestrictedFloat", temp, JSPROP_ENUMERATE)) {
40242 return false;
40243 }
40244 }
40245 { // scope for "temp"
40246 JS::Rooted<JS::Value> temp(cx);
40247 if (!get_writableNullableFloat(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40248 return false;
40249 }
40250 if (!JS_DefineProperty(cx, result, "writableNullableFloat", temp, JSPROP_ENUMERATE)) {
40251 return false;
40252 }
40253 }
40254 { // scope for "temp"
40255 JS::Rooted<JS::Value> temp(cx);
40256 if (!get_writableNullableUnrestrictedFloat(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40257 return false;
40258 }
40259 if (!JS_DefineProperty(cx, result, "writableNullableUnrestrictedFloat", temp, JSPROP_ENUMERATE)) {
40260 return false;
40261 }
40262 }
40263 { // scope for "temp"
40264 JS::Rooted<JS::Value> temp(cx);
40265 if (!get_writableDouble(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40266 return false;
40267 }
40268 if (!JS_DefineProperty(cx, result, "writableDouble", temp, JSPROP_ENUMERATE)) {
40269 return false;
40270 }
40271 }
40272 { // scope for "temp"
40273 JS::Rooted<JS::Value> temp(cx);
40274 if (!get_writableUnrestrictedDouble(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40275 return false;
40276 }
40277 if (!JS_DefineProperty(cx, result, "writableUnrestrictedDouble", temp, JSPROP_ENUMERATE)) {
40278 return false;
40279 }
40280 }
40281 { // scope for "temp"
40282 JS::Rooted<JS::Value> temp(cx);
40283 if (!get_writableNullableDouble(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40284 return false;
40285 }
40286 if (!JS_DefineProperty(cx, result, "writableNullableDouble", temp, JSPROP_ENUMERATE)) {
40287 return false;
40288 }
40289 }
40290 { // scope for "temp"
40291 JS::Rooted<JS::Value> temp(cx);
40292 if (!get_writableNullableUnrestrictedDouble(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40293 return false;
40294 }
40295 if (!JS_DefineProperty(cx, result, "writableNullableUnrestrictedDouble", temp, JSPROP_ENUMERATE)) {
40296 return false;
40297 }
40298 }
40299 { // scope for "temp"
40300 JS::Rooted<JS::Value> temp(cx);
40301 if (!get_lenientFloatAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40302 return false;
40303 }
40304 if (!JS_DefineProperty(cx, result, "lenientFloatAttr", temp, JSPROP_ENUMERATE)) {
40305 return false;
40306 }
40307 }
40308 { // scope for "temp"
40309 JS::Rooted<JS::Value> temp(cx);
40310 if (!get_lenientDoubleAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40311 return false;
40312 }
40313 if (!JS_DefineProperty(cx, result, "lenientDoubleAttr", temp, JSPROP_ENUMERATE)) {
40314 return false;
40315 }
40316 }
40317 { // scope for "temp"
40318 JS::Rooted<JS::Value> temp(cx);
40319 if (!get_nonNullSelf(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40320 return false;
40321 }
40322 if (!JS_DefineProperty(cx, result, "nonNullSelf", temp, JSPROP_ENUMERATE)) {
40323 return false;
40324 }
40325 }
40326 { // scope for "temp"
40327 JS::Rooted<JS::Value> temp(cx);
40328 if (!get_nullableSelf(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40329 return false;
40330 }
40331 if (!JS_DefineProperty(cx, result, "nullableSelf", temp, JSPROP_ENUMERATE)) {
40332 return false;
40333 }
40334 }
40335 { // scope for "temp"
40336 JS::Rooted<JS::Value> temp(cx);
40337 if (!get_cachedSelf(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40338 return false;
40339 }
40340 if (!JS_DefineProperty(cx, result, "cachedSelf", temp, JSPROP_ENUMERATE)) {
40341 return false;
40342 }
40343 }
40344 { // scope for "temp"
40345 JS::Rooted<JS::Value> temp(cx);
40346 if (!get_readonlySequence(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40347 return false;
40348 }
40349 if (!JS_DefineProperty(cx, result, "readonlySequence", temp, JSPROP_ENUMERATE)) {
40350 return false;
40351 }
40352 }
40353 { // scope for "temp"
40354 JS::Rooted<JS::Value> temp(cx);
40355 if (!get_readonlyFrozenSequence(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40356 return false;
40357 }
40358 if (!JS_DefineProperty(cx, result, "readonlyFrozenSequence", temp, JSPROP_ENUMERATE)) {
40359 return false;
40360 }
40361 }
40362 { // scope for "temp"
40363 JS::Rooted<JS::Value> temp(cx);
40364 if (!get_readonlyFrozenNullableSequence(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40365 return false;
40366 }
40367 if (!JS_DefineProperty(cx, result, "readonlyFrozenNullableSequence", temp, JSPROP_ENUMERATE)) {
40368 return false;
40369 }
40370 }
40371 { // scope for "temp"
40372 JS::Rooted<JS::Value> temp(cx);
40373 if (!get_readonlyJSStringAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40374 return false;
40375 }
40376 if (!JS_DefineProperty(cx, result, "readonlyJSStringAttr", temp, JSPROP_ENUMERATE)) {
40377 return false;
40378 }
40379 }
40380 { // scope for "temp"
40381 JS::Rooted<JS::Value> temp(cx);
40382 if (!get_jsStringAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40383 return false;
40384 }
40385 if (!JS_DefineProperty(cx, result, "jsStringAttr", temp, JSPROP_ENUMERATE)) {
40386 return false;
40387 }
40388 }
40389 { // scope for "temp"
40390 JS::Rooted<JS::Value> temp(cx);
40391 if (!get_enumAttribute(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40392 return false;
40393 }
40394 if (!JS_DefineProperty(cx, result, "enumAttribute", temp, JSPROP_ENUMERATE)) {
40395 return false;
40396 }
40397 }
40398 { // scope for "temp"
40399 JS::Rooted<JS::Value> temp(cx);
40400 if (!get_readonlyEnumAttribute(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40401 return false;
40402 }
40403 if (!JS_DefineProperty(cx, result, "readonlyEnumAttribute", temp, JSPROP_ENUMERATE)) {
40404 return false;
40405 }
40406 }
40407 { // scope for "temp"
40408 JS::Rooted<JS::Value> temp(cx);
40409 if (!get_booleanObservableArray(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40410 return false;
40411 }
40412 if (!JS_DefineProperty(cx, result, "booleanObservableArray", temp, JSPROP_ENUMERATE)) {
40413 return false;
40414 }
40415 }
40416 { // scope for "temp"
40417 JS::Rooted<JS::Value> temp(cx);
40418 if (!get_objectObservableArray(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40419 return false;
40420 }
40421 if (!JS_DefineProperty(cx, result, "objectObservableArray", temp, JSPROP_ENUMERATE)) {
40422 return false;
40423 }
40424 }
40425 { // scope for "temp"
40426 JS::Rooted<JS::Value> temp(cx);
40427 if (!get_interfaceObservableArray(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40428 return false;
40429 }
40430 if (!JS_DefineProperty(cx, result, "interfaceObservableArray", temp, JSPROP_ENUMERATE)) {
40431 return false;
40432 }
40433 }
40434 { // scope for "temp"
40435 JS::Rooted<JS::Value> temp(cx);
40436 if (!get_nullableObservableArray(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40437 return false;
40438 }
40439 if (!JS_DefineProperty(cx, result, "nullableObservableArray", temp, JSPROP_ENUMERATE)) {
40440 return false;
40441 }
40442 }
40443 { // scope for "temp"
40444 JS::Rooted<JS::Value> temp(cx);
40445 if (!get_attributeGetterRenamedFrom(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40446 return false;
40447 }
40448 if (!JS_DefineProperty(cx, result, "attributeGetterRenamedFrom", temp, JSPROP_ENUMERATE)) {
40449 return false;
40450 }
40451 }
40452 { // scope for "temp"
40453 JS::Rooted<JS::Value> temp(cx);
40454 if (!get_attributeRenamedFrom(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40455 return false;
40456 }
40457 if (!JS_DefineProperty(cx, result, "attributeRenamedFrom", temp, JSPROP_ENUMERATE)) {
40458 return false;
40459 }
40460 }
40461 { // scope for "temp"
40462 JS::Rooted<JS::Value> temp(cx);
40463 if (!get_enforcedByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40464 return false;
40465 }
40466 if (!JS_DefineProperty(cx, result, "enforcedByte", temp, JSPROP_ENUMERATE)) {
40467 return false;
40468 }
40469 }
40470 { // scope for "temp"
40471 JS::Rooted<JS::Value> temp(cx);
40472 if (!get_enforcedByteNullable(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40473 return false;
40474 }
40475 if (!JS_DefineProperty(cx, result, "enforcedByteNullable", temp, JSPROP_ENUMERATE)) {
40476 return false;
40477 }
40478 }
40479 { // scope for "temp"
40480 JS::Rooted<JS::Value> temp(cx);
40481 if (!get_clampedByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40482 return false;
40483 }
40484 if (!JS_DefineProperty(cx, result, "clampedByte", temp, JSPROP_ENUMERATE)) {
40485 return false;
40486 }
40487 }
40488 { // scope for "temp"
40489 JS::Rooted<JS::Value> temp(cx);
40490 if (!get_clampedByteNullable(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40491 return false;
40492 }
40493 if (!JS_DefineProperty(cx, result, "clampedByteNullable", temp, JSPROP_ENUMERATE)) {
40494 return false;
40495 }
40496 }
40497 { // scope for "temp"
40498 JS::Rooted<JS::Value> temp(cx);
40499 if (!get_deprecatedAttribute(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40500 return false;
40501 }
40502 if (!JS_DefineProperty(cx, result, "deprecatedAttribute", temp, JSPROP_ENUMERATE)) {
40503 return false;
40504 }
40505 }
40506 // This is unfortunately a linear scan through sAttributes, but we
40507 // only do it for things which _might_ be disabled, which should
40508 // help keep the performance problems down.
40509 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable1, sAttributes)) {
40510 JS::Rooted<JS::Value> temp(cx);
40511 if (!get_prefable1(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40512 return false;
40513 }
40514 if (!JS_DefineProperty(cx, result, "prefable1", temp, JSPROP_ENUMERATE)) {
40515 return false;
40516 }
40517 }
40518 // This is unfortunately a linear scan through sAttributes, but we
40519 // only do it for things which _might_ be disabled, which should
40520 // help keep the performance problems down.
40521 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable2, sAttributes)) {
40522 JS::Rooted<JS::Value> temp(cx);
40523 if (!get_prefable2(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40524 return false;
40525 }
40526 if (!JS_DefineProperty(cx, result, "prefable2", temp, JSPROP_ENUMERATE)) {
40527 return false;
40528 }
40529 }
40530 // This is unfortunately a linear scan through sAttributes, but we
40531 // only do it for things which _might_ be disabled, which should
40532 // help keep the performance problems down.
40533 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable3, sAttributes)) {
40534 JS::Rooted<JS::Value> temp(cx);
40535 if (!get_prefable3(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40536 return false;
40537 }
40538 if (!JS_DefineProperty(cx, result, "prefable3", temp, JSPROP_ENUMERATE)) {
40539 return false;
40540 }
40541 }
40542 // This is unfortunately a linear scan through sAttributes, but we
40543 // only do it for things which _might_ be disabled, which should
40544 // help keep the performance problems down.
40545 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable4, sAttributes)) {
40546 JS::Rooted<JS::Value> temp(cx);
40547 if (!get_prefable4(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40548 return false;
40549 }
40550 if (!JS_DefineProperty(cx, result, "prefable4", temp, JSPROP_ENUMERATE)) {
40551 return false;
40552 }
40553 }
40554 // This is unfortunately a linear scan through sAttributes, but we
40555 // only do it for things which _might_ be disabled, which should
40556 // help keep the performance problems down.
40557 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable5, sAttributes)) {
40558 JS::Rooted<JS::Value> temp(cx);
40559 if (!get_prefable5(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40560 return false;
40561 }
40562 if (!JS_DefineProperty(cx, result, "prefable5", temp, JSPROP_ENUMERATE)) {
40563 return false;
40564 }
40565 }
40566 // This is unfortunately a linear scan through sAttributes, but we
40567 // only do it for things which _might_ be disabled, which should
40568 // help keep the performance problems down.
40569 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable6, sAttributes)) {
40570 JS::Rooted<JS::Value> temp(cx);
40571 if (!get_prefable6(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40572 return false;
40573 }
40574 if (!JS_DefineProperty(cx, result, "prefable6", temp, JSPROP_ENUMERATE)) {
40575 return false;
40576 }
40577 }
40578 // This is unfortunately a linear scan through sAttributes, but we
40579 // only do it for things which _might_ be disabled, which should
40580 // help keep the performance problems down.
40581 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable7, sAttributes)) {
40582 JS::Rooted<JS::Value> temp(cx);
40583 if (!get_prefable7(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40584 return false;
40585 }
40586 if (!JS_DefineProperty(cx, result, "prefable7", temp, JSPROP_ENUMERATE)) {
40587 return false;
40588 }
40589 }
40590 // This is unfortunately a linear scan through sAttributes, but we
40591 // only do it for things which _might_ be disabled, which should
40592 // help keep the performance problems down.
40593 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable8, sAttributes)) {
40594 JS::Rooted<JS::Value> temp(cx);
40595 if (!get_prefable8(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40596 return false;
40597 }
40598 if (!JS_DefineProperty(cx, result, "prefable8", temp, JSPROP_ENUMERATE)) {
40599 return false;
40600 }
40601 }
40602 // This is unfortunately a linear scan through sAttributes, but we
40603 // only do it for things which _might_ be disabled, which should
40604 // help keep the performance problems down.
40605 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable9, sAttributes)) {
40606 JS::Rooted<JS::Value> temp(cx);
40607 if (!get_prefable9(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40608 return false;
40609 }
40610 if (!JS_DefineProperty(cx, result, "prefable9", temp, JSPROP_ENUMERATE)) {
40611 return false;
40612 }
40613 }
40614 // This is unfortunately a linear scan through sAttributes, but we
40615 // only do it for things which _might_ be disabled, which should
40616 // help keep the performance problems down.
40617 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable12, sAttributes)) {
40618 JS::Rooted<JS::Value> temp(cx);
40619 if (!get_prefable12(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40620 return false;
40621 }
40622 if (!JS_DefineProperty(cx, result, "prefable12", temp, JSPROP_ENUMERATE)) {
40623 return false;
40624 }
40625 }
40626 // This is unfortunately a linear scan through sAttributes, but we
40627 // only do it for things which _might_ be disabled, which should
40628 // help keep the performance problems down.
40629 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable14, sAttributes)) {
40630 JS::Rooted<JS::Value> temp(cx);
40631 if (!get_prefable14(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40632 return false;
40633 }
40634 if (!JS_DefineProperty(cx, result, "prefable14", temp, JSPROP_ENUMERATE)) {
40635 return false;
40636 }
40637 }
40638 // This is unfortunately a linear scan through sAttributes, but we
40639 // only do it for things which _might_ be disabled, which should
40640 // help keep the performance problems down.
40641 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable15, sAttributes)) {
40642 JS::Rooted<JS::Value> temp(cx);
40643 if (!get_prefable15(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40644 return false;
40645 }
40646 if (!JS_DefineProperty(cx, result, "prefable15", temp, JSPROP_ENUMERATE)) {
40647 return false;
40648 }
40649 }
40650 // This is unfortunately a linear scan through sAttributes, but we
40651 // only do it for things which _might_ be disabled, which should
40652 // help keep the performance problems down.
40653 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable16, sAttributes)) {
40654 JS::Rooted<JS::Value> temp(cx);
40655 if (!get_prefable16(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40656 return false;
40657 }
40658 if (!JS_DefineProperty(cx, result, "prefable16", temp, JSPROP_ENUMERATE)) {
40659 return false;
40660 }
40661 }
40662 // This is unfortunately a linear scan through sAttributes, but we
40663 // only do it for things which _might_ be disabled, which should
40664 // help keep the performance problems down.
40665 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable21, sAttributes)) {
40666 JS::Rooted<JS::Value> temp(cx);
40667 if (!get_prefable21(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40668 return false;
40669 }
40670 if (!JS_DefineProperty(cx, result, "prefable21", temp, JSPROP_ENUMERATE)) {
40671 return false;
40672 }
40673 }
40674 // This is unfortunately a linear scan through sAttributes, but we
40675 // only do it for things which _might_ be disabled, which should
40676 // help keep the performance problems down.
40677 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable22, sAttributes)) {
40678 JS::Rooted<JS::Value> temp(cx);
40679 if (!get_prefable22(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40680 return false;
40681 }
40682 if (!JS_DefineProperty(cx, result, "prefable22", temp, JSPROP_ENUMERATE)) {
40683 return false;
40684 }
40685 }
40686 // This is unfortunately a linear scan through sAttributes, but we
40687 // only do it for things which _might_ be disabled, which should
40688 // help keep the performance problems down.
40689 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_conditionalOnSecureContext1, sAttributes)) {
40690 JS::Rooted<JS::Value> temp(cx);
40691 if (!get_conditionalOnSecureContext1(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40692 return false;
40693 }
40694 if (!JS_DefineProperty(cx, result, "conditionalOnSecureContext1", temp, JSPROP_ENUMERATE)) {
40695 return false;
40696 }
40697 }
40698 // This is unfortunately a linear scan through sAttributes, but we
40699 // only do it for things which _might_ be disabled, which should
40700 // help keep the performance problems down.
40701 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_conditionalOnSecureContext2, sAttributes)) {
40702 JS::Rooted<JS::Value> temp(cx);
40703 if (!get_conditionalOnSecureContext2(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40704 return false;
40705 }
40706 if (!JS_DefineProperty(cx, result, "conditionalOnSecureContext2", temp, JSPROP_ENUMERATE)) {
40707 return false;
40708 }
40709 }
40710 // This is unfortunately a linear scan through sAttributes, but we
40711 // only do it for things which _might_ be disabled, which should
40712 // help keep the performance problems down.
40713 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_conditionalOnSecureContext3, sAttributes)) {
40714 JS::Rooted<JS::Value> temp(cx);
40715 if (!get_conditionalOnSecureContext3(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40716 return false;
40717 }
40718 if (!JS_DefineProperty(cx, result, "conditionalOnSecureContext3", temp, JSPROP_ENUMERATE)) {
40719 return false;
40720 }
40721 }
40722 // This is unfortunately a linear scan through sAttributes, but we
40723 // only do it for things which _might_ be disabled, which should
40724 // help keep the performance problems down.
40725 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_conditionalOnSecureContext4, sAttributes)) {
40726 JS::Rooted<JS::Value> temp(cx);
40727 if (!get_conditionalOnSecureContext4(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40728 return false;
40729 }
40730 if (!JS_DefineProperty(cx, result, "conditionalOnSecureContext4", temp, JSPROP_ENUMERATE)) {
40731 return false;
40732 }
40733 }
40734 // This is unfortunately a linear scan through sAttributes, but we
40735 // only do it for things which _might_ be disabled, which should
40736 // help keep the performance problems down.
40737 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_conditionalOnSecureContext9, sAttributes)) {
40738 JS::Rooted<JS::Value> temp(cx);
40739 if (!get_conditionalOnSecureContext9(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40740 return false;
40741 }
40742 if (!JS_DefineProperty(cx, result, "conditionalOnSecureContext9", temp, JSPROP_ENUMERATE)) {
40743 return false;
40744 }
40745 }
40746 { // scope for "temp"
40747 JS::Rooted<JS::Value> temp(cx);
40748 if (!get_attrWithLenientThis(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40749 return false;
40750 }
40751 if (!JS_DefineProperty(cx, result, "attrWithLenientThis", temp, JSPROP_ENUMERATE)) {
40752 return false;
40753 }
40754 }
40755 { // scope for "temp"
40756 JS::Rooted<JS::Value> temp(cx);
40757 if (!get_unforgeableAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40758 return false;
40759 }
40760 if (!JS_DefineProperty(cx, result, "unforgeableAttr", temp, JSPROP_ENUMERATE)) {
40761 return false;
40762 }
40763 }
40764 { // scope for "temp"
40765 JS::Rooted<JS::Value> temp(cx);
40766 if (!get_unforgeableAttr2(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40767 return false;
40768 }
40769 if (!JS_DefineProperty(cx, result, "unforgeableAttr2", temp, JSPROP_ENUMERATE)) {
40770 return false;
40771 }
40772 }
40773 { // scope for "temp"
40774 JS::Rooted<JS::Value> temp(cx);
40775 if (!get_putForwardsAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40776 return false;
40777 }
40778 if (!JS_DefineProperty(cx, result, "putForwardsAttr", temp, JSPROP_ENUMERATE)) {
40779 return false;
40780 }
40781 }
40782 { // scope for "temp"
40783 JS::Rooted<JS::Value> temp(cx);
40784 if (!get_putForwardsAttr2(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40785 return false;
40786 }
40787 if (!JS_DefineProperty(cx, result, "putForwardsAttr2", temp, JSPROP_ENUMERATE)) {
40788 return false;
40789 }
40790 }
40791 { // scope for "temp"
40792 JS::Rooted<JS::Value> temp(cx);
40793 if (!get_putForwardsAttr3(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40794 return false;
40795 }
40796 if (!JS_DefineProperty(cx, result, "putForwardsAttr3", temp, JSPROP_ENUMERATE)) {
40797 return false;
40798 }
40799 }
40800 { // scope for "temp"
40801 JS::Rooted<JS::Value> temp(cx);
40802 if (!get_throwingAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40803 return false;
40804 }
40805 if (!JS_DefineProperty(cx, result, "throwingAttr", temp, JSPROP_ENUMERATE)) {
40806 return false;
40807 }
40808 }
40809 { // scope for "temp"
40810 JS::Rooted<JS::Value> temp(cx);
40811 if (!get_throwingGetterAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40812 return false;
40813 }
40814 if (!JS_DefineProperty(cx, result, "throwingGetterAttr", temp, JSPROP_ENUMERATE)) {
40815 return false;
40816 }
40817 }
40818 { // scope for "temp"
40819 JS::Rooted<JS::Value> temp(cx);
40820 if (!get_throwingSetterAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40821 return false;
40822 }
40823 if (!JS_DefineProperty(cx, result, "throwingSetterAttr", temp, JSPROP_ENUMERATE)) {
40824 return false;
40825 }
40826 }
40827 { // scope for "temp"
40828 JS::Rooted<JS::Value> temp(cx);
40829 if (!get_canOOMAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40830 return false;
40831 }
40832 if (!JS_DefineProperty(cx, result, "canOOMAttr", temp, JSPROP_ENUMERATE)) {
40833 return false;
40834 }
40835 }
40836 { // scope for "temp"
40837 JS::Rooted<JS::Value> temp(cx);
40838 if (!get_canOOMGetterAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40839 return false;
40840 }
40841 if (!JS_DefineProperty(cx, result, "canOOMGetterAttr", temp, JSPROP_ENUMERATE)) {
40842 return false;
40843 }
40844 }
40845 { // scope for "temp"
40846 JS::Rooted<JS::Value> temp(cx);
40847 if (!get_canOOMSetterAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40848 return false;
40849 }
40850 if (!JS_DefineProperty(cx, result, "canOOMSetterAttr", temp, JSPROP_ENUMERATE)) {
40851 return false;
40852 }
40853 }
40854 { // scope for "temp"
40855 JS::Rooted<JS::Value> temp(cx);
40856 if (!get_needsSubjectPrincipalAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40857 return false;
40858 }
40859 if (!JS_DefineProperty(cx, result, "needsSubjectPrincipalAttr", temp, JSPROP_ENUMERATE)) {
40860 return false;
40861 }
40862 }
40863 { // scope for "temp"
40864 JS::Rooted<JS::Value> temp(cx);
40865 if (!get_needsNonSystemSubjectPrincipalAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40866 return false;
40867 }
40868 if (!JS_DefineProperty(cx, result, "needsNonSystemSubjectPrincipalAttr", temp, JSPROP_ENUMERATE)) {
40869 return false;
40870 }
40871 }
40872 { // scope for "temp"
40873 JS::Rooted<JS::Value> temp(cx);
40874 if (!get_needsCallerTypeAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40875 return false;
40876 }
40877 if (!JS_DefineProperty(cx, result, "needsCallerTypeAttr", temp, JSPROP_ENUMERATE)) {
40878 return false;
40879 }
40880 }
40881 { // scope for "temp"
40882 JS::Rooted<JS::Value> temp(cx);
40883 if (!get_ceReactionsAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40884 return false;
40885 }
40886 if (!JS_DefineProperty(cx, result, "ceReactionsAttr", temp, JSPROP_ENUMERATE)) {
40887 return false;
40888 }
40889 }
40890 { // scope for "temp"
40891 JS::Rooted<JS::Value> temp(cx);
40892 if (!get_dashed_attribute(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40893 return false;
40894 }
40895 if (!JS_DefineProperty(cx, result, "dashed_attribute", temp, JSPROP_ENUMERATE)) {
40896 return false;
40897 }
40898 }
40899 { // scope for "temp"
40900 JS::Rooted<JS::Value> temp(cx);
40901 if (!get_nonEnumerableAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
40902 return false;
40903 }
40904 if (!JS_DefineProperty(cx, result, "nonEnumerableAttr", temp, JSPROP_ENUMERATE)) {
40905 return false;
40906 }
40907 }
40908 return true;
40909}
40910
40911// This may allocate too many slots, because we only really need
40912// slots for our non-interface-typed members that we cache. But
40913// allocating slots only for those would make the slot index
40914// computations much more complicated, so let's do this the simple
40915// way for now.
40916DEFINE_XRAY_EXPANDO_CLASS(static, sXrayExpandoObjectClass, 21)static const JSClass sXrayExpandoObjectClass = { "XrayExpandoObject"
, JSCLASS_HAS_RESERVED_SLOTS(xpc::JSSLOT_EXPANDO_COUNT + (21)
) | JSCLASS_FOREGROUND_FINALIZE, &xpc::XrayExpandoObjectClassOps
}
;
40917
40918bool sNativePropertiesInited = false;
40919const NativePropertyHooks sNativePropertyHooks = {
40920 nullptr,
40921 { sNativeProperties.Upcast(), sChromeOnlyNativeProperties.Upcast(), &sNativePropertiesInited },
40922 prototypes::id::TestExampleInterface,
40923 constructors::id::TestExampleInterface,
40924 &sXrayExpandoObjectClass
40925};
40926
40927static bool
40928_constructor(JSContext* cx_, unsigned argc, JS::Value* vp)
40929{
40930 BindingCallContext cx(cx_, "TestExampleInterface constructor");
40931 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40933( cx, "TestExampleInterface"
, "constructor", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40932 "TestExampleInterface", "constructor", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40933( cx, "TestExampleInterface"
, "constructor", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40933 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40933( cx, "TestExampleInterface"
, "constructor", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40934
40935 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
40936 JS::Rooted<JSObject*> obj(cx, &args.callee());
40937 if (!args.isConstructing()) {
40938 return ThrowConstructorWithoutNew(cx, "TestExampleInterface");
40939 }
40940
40941 JS::Rooted<JSObject*> desiredProto(cx);
40942 if (!GetDesiredProto(cx, args,
40943 prototypes::id::TestExampleInterface,
40944 CreateInterfaceObjects,
40945 &desiredProto)) {
40946 return false;
40947 }
40948
40949 unsigned argcount = std::min(args.length(), 2u);
40950 switch (argcount) {
40951 case 0: {
40952 GlobalObject global(cx, obj);
40953 if (global.Failed()) {
40954 return false;
40955 }
40956
40957 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40958 Maybe<JSAutoRealm> ar;
40959 if (objIsXray) {
40960 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40961 // we know Xrays have no dynamic unwrap behavior.
40962 obj = js::CheckedUnwrapStatic(obj);
40963 if (!obj) {
40964 return false;
40965 }
40966 ar.emplace(cx, obj);
40967 if (!JS_WrapObject(cx, &desiredProto)) {
40968 return false;
40969 }
40970 }
40971 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Constructor(global)));
40972 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 40972); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40972; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40973 static_assert(!std::is_pointer_v<decltype(result)>,
40974 "NewObject implies that we need to keep the object alive with a strong reference.");
40975 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
40976 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 40976); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 40976; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
40977 return false;
40978 }
40979 return true;
40980 break;
40981 }
40982 case 1: {
40983 if (args[0].isNullOrUndefined()) {
40984 mozilla::dom::TestInterface* arg0;
40985 arg0 = nullptr;
40986 GlobalObject global(cx, obj);
40987 if (global.Failed()) {
40988 return false;
40989 }
40990
40991 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40992 Maybe<JSAutoRealm> ar;
40993 if (objIsXray) {
40994 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40995 // we know Xrays have no dynamic unwrap behavior.
40996 obj = js::CheckedUnwrapStatic(obj);
40997 if (!obj) {
40998 return false;
40999 }
41000 ar.emplace(cx, obj);
41001 if (!JS_WrapObject(cx, &desiredProto)) {
41002 return false;
41003 }
41004 }
41005 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Constructor(global, MOZ_KnownLive(Constify(arg0))(Constify(arg0)))));
41006 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41006); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41006; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41007 static_assert(!std::is_pointer_v<decltype(result)>,
41008 "NewObject implies that we need to keep the object alive with a strong reference.");
41009 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
41010 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41010); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 41010; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41011 return false;
41012 }
41013 return true;
41014 }
41015 if (args[0].isObject()) {
41016 do {
41017 mozilla::dom::TestInterface* arg0;
41018 {
41019 // Our JSContext should be in the right global to do unwrapping in.
41020 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
41021 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
41022 break;
41023 }
41024 }
41025 GlobalObject global(cx, obj);
41026 if (global.Failed()) {
41027 return false;
41028 }
41029
41030 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41031 Maybe<JSAutoRealm> ar;
41032 if (objIsXray) {
41033 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41034 // we know Xrays have no dynamic unwrap behavior.
41035 obj = js::CheckedUnwrapStatic(obj);
41036 if (!obj) {
41037 return false;
41038 }
41039 ar.emplace(cx, obj);
41040 if (!JS_WrapObject(cx, &desiredProto)) {
41041 return false;
41042 }
41043 }
41044 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Constructor(global, MOZ_KnownLive(Constify(arg0))(Constify(arg0)))));
41045 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41045); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41045; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41046 static_assert(!std::is_pointer_v<decltype(result)>,
41047 "NewObject implies that we need to keep the object alive with a strong reference.");
41048 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
41049 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41049); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 41049; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41050 return false;
41051 }
41052 return true;
41053 } while (false);
41054 do {
41055 RootedSpiderMonkeyInterface<ArrayBuffer> arg0(cx);
41056 if (!arg0.Init(&args[0].toObject())) {
41057 break;
41058 }
41059 if (JS::IsSharedArrayBufferObject(arg0.Obj())) {
41060 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
41061 return false;
41062 }
41063 if (JS::IsLargeArrayBufferMaybeShared(arg0.Obj())) {
41064 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
41065 return false;
41066 }
41067 if (JS::IsResizableArrayBufferMaybeShared(arg0.Obj())) {
41068 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
41069 return false;
41070 }
41071 GlobalObject global(cx, obj);
41072 if (global.Failed()) {
41073 return false;
41074 }
41075
41076 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41077 Maybe<JSAutoRealm> ar;
41078 if (objIsXray) {
41079 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41080 // we know Xrays have no dynamic unwrap behavior.
41081 obj = js::CheckedUnwrapStatic(obj);
41082 if (!obj) {
41083 return false;
41084 }
41085 ar.emplace(cx, obj);
41086 if (!JS_WrapObject(cx, &desiredProto)) {
41087 return false;
41088 }
41089 if (!arg0.WrapIntoNewCompartment(cx)) {
41090 return false;
41091 }
41092 }
41093 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Constructor(global, Constify(arg0))));
41094 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41094); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41094; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41095 static_assert(!std::is_pointer_v<decltype(result)>,
41096 "NewObject implies that we need to keep the object alive with a strong reference.");
41097 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
41098 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41098); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 41098; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41099 return false;
41100 }
41101 return true;
41102 } while (false);
41103 do {
41104 RootedSpiderMonkeyInterface<Uint8Array> arg0(cx);
41105 if (!arg0.Init(&args[0].toObject())) {
41106 break;
41107 }
41108 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
41109 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
41110 return false;
41111 }
41112 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
41113 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
41114 return false;
41115 }
41116 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
41117 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
41118 return false;
41119 }
41120 GlobalObject global(cx, obj);
41121 if (global.Failed()) {
41122 return false;
41123 }
41124
41125 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41126 Maybe<JSAutoRealm> ar;
41127 if (objIsXray) {
41128 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41129 // we know Xrays have no dynamic unwrap behavior.
41130 obj = js::CheckedUnwrapStatic(obj);
41131 if (!obj) {
41132 return false;
41133 }
41134 ar.emplace(cx, obj);
41135 if (!JS_WrapObject(cx, &desiredProto)) {
41136 return false;
41137 }
41138 if (!arg0.WrapIntoNewCompartment(cx)) {
41139 return false;
41140 }
41141 }
41142 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Constructor(global, Constify(arg0))));
41143 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41143); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41143; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41144 static_assert(!std::is_pointer_v<decltype(result)>,
41145 "NewObject implies that we need to keep the object alive with a strong reference.");
41146 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
41147 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41147); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 41147; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41148 return false;
41149 }
41150 return true;
41151 } while (false);
41152 }
41153 GlobalObject global(cx, obj);
41154 if (global.Failed()) {
41155 return false;
41156 }
41157
41158 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41159 binding_detail::FakeString<char16_t> arg0;
41160 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
41161 return false;
41162 }
41163 Maybe<JSAutoRealm> ar;
41164 if (objIsXray) {
41165 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41166 // we know Xrays have no dynamic unwrap behavior.
41167 obj = js::CheckedUnwrapStatic(obj);
41168 if (!obj) {
41169 return false;
41170 }
41171 ar.emplace(cx, obj);
41172 if (!JS_WrapObject(cx, &desiredProto)) {
41173 return false;
41174 }
41175 }
41176 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Constructor(global, NonNullHelper(Constify(arg0)))));
41177 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41177); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41177; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41178 static_assert(!std::is_pointer_v<decltype(result)>,
41179 "NewObject implies that we need to keep the object alive with a strong reference.");
41180 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
41181 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41181); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 41181; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41182 return false;
41183 }
41184 return true;
41185 break;
41186 }
41187 case 2: {
41188 uint32_t arg0;
41189 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
41190 return false;
41191 }
41192 if (args[1].isObject()) {
41193 do {
41194 NonNull<mozilla::dom::TestInterface> arg1;
41195 {
41196 // Our JSContext should be in the right global to do unwrapping in.
41197 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[1], arg1, cx);
41198 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
41199 break;
41200 }
41201 }
41202 GlobalObject global(cx, obj);
41203 if (global.Failed()) {
41204 return false;
41205 }
41206
41207 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41208 Maybe<JSAutoRealm> ar;
41209 if (objIsXray) {
41210 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41211 // we know Xrays have no dynamic unwrap behavior.
41212 obj = js::CheckedUnwrapStatic(obj);
41213 if (!obj) {
41214 return false;
41215 }
41216 ar.emplace(cx, obj);
41217 if (!JS_WrapObject(cx, &desiredProto)) {
41218 return false;
41219 }
41220 }
41221 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Constructor(global, arg0, MOZ_KnownLive(NonNullHelper(arg1))(NonNullHelper(arg1)))));
41222 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41222); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41222; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41223 static_assert(!std::is_pointer_v<decltype(result)>,
41224 "NewObject implies that we need to keep the object alive with a strong reference.");
41225 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
41226 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41226); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 41226; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41227 return false;
41228 }
41229 return true;
41230 } while (false);
41231 }
41232 GlobalObject global(cx, obj);
41233 if (global.Failed()) {
41234 return false;
41235 }
41236
41237 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41238 Nullable<bool> arg1;
41239 if (args[1].isNullOrUndefined()) {
41240 arg1.SetNull();
41241 } else if (!ValueToPrimitive<bool, eDefault>(cx, args[1], "Argument 2", &arg1.SetValue())) {
41242 return false;
41243 }
41244 Maybe<JSAutoRealm> ar;
41245 if (objIsXray) {
41246 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41247 // we know Xrays have no dynamic unwrap behavior.
41248 obj = js::CheckedUnwrapStatic(obj);
41249 if (!obj) {
41250 return false;
41251 }
41252 ar.emplace(cx, obj);
41253 if (!JS_WrapObject(cx, &desiredProto)) {
41254 return false;
41255 }
41256 }
41257 auto result(StrongOrRawPtr<mozilla::dom::TestExampleInterface>(mozilla::dom::TestExampleInterface::Constructor(global, arg0, Constify(arg1))));
41258 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41258); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41258; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41259 static_assert(!std::is_pointer_v<decltype(result)>,
41260 "NewObject implies that we need to keep the object alive with a strong reference.");
41261 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
41262 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41262); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 41262; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41263 return false;
41264 }
41265 return true;
41266 break;
41267 }
41268 default: {
41269 // Using nsPrintfCString here would require including that
41270 // header. Let's not worry about it.
41271 nsAutoCString argCountStr;
41272 argCountStr.AppendPrintf("%u", args.length());
41273 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
41274 }
41275 }
41276 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 41276); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 41276; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
41277 return false;
41278}
41279
41280static const DOMInterfaceInfo sInterfaceObjectInfo = {
41281 { _constructor, &sNativePropertyHooks },
41282 JS::GetRealmFunctionPrototype,
41283 prototypes::id::TestExampleInterface,
41284 PrototypeTraits<prototypes::id::TestExampleInterface>::Depth,
41285 true,
41286};
41287
41288bool sLegacyFactoryFunctionNativePropertiesInited = true;
41289const NativePropertyHooks sLegacyFactoryFunctionNativePropertyHooks = {
41290 nullptr,
41291 { nullptr, nullptr, &sLegacyFactoryFunctionNativePropertiesInited },
41292 prototypes::id::TestExampleInterface,
41293 constructors::id::TestExampleInterface,
41294 nullptr
41295};
41296
41297static const LegacyFactoryFunction legacyFactoryFunctions[] = {
41298 { "Example", { _Example, &sLegacyFactoryFunctionNativePropertyHooks }, 0 },
41299 { "Example2", { _Example2, &sLegacyFactoryFunctionNativePropertyHooks }, 1 },
41300};
41301
41302MOZ_CAN_RUN_SCRIPT static bool
41303_legacycaller(JSContext* cx_, unsigned argc, JS::Value* vp)
41304{
41305 BindingCallContext cx(cx_, "TestExampleInterface legacy caller");
41306 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
41307 JS::Rooted<JSObject*> obj(cx, &args.callee());
41308
41309 mozilla::dom::TestExampleInterface* self;
41310 JS::Rooted<JS::Value> rootSelf(cx, JS::ObjectValue(*obj));
41311 {
41312 // Our JSContext should be in the right global to do unwrapping in.
41313 nsresult rv = UnwrapObject<prototypes::id::TestExampleInterface, mozilla::dom::TestExampleInterface>(&rootSelf, self, cx);
41314 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
41315 MOZ_CRASH("Unexpected object in '_legacycaller' hook")do { do { } while (false); MOZ_ReportCrash("" "Unexpected object in '_legacycaller' hook"
, "../TestExampleGenBinding.cpp", 41315); AnnotateMozCrashReason
("MOZ_CRASH(" "Unexpected object in '_legacycaller' hook" ")"
); do { *((volatile int*)__null) = 41315; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
41316 return false;
41317 }
41318 }
41319 if (!args.requireAtLeast(cx, "TestExampleInterface legacy caller", 2)) {
41320 return false;
41321 }
41322 uint32_t arg0;
41323 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
41324 return false;
41325 }
41326 NonNull<mozilla::dom::TestInterface> arg1;
41327 if (args[1].isObject()) {
41328 {
41329 // Our JSContext should be in the right global to do unwrapping in.
41330 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[1], arg1, cx);
41331 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
41332 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 2", "TestInterface");
41333 return false;
41334 }
41335 }
41336 } else {
41337 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 2");
41338 return false;
41339 }
41340 int16_t result(MOZ_KnownLive(self)(self)->LegacyCall(args.thisv(), arg0, MOZ_KnownLive(NonNullHelper(arg1))(NonNullHelper(arg1))));
41341 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41341); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41341; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41342 args.rval().setInt32(int32_t(result));
41343 return true;
41344}
41345
41346static const DOMIfaceAndProtoJSClass sPrototypeClass = {
41347 {
41348 "TestExampleInterfacePrototype",
41349 JSCLASS_IS_DOMIFACEANDPROTOJSCLASSJSCLASS_USERBIT2 | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE0 + 1 /* slot for the JSObject holding the unforgeable properties */),
41350 JS_NULL_CLASS_OPS,
41351 JS_NULL_CLASS_SPEC,
41352 JS_NULL_CLASS_EXT,
41353 JS_NULL_OBJECT_OPS
41354 },
41355 eInterfacePrototype,
41356 prototypes::id::TestExampleInterface,
41357 PrototypeTraits<prototypes::id::TestExampleInterface>::Depth,
41358 &sNativePropertyHooks,
41359 JS::GetRealmObjectPrototype
41360};
41361
41362static const JSClassOps sClassOps = {
41363 _addProperty, /* addProperty */
41364 nullptr, /* delProperty */
41365 nullptr, /* enumerate */
41366 nullptr, /* newEnumerate */
41367 nullptr, /* resolve */
41368 nullptr, /* mayResolve */
41369 _finalize, /* finalize */
41370 _legacycaller, /* call */
41371 nullptr, /* construct */
41372 nullptr, /* trace */
41373};
41374
41375static const js::ClassExtension sClassExtension = {
41376 _objectMoved /* objectMovedOp */
41377};
41378
41379static const DOMJSClass sClass = {
41380 { "TestExampleInterface",
41381 JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(22),
41382 &sClassOps,
41383 JS_NULL_CLASS_SPEC,
41384 &sClassExtension,
41385 JS_NULL_OBJECT_OPS
41386 },
41387 { prototypes::id::TestExampleInterface, 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 },
41388 std::is_base_of_v<nsISupports, mozilla::dom::TestExampleInterface>,
41389 &sNativePropertyHooks,
41390 FindAssociatedGlobalForNative<mozilla::dom::TestExampleInterface>::Get,
41391 GetProtoObjectHandle,
41392 GetCCParticipant<mozilla::dom::TestExampleInterface>::Get(),
41393 nullptr,
41394 _getWrapperCache
41395};
41396static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS1,
41397 "Must have the right minimal number of reserved slots.");
41398static_assert(22 >= 22,
41399 "Must have enough reserved slots.");
41400
41401static bool
41402UpdateMemberSlots(JSContext* aCx, JS::Handle<JSObject*> aWrapper, mozilla::dom::TestExampleInterface* aObject)
41403{
41404 JS::Rooted<JS::Value> temp(aCx);
41405 JSJitGetterCallArgs args(&temp);
41406
41407 static_assert((DOM_INSTANCE_RESERVED_SLOTS1 + 1) < JS::shadow::Object::MAX_FIXED_SLOTS,
41408 "Not enough fixed slots to fit 'TestExampleInterface.cachedConstantByte. Ion's visitGetDOMMemberV/visitGetDOMMemberT assume StoreInSlot things are all in fixed slots.");
41409 if (!get_cachedConstantByte(aCx, aWrapper, aObject, args)) {
41410 return false;
41411 }
41412 // Getter handled setting our reserved slots
41413
41414 return true;
41415}
41416
41417bool
41418Wrap(JSContext* aCx, mozilla::dom::TestExampleInterface* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
41419{
41420 static_assert(!std::is_base_of_v<NonRefcountedDOMObject, mozilla::dom::TestExampleInterface>,
41421 "Shouldn't have wrappercached things that are not refcounted.");
41422 static_assert(std::is_same_v<decltype(aObject), mozilla::dom::TestExampleInterface*>);
41423 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)", "../TestExampleGenBinding.cpp"
, 41423); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsCorrect(aObject)"
")"); do { *((volatile int*)__null) = 41423; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
41424 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)", "../TestExampleGenBinding.cpp"
, 41424); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(aGivenProto, aCx)"
")"); do { *((volatile int*)__null) = 41424; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
41425 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" ")", "../TestExampleGenBinding.cpp"
, 41427); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 41427; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
41426 "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" ")", "../TestExampleGenBinding.cpp"
, 41427); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 41427; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
41427 "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" ")", "../TestExampleGenBinding.cpp"
, 41427); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 41427; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41428
41429 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" ")", "../TestExampleGenBinding.cpp"
, 41430); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 41430; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
41430 "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" ")", "../TestExampleGenBinding.cpp"
, 41430); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 41430; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
41431
41432 // If the wrapper cache contains a dead reflector then finalize that
41433 // now, ensuring that the finalizer for the old reflector always
41434 // runs before the new reflector is created and attached. This
41435 // avoids the awkward situation where there are multiple reflector
41436 // objects that contain pointers to the same native.
41437
41438 if (JSObject* oldReflector = aCache->GetWrapperMaybeDead()) {
41439 _finalize(nullptr /* unused */, oldReflector);
41440 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()", "../TestExampleGenBinding.cpp"
, 41440); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapperMaybeDead()"
")"); do { *((volatile int*)__null) = 41440; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
41441 }
41442
41443 JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
41444 if (!global) {
41445 return false;
41446 }
41447 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)"
, "../TestExampleGenBinding.cpp", 41447); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsGlobalObject(global)" ")"); do { *((volatile
int*)__null) = 41447; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41448 JS::AssertObjectIsNotGray(global);
41449
41450 // That might have ended up wrapping us already, due to the wonders
41451 // of XBL. Check for that, and bail out as needed.
41452 aReflector.set(aCache->GetWrapper());
41453 if (aReflector) {
41454#ifdef DEBUG1
41455 AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
41456#endif // DEBUG
41457 return true;
41458 }
41459
41460 JSAutoRealm ar(aCx, global);
41461 JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
41462 if (!canonicalProto) {
41463 return false;
41464 }
41465 JS::Rooted<JSObject*> proto(aCx);
41466 if (aGivenProto) {
41467 proto = aGivenProto;
41468 // Unfortunately, while aGivenProto was in the compartment of aCx
41469 // coming in, we changed compartments to that of "parent" so may need
41470 // to wrap the proto here.
41471 if (js::GetContextCompartment(aCx) != JS::GetCompartment(proto)) {
41472 if (!JS_WrapObject(aCx, &proto)) {
41473 return false;
41474 }
41475 }
41476 } else {
41477 proto = canonicalProto;
41478 }
41479
41480 BindingJSObjectCreator<mozilla::dom::TestExampleInterface> creator(aCx);
41481 creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
41482 if (!aReflector) {
41483 return false;
41484 }
41485
41486 aCache->SetWrapper(aReflector);
41487
41488 // Important: do unforgeable property setup after we have handed
41489 // over ownership of the C++ object to obj as needed, so that if
41490 // we fail and it ends up GCed it won't have problems in the
41491 // finalizer trying to drop its ownership of the C++ object.
41492 JS::Rooted<JSObject*> unforgeableHolder(aCx,
41493 &JS::GetReservedSlot(canonicalProto, DOM_INTERFACE_PROTO_SLOTS_BASE0).toObject());
41494 if (!JS_InitializePropertiesFromCompatibleNativeObject(aCx, aReflector, unforgeableHolder)) {
41495 aCache->ReleaseWrapper(aObject);
41496 aCache->ClearWrapper();
41497 return false;
41498 }
41499 if (!UpdateMemberSlots(aCx, aReflector, aObject)) {
41500 aCache->ReleaseWrapper(aObject);
41501 aCache->ClearWrapper();
41502 return false;
41503 }
41504 creator.InitializationSucceeded();
41505
41506 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"
, "../TestExampleGenBinding.cpp", 41507); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 41507; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
41507 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"
, "../TestExampleGenBinding.cpp", 41507); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 41507; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
41508 // If proto != canonicalProto, we have to preserve our wrapper;
41509 // otherwise we won't be able to properly recreate it later, since
41510 // we won't know what proto to use. Note that we don't check
41511 // aGivenProto here, since it's entirely possible (and even
41512 // somewhat common) to have a non-null aGivenProto which is the
41513 // same as canonicalProto.
41514 if (proto != canonicalProto) {
41515 PreserveWrapper(aObject);
41516 }
41517
41518 return true;
41519}
41520
41521void
41522ClearCachedCachedByteValue(mozilla::dom::TestExampleInterface* aObject)
41523{
41524 JSObject* obj;
41525 obj = aObject->GetWrapper();
41526 if (!obj) {
41527 return;
41528 }
41529 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 0), JS::UndefinedValue());
41530 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 0));
41531}
41532
41533void
41534ClearCachedCachedWritableByteValue(mozilla::dom::TestExampleInterface* aObject)
41535{
41536 JSObject* obj;
41537 obj = aObject->GetWrapper();
41538 if (!obj) {
41539 return;
41540 }
41541 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 2), JS::UndefinedValue());
41542 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 2));
41543}
41544
41545void
41546ClearCachedCachedSelfValue(mozilla::dom::TestExampleInterface* aObject)
41547{
41548 JSObject* obj;
41549 obj = aObject->GetWrapper();
41550 if (!obj) {
41551 return;
41552 }
41553 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 3), JS::UndefinedValue());
41554 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 3));
41555}
41556
41557void
41558ClearCachedReadonlySequenceValue(mozilla::dom::TestExampleInterface* aObject)
41559{
41560 JSObject* obj;
41561 obj = aObject->GetWrapper();
41562 if (!obj) {
41563 return;
41564 }
41565 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 4), JS::UndefinedValue());
41566 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 4));
41567}
41568
41569void
41570ClearCachedReadonlySequenceOfDictionariesValue(mozilla::dom::TestExampleInterface* aObject)
41571{
41572 JSObject* obj;
41573 obj = aObject->GetWrapper();
41574 if (!obj) {
41575 return;
41576 }
41577 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 5), JS::UndefinedValue());
41578 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 5));
41579}
41580
41581void
41582ClearCachedReadonlyNullableSequenceOfDictionariesValue(mozilla::dom::TestExampleInterface* aObject)
41583{
41584 JSObject* obj;
41585 obj = aObject->GetWrapper();
41586 if (!obj) {
41587 return;
41588 }
41589 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 6), JS::UndefinedValue());
41590 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 6));
41591}
41592
41593void
41594ClearCachedReadonlyFrozenSequenceValue(mozilla::dom::TestExampleInterface* aObject)
41595{
41596 JSObject* obj;
41597 obj = aObject->GetWrapper();
41598 if (!obj) {
41599 return;
41600 }
41601 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 7), JS::UndefinedValue());
41602 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 7));
41603}
41604
41605void
41606ClearCachedReadonlyFrozenNullableSequenceValue(mozilla::dom::TestExampleInterface* aObject)
41607{
41608 JSObject* obj;
41609 obj = aObject->GetWrapper();
41610 if (!obj) {
41611 return;
41612 }
41613 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 8), JS::UndefinedValue());
41614 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 8));
41615}
41616
41617void
41618ClearCachedBooleanObservableArrayValue(mozilla::dom::TestExampleInterface* aObject)
41619{
41620 JSObject* obj;
41621 obj = aObject->GetWrapper();
41622 if (!obj) {
41623 return;
41624 }
41625 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 9), JS::UndefinedValue());
41626 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 9));
41627}
41628
41629void
41630ClearCachedObjectObservableArrayValue(mozilla::dom::TestExampleInterface* aObject)
41631{
41632 JSObject* obj;
41633 obj = aObject->GetWrapper();
41634 if (!obj) {
41635 return;
41636 }
41637 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 10), JS::UndefinedValue());
41638 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 10));
41639}
41640
41641void
41642ClearCachedAnyObservableArrayValue(mozilla::dom::TestExampleInterface* aObject)
41643{
41644 JSObject* obj;
41645 obj = aObject->GetWrapper();
41646 if (!obj) {
41647 return;
41648 }
41649 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 11), JS::UndefinedValue());
41650 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 11));
41651}
41652
41653void
41654ClearCachedInterfaceObservableArrayValue(mozilla::dom::TestExampleInterface* aObject)
41655{
41656 JSObject* obj;
41657 obj = aObject->GetWrapper();
41658 if (!obj) {
41659 return;
41660 }
41661 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 12), JS::UndefinedValue());
41662 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 12));
41663}
41664
41665void
41666ClearCachedNullableObservableArrayValue(mozilla::dom::TestExampleInterface* aObject)
41667{
41668 JSObject* obj;
41669 obj = aObject->GetWrapper();
41670 if (!obj) {
41671 return;
41672 }
41673 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 13), JS::UndefinedValue());
41674 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 13));
41675}
41676
41677void
41678ClearCachedReadonlyDictionaryValue(mozilla::dom::TestExampleInterface* aObject)
41679{
41680 JSObject* obj;
41681 obj = aObject->GetWrapper();
41682 if (!obj) {
41683 return;
41684 }
41685 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 14), JS::UndefinedValue());
41686 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 14));
41687}
41688
41689void
41690ClearCachedReadonlyNullableDictionaryValue(mozilla::dom::TestExampleInterface* aObject)
41691{
41692 JSObject* obj;
41693 obj = aObject->GetWrapper();
41694 if (!obj) {
41695 return;
41696 }
41697 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 15), JS::UndefinedValue());
41698 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 15));
41699}
41700
41701void
41702ClearCachedWritableDictionaryValue(mozilla::dom::TestExampleInterface* aObject)
41703{
41704 JSObject* obj;
41705 obj = aObject->GetWrapper();
41706 if (!obj) {
41707 return;
41708 }
41709 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 16), JS::UndefinedValue());
41710 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 16));
41711}
41712
41713void
41714ClearCachedReadonlyFrozenDictionaryValue(mozilla::dom::TestExampleInterface* aObject)
41715{
41716 JSObject* obj;
41717 obj = aObject->GetWrapper();
41718 if (!obj) {
41719 return;
41720 }
41721 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 17), JS::UndefinedValue());
41722 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 17));
41723}
41724
41725void
41726ClearCachedReadonlyFrozenNullableDictionaryValue(mozilla::dom::TestExampleInterface* aObject)
41727{
41728 JSObject* obj;
41729 obj = aObject->GetWrapper();
41730 if (!obj) {
41731 return;
41732 }
41733 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 18), JS::UndefinedValue());
41734 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 18));
41735}
41736
41737void
41738ClearCachedWritableFrozenDictionaryValue(mozilla::dom::TestExampleInterface* aObject)
41739{
41740 JSObject* obj;
41741 obj = aObject->GetWrapper();
41742 if (!obj) {
41743 return;
41744 }
41745 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 19), JS::UndefinedValue());
41746 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 19));
41747}
41748
41749void
41750ClearCachedReflectedHTMLAttributeReturningFrozenArrayValue(mozilla::dom::TestExampleInterface* aObject)
41751{
41752 JSObject* obj;
41753 obj = aObject->GetWrapper();
41754 if (!obj) {
41755 return;
41756 }
41757 JS::SetReservedSlot(obj, (DOM_INSTANCE_RESERVED_SLOTS1 + 20), JS::UndefinedValue());
41758 xpc::ClearXrayExpandoSlots(obj, (xpc::JSSLOT_EXPANDO_COUNT + 20));
41759}
41760
41761void
41762CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
41763{
41764 JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::TestExampleInterface);
41765 JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::TestExampleInterface);
41766
41767 JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
41768 if (!parentProto) {
41769 return;
41770 }
41771
41772 JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
41773 if (!constructorProto) {
41774 return;
41775 }
41776
41777 dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
41778 &sPrototypeClass, protoCache,
41779 constructorProto, &sInterfaceObjectInfo, 0, false, Span(legacyFactoryFunctions),
41780 interfaceCache,
41781 sNativeProperties.Upcast(),
41782 sChromeOnlyNativeProperties.Upcast(),
41783 "TestExampleInterface", aDefineOnGlobal,
41784 nullptr,
41785 false,
41786 nullptr);
41787
41788 JS::AssertObjectIsNotGray(*protoCache);
41789 JS::Handle<JSObject*> proto = JS::Handle<JSObject*>::fromMarkedLocation(protoCache->unsafeAddress());
41790 if (!proto) {
41791 *protoCache = nullptr;
41792 if (interfaceCache) {
41793 *interfaceCache = nullptr;
41794 }
41795 return;
41796 }
41797
41798 JS::Rooted<JSObject*> unforgeableHolder(
41799 aCx, JS_NewObjectWithoutMetadata(aCx, sClass.ToJSClass(), proto));
41800 if (!unforgeableHolder) {
41801 *protoCache = nullptr;
41802 if (interfaceCache) {
41803 *interfaceCache = nullptr;
41804 }
41805 return;
41806 }
41807
41808 if (!DefineLegacyUnforgeableAttributes(aCx, unforgeableHolder, sUnforgeableAttributes)) {
41809 *protoCache = nullptr;
41810 if (interfaceCache) {
41811 *interfaceCache = nullptr;
41812 }
41813 return;
41814 }
41815 if (nsContentUtils::ThreadsafeIsSystemCaller(aCx)) {
41816 if (!DefineLegacyUnforgeableAttributes(aCx, unforgeableHolder, sChromeUnforgeableAttributes)) {
41817 *protoCache = nullptr;
41818 if (interfaceCache) {
41819 *interfaceCache = nullptr;
41820 }
41821 return;
41822 }
41823 }
41824 if (!DefineLegacyUnforgeableMethods(aCx, unforgeableHolder, sUnforgeableMethods)) {
41825 *protoCache = nullptr;
41826 if (interfaceCache) {
41827 *interfaceCache = nullptr;
41828 }
41829 return;
41830 }
41831 if (nsContentUtils::ThreadsafeIsSystemCaller(aCx)) {
41832 if (!DefineLegacyUnforgeableMethods(aCx, unforgeableHolder, sChromeUnforgeableMethods)) {
41833 *protoCache = nullptr;
41834 if (interfaceCache) {
41835 *interfaceCache = nullptr;
41836 }
41837 return;
41838 }
41839 }
41840
41841 if (*protoCache) {
41842 JS::SetReservedSlot(*protoCache, DOM_INTERFACE_PROTO_SLOTS_BASE0,
41843 JS::ObjectValue(*unforgeableHolder));
41844 }
41845}
41846
41847JSObject*
41848GetConstructorObject(JSContext* aCx)
41849{
41850 return GetConstructorObjectHandle(aCx);
41851}
41852
41853} // namespace TestExampleInterface_Binding
41854
41855
41856
41857namespace TestExampleProxyInterface_Binding {
41858
41859MOZ_CAN_RUN_SCRIPT static bool
41860longIndexedGetter(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
41861{
41862 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41865( cx, "TestExampleProxyInterface"
, "longIndexedGetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41863 "TestExampleProxyInterface", "longIndexedGetter", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41865( cx, "TestExampleProxyInterface"
, "longIndexedGetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41864 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject41865( cx, "TestExampleProxyInterface"
, "longIndexedGetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41865 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41865( cx, "TestExampleProxyInterface"
, "longIndexedGetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41866
41867 auto* self = static_cast<mozilla::dom::TestExampleProxyInterface*>(void_self);
41868 if (!args.requireAtLeast(cx, "TestExampleProxyInterface.longIndexedGetter", 1)) {
41869 return false;
41870 }
41871 uint32_t arg0;
41872 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
41873 return false;
41874 }
41875 int32_t result(MOZ_KnownLive(self)(self)->LongIndexedGetter(arg0));
41876 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41876); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41876; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41877 args.rval().setInt32(int32_t(result));
41878 return true;
41879}
41880
41881static const JSJitInfo longIndexedGetter_methodinfo = {
41882 { (JSJitGetterOp)longIndexedGetter },
41883 { prototypes::id::TestExampleProxyInterface },
41884 { PrototypeTraits<prototypes::id::TestExampleProxyInterface>::Depth },
41885 JSJitInfo::Method,
41886 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41887 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
41888 false, /* isInfallible. False in setters. */
41889 false, /* isMovable. Not relevant for setters. */
41890 false, /* isEliminatable. Not relevant for setters. */
41891 false, /* isAlwaysInSlot. Only relevant for getters. */
41892 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41893 false, /* isTypedMethod. Only relevant for methods. */
41894 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41895};
41896
41897MOZ_CAN_RUN_SCRIPT static bool
41898longIndexedSetter(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
41899{
41900 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41903( cx, "TestExampleProxyInterface"
, "longIndexedSetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41901 "TestExampleProxyInterface", "longIndexedSetter", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41903( cx, "TestExampleProxyInterface"
, "longIndexedSetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41902 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject41903( cx, "TestExampleProxyInterface"
, "longIndexedSetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41903 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41903( cx, "TestExampleProxyInterface"
, "longIndexedSetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41904
41905 auto* self = static_cast<mozilla::dom::TestExampleProxyInterface*>(void_self);
41906 if (!args.requireAtLeast(cx, "TestExampleProxyInterface.longIndexedSetter", 2)) {
41907 return false;
41908 }
41909 uint32_t arg0;
41910 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
41911 return false;
41912 }
41913 int32_t arg1;
41914 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[1], "Argument 2", &arg1)) {
41915 return false;
41916 }
41917 // NOTE: This assert does NOT call the function.
41918 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->LongIndexedSetter(arg0, arg1))>, "Should be returning void here");
41919 MOZ_KnownLive(self)(self)->LongIndexedSetter(arg0, arg1);
41920 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41920); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41920; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41921 args.rval().setUndefined();
41922 return true;
41923}
41924
41925static const JSJitInfo longIndexedSetter_methodinfo = {
41926 { (JSJitGetterOp)longIndexedSetter },
41927 { prototypes::id::TestExampleProxyInterface },
41928 { PrototypeTraits<prototypes::id::TestExampleProxyInterface>::Depth },
41929 JSJitInfo::Method,
41930 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41931 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41932 false, /* isInfallible. False in setters. */
41933 false, /* isMovable. Not relevant for setters. */
41934 false, /* isEliminatable. Not relevant for setters. */
41935 false, /* isAlwaysInSlot. Only relevant for getters. */
41936 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41937 false, /* isTypedMethod. Only relevant for methods. */
41938 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41939};
41940
41941MOZ_CAN_RUN_SCRIPT static bool
41942get_length(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
41943{
41944 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41947( cx, "TestExampleProxyInterface"
, "length", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
41945 "TestExampleProxyInterface", "length", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41947( cx, "TestExampleProxyInterface"
, "length", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
41946 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject41947( cx, "TestExampleProxyInterface"
, "length", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
41947 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41947( cx, "TestExampleProxyInterface"
, "length", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
41948
41949 auto* self = static_cast<mozilla::dom::TestExampleProxyInterface*>(void_self);
41950 uint32_t result(MOZ_KnownLive(self)(self)->Length());
41951 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41951); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41951; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41952 args.rval().setNumber(result);
41953 return true;
41954}
41955
41956static const JSJitInfo length_getterinfo = {
41957 { get_length },
41958 { prototypes::id::TestExampleProxyInterface },
41959 { PrototypeTraits<prototypes::id::TestExampleProxyInterface>::Depth },
41960 JSJitInfo::Getter,
41961 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41962 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
41963 true, /* isInfallible. False in setters. */
41964 false, /* isMovable. Not relevant for setters. */
41965 false, /* isEliminatable. Not relevant for setters. */
41966 false, /* isAlwaysInSlot. Only relevant for getters. */
41967 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41968 false, /* isTypedMethod. Only relevant for methods. */
41969 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41970};
41971
41972MOZ_CAN_RUN_SCRIPT static bool
41973myStringifier(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
41974{
41975 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41978( cx, "TestExampleProxyInterface"
, "myStringifier", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41976 "TestExampleProxyInterface", "myStringifier", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41978( cx, "TestExampleProxyInterface"
, "myStringifier", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41977 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject41978( cx, "TestExampleProxyInterface"
, "myStringifier", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41978 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41978( cx, "TestExampleProxyInterface"
, "myStringifier", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41979
41980 auto* self = static_cast<mozilla::dom::TestExampleProxyInterface*>(void_self);
41981 DOMString result;
41982 // NOTE: This assert does NOT call the function.
41983 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->MyStringifier(result))>, "Should be returning void here");
41984 MOZ_KnownLive(self)(self)->MyStringifier(result);
41985 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 41985); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41985; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41986 if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
41987 return false;
41988 }
41989 return true;
41990}
41991
41992static const JSJitInfo myStringifier_methodinfo = {
41993 { (JSJitGetterOp)myStringifier },
41994 { prototypes::id::TestExampleProxyInterface },
41995 { PrototypeTraits<prototypes::id::TestExampleProxyInterface>::Depth },
41996 JSJitInfo::Method,
41997 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41998 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
41999 false, /* isInfallible. False in setters. */
42000 false, /* isMovable. Not relevant for setters. */
42001 false, /* isEliminatable. Not relevant for setters. */
42002 false, /* isAlwaysInSlot. Only relevant for getters. */
42003 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42004 false, /* isTypedMethod. Only relevant for methods. */
42005 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42006};
42007
42008MOZ_CAN_RUN_SCRIPT static bool
42009shortNameGetter(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
42010{
42011 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42014( cx, "TestExampleProxyInterface"
, "shortNameGetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42012 "TestExampleProxyInterface", "shortNameGetter", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42014( cx, "TestExampleProxyInterface"
, "shortNameGetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42013 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject42014( cx, "TestExampleProxyInterface"
, "shortNameGetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42014 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42014( cx, "TestExampleProxyInterface"
, "shortNameGetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
42015
42016 auto* self = static_cast<mozilla::dom::TestExampleProxyInterface*>(void_self);
42017 if (!args.requireAtLeast(cx, "TestExampleProxyInterface.shortNameGetter", 1)) {
42018 return false;
42019 }
42020 binding_detail::FakeString<char16_t> arg0;
42021 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
42022 return false;
42023 }
42024 int16_t result(MOZ_KnownLive(self)(self)->ShortNameGetter(NonNullHelper(Constify(arg0))));
42025 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42025); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42025; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42026 args.rval().setInt32(int32_t(result));
42027 return true;
42028}
42029
42030static const JSJitInfo shortNameGetter_methodinfo = {
42031 { (JSJitGetterOp)shortNameGetter },
42032 { prototypes::id::TestExampleProxyInterface },
42033 { PrototypeTraits<prototypes::id::TestExampleProxyInterface>::Depth },
42034 JSJitInfo::Method,
42035 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42036 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
42037 false, /* isInfallible. False in setters. */
42038 false, /* isMovable. Not relevant for setters. */
42039 false, /* isEliminatable. Not relevant for setters. */
42040 false, /* isAlwaysInSlot. Only relevant for getters. */
42041 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42042 false, /* isTypedMethod. Only relevant for methods. */
42043 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42044};
42045
42046MOZ_CAN_RUN_SCRIPT static bool
42047shortNamedSetter(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
42048{
42049 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42052( cx, "TestExampleProxyInterface"
, "shortNamedSetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42050 "TestExampleProxyInterface", "shortNamedSetter", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42052( cx, "TestExampleProxyInterface"
, "shortNamedSetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42051 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject42052( cx, "TestExampleProxyInterface"
, "shortNamedSetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42052 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42052( cx, "TestExampleProxyInterface"
, "shortNamedSetter", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
42053
42054 auto* self = static_cast<mozilla::dom::TestExampleProxyInterface*>(void_self);
42055 if (!args.requireAtLeast(cx, "TestExampleProxyInterface.shortNamedSetter", 2)) {
42056 return false;
42057 }
42058 binding_detail::FakeString<char16_t> arg0;
42059 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
42060 return false;
42061 }
42062 int16_t arg1;
42063 if (!ValueToPrimitive<int16_t, eDefault>(cx, args[1], "Argument 2", &arg1)) {
42064 return false;
42065 }
42066 // NOTE: This assert does NOT call the function.
42067 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ShortNamedSetter(NonNullHelper(Constify(arg0)), arg1))>, "Should be returning void here");
42068 MOZ_KnownLive(self)(self)->ShortNamedSetter(NonNullHelper(Constify(arg0)), arg1);
42069 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42069); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42069; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42070 args.rval().setUndefined();
42071 return true;
42072}
42073
42074static const JSJitInfo shortNamedSetter_methodinfo = {
42075 { (JSJitGetterOp)shortNamedSetter },
42076 { prototypes::id::TestExampleProxyInterface },
42077 { PrototypeTraits<prototypes::id::TestExampleProxyInterface>::Depth },
42078 JSJitInfo::Method,
42079 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42080 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42081 false, /* isInfallible. False in setters. */
42082 false, /* isMovable. Not relevant for setters. */
42083 false, /* isEliminatable. Not relevant for setters. */
42084 false, /* isAlwaysInSlot. Only relevant for getters. */
42085 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42086 false, /* isTypedMethod. Only relevant for methods. */
42087 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42088};
42089
42090static const JSFunctionSpec sMethods_specs[] = {
42091 JS_FNSPEC("longIndexedGetter", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&longIndexedGetter_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("longIndexedGetter"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&longIndexedGetter_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
42092 JS_FNSPEC("longIndexedSetter", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&longIndexedSetter_methodinfo), 2, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("longIndexedSetter"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&longIndexedSetter_methodinfo)}, 2, JSPROP_ENUMERATE
, nullptr}
,
42093 JS_FNSPEC("myStringifier", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&myStringifier_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("myStringifier"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&myStringifier_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
42094 JS_FNSPEC("shortNameGetter", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&shortNameGetter_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("shortNameGetter"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&shortNameGetter_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
42095 JS_FNSPEC("shortNamedSetter", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&shortNamedSetter_methodinfo), 2, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("shortNamedSetter"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&shortNamedSetter_methodinfo)}, 2, JSPROP_ENUMERATE
, nullptr}
,
42096 JS_SYM_FNSPEC(iterator, nullptr, nullptr, 0, 0, "$ArrayValues"){JSFunctionSpec::Name(::JS::SymbolCode::iterator), {nullptr, nullptr
}, 0, 0, "$ArrayValues"}
,
42097 JS_FNSPEC("toString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&myStringifier_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("toString"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&myStringifier_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
42098 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
42099};
42100
42101
42102static const Prefable<const JSFunctionSpec> sMethods[] = {
42103 { nullptr, &sMethods_specs[0] },
42104 { nullptr, nullptr }
42105};
42106
42107static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
42108 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
42109static_assert(7 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
42110 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
42111
42112static const JSPropertySpec sAttributes_specs[] = {
42113 JSPropertySpec::nativeAccessors("length", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &length_getterinfo, nullptr, nullptr),
42114 JS_PS_ENDJSPropertySpec::sentinel()
42115};
42116
42117
42118static const Prefable<const JSPropertySpec> sAttributes[] = {
42119 { nullptr, &sAttributes_specs[0] },
42120 { nullptr, nullptr }
42121};
42122
42123static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
42124 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
42125static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
42126 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
42127
42128
42129static uint16_t sNativeProperties_sortedPropertyIndices[8];
42130static PropertyInfo sNativeProperties_propertyInfos[8];
42131
42132static const NativePropertiesN<2> sNativeProperties = {
42133 false, 0,
42134 false, 0,
42135 true, 0 /* sMethods */,
42136 true, 1 /* sAttributes */,
42137 false, 0,
42138 false, 0,
42139 false, 0,
42140 -1,
42141 8,
42142 sNativeProperties_sortedPropertyIndices,
42143 {
42144 { sMethods, &sNativeProperties_propertyInfos[0] },
42145 { sAttributes, &sNativeProperties_propertyInfos[7] }
42146 }
42147};
42148static_assert(8 < 1ull << (CHAR_BIT8 * sizeof(sNativeProperties.propertyInfoCount)),
42149 "We have a property info count that is oversized");
42150
42151static_assert(std::is_base_of_v<nsISupports, mozilla::dom::TestExampleProxyInterface>,
42152 "We don't support non-nsISupports native classes for "
42153 "proxy-based bindings yet");
42154
42155
42156class DOMProxyHandler : public mozilla::dom::DOMProxyHandler
42157{
42158public:
42159 explicit constexpr DOMProxyHandler()
42160 {
42161 }
42162
42163 bool
42164 getOwnPropDescriptor(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, bool ignoreNamedProps, JS::MutableHandle<Maybe<JS::PropertyDescriptor>> desc) const override;
42165
42166 bool
42167 defineProperty(JSContext* cx_, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, JS::Handle<JS::PropertyDescriptor> desc, JS::ObjectOpResult& opresult, bool* done) const override;
42168
42169 using mozilla::dom::DOMProxyHandler::defineProperty;
42170
42171 bool
42172 ownPropNames(JSContext* cx, JS::Handle<JSObject*> proxy, unsigned flags, JS::MutableHandleVector<jsid> props) const override;
42173
42174 bool
42175 hasOwn(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, bool* bp) const override;
42176
42177 bool
42178 get(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<JS::Value> receiver, JS::Handle<jsid> id, JS::MutableHandle<JS::Value> vp) const override;
42179
42180 const char*
42181 className(JSContext* cx, JS::Handle<JSObject*> proxy) const override;
42182
42183 bool
42184 finalizeInBackground(const JS::Value& priv) const override;
42185
42186 void
42187 finalize(JS::GCContext* gcx, JSObject* proxy) const override;
42188
42189 static const DOMProxyHandler*
42190 getInstance();
42191
42192 bool
42193 delete_(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, JS::ObjectOpResult& opresult) const override;
42194
42195 bool
42196 getElements(JSContext* cx, JS::Handle<JSObject*> proxy, uint32_t begin, uint32_t end, js::ElementAdder* adder) const override;
42197
42198 bool
42199 setCustom(JSContext* cx_, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, JS::Handle<JS::Value> v, bool* done) const override;
42200
42201 size_t
42202 objectMoved(JSObject* obj, JSObject* old) const override;
42203};
42204
42205MOZ_ALWAYS_INLINEinline bool
42206IsProxy(JSObject* obj)
42207{
42208 return js::IsProxy(obj) && js::GetProxyHandler(obj) == DOMProxyHandler::getInstance();
42209}
42210
42211MOZ_ALWAYS_INLINEinline mozilla::dom::TestExampleProxyInterface*
42212UnwrapProxy(JSObject* obj)
42213{
42214 MOZ_ASSERT(js::IsProxy(obj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(js::IsProxy(obj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(js::IsProxy(obj)))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("js::IsProxy(obj)"
, "../TestExampleGenBinding.cpp", 42214); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "js::IsProxy(obj)" ")"); do { *((volatile int
*)__null) = 42214; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42215 if (js::GetProxyHandler(obj) != DOMProxyHandler::getInstance()) {
42216 MOZ_ASSERT(xpc::WrapperFactory::IsXrayWrapper(obj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(xpc::WrapperFactory::IsXrayWrapper(obj))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(xpc::WrapperFactory::IsXrayWrapper(obj)))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("xpc::WrapperFactory::IsXrayWrapper(obj)"
, "../TestExampleGenBinding.cpp", 42216); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "xpc::WrapperFactory::IsXrayWrapper(obj)" ")"
); do { *((volatile int*)__null) = 42216; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
42217 obj = js::UncheckedUnwrap(obj);
42218 }
42219 MOZ_ASSERT(IsProxy(obj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsProxy(obj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsProxy(obj)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("IsProxy(obj)", "../TestExampleGenBinding.cpp"
, 42219); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsProxy(obj)"
")"); do { *((volatile int*)__null) = 42219; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
42220 return static_cast<mozilla::dom::TestExampleProxyInterface*>(js::GetProxyReservedSlot(obj, DOM_OBJECT_SLOT0).toPrivate());
42221}
42222
42223static bool
42224DeleteNamedProperty(JSContext* cx, JS::Handle<JSObject*> xray, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, JS::ObjectOpResult& opresult)
42225{
42226 MOZ_ASSERT(xpc::WrapperFactory::IsXrayWrapper(xray))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(xpc::WrapperFactory::IsXrayWrapper(xray))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(xpc::WrapperFactory::IsXrayWrapper(xray)))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("xpc::WrapperFactory::IsXrayWrapper(xray)"
, "../TestExampleGenBinding.cpp", 42226); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "xpc::WrapperFactory::IsXrayWrapper(xray)" ")"
); do { *((volatile int*)__null) = 42226; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
42227 MOZ_ASSERT(js::IsProxy(proxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(js::IsProxy(proxy))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(js::IsProxy(proxy)))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("js::IsProxy(proxy)"
, "../TestExampleGenBinding.cpp", 42227); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "js::IsProxy(proxy)" ")"); do { *((volatile
int*)__null) = 42227; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42228 MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(proxy))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
, "../TestExampleGenBinding.cpp", 42228); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
")"); do { *((volatile int*)__null) = 42228; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
42229 JSAutoRealm ar(cx, proxy);
42230 bool deleteSucceeded = false;
42231 bool found = false;
42232 FakeString<char16_t> nomnom;
42233 bool isSymbol;
42234 if (!ConvertIdToString(cx, id, nomnom, isSymbol)) {
42235 return false;
42236 }
42237 if (!isSymbol) {
42238 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42239 // NOTE: This assert does NOT call the function.
42240 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NamedDeleter(NonNullHelper(Constify(nomnom)), found))>, "Should be returning void here");
42241 MOZ_KnownLive(self)(self)->NamedDeleter(NonNullHelper(Constify(nomnom)), found);
42242 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42242); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42242; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42243 }
42244 deleteSucceeded = true;
42245 if (!found || deleteSucceeded) {
42246 return opresult.succeed();
42247 }
42248 return opresult.failCantDelete();
42249}
42250
42251const NativeNamedOrIndexedPropertyHooks sNativeNamedOrIndexedPropertyHooks = {
42252 binding_detail::ResolveOwnProperty,
42253 binding_detail::EnumerateOwnProperties,
42254 DeleteNamedProperty
42255};
42256bool sNativePropertiesInited = false;
42257const NativePropertyHooks sNativePropertyHooks = {
42258 &sNativeNamedOrIndexedPropertyHooks,
42259 { sNativeProperties.Upcast(), nullptr, &sNativePropertiesInited },
42260 prototypes::id::TestExampleProxyInterface,
42261 constructors::id::TestExampleProxyInterface,
42262 &DefaultXrayExpandoObjectClass
42263};
42264
42265static const DOMInterfaceInfo sInterfaceObjectInfo = {
42266 { ThrowingConstructor, &sNativePropertyHooks },
42267 JS::GetRealmFunctionPrototype,
42268 prototypes::id::TestExampleProxyInterface,
42269 PrototypeTraits<prototypes::id::TestExampleProxyInterface>::Depth,
42270 true,
42271};
42272
42273static const DOMIfaceAndProtoJSClass sPrototypeClass = {
42274 {
42275 "TestExampleProxyInterfacePrototype",
42276 JSCLASS_IS_DOMIFACEANDPROTOJSCLASSJSCLASS_USERBIT2 | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE0),
42277 JS_NULL_CLASS_OPS,
42278 JS_NULL_CLASS_SPEC,
42279 JS_NULL_CLASS_EXT,
42280 JS_NULL_OBJECT_OPS
42281 },
42282 eInterfacePrototype,
42283 prototypes::id::TestExampleProxyInterface,
42284 PrototypeTraits<prototypes::id::TestExampleProxyInterface>::Depth,
42285 &sNativePropertyHooks,
42286 JS::GetRealmObjectPrototype
42287};
42288
42289bool
42290DOMProxyHandler::getOwnPropDescriptor(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, bool ignoreNamedProps, JS::MutableHandle<Maybe<JS::PropertyDescriptor>> desc) const
42291{
42292 bool isXray = xpc::WrapperFactory::IsXrayWrapper(proxy);
42293 uint32_t index = GetArrayIndexFromId(id);
42294 if (IsArrayIndex(index)) {
42295 JS::Rooted<JS::Value> value(cx);
42296 uint32_t ix = index;
42297 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42298 bool found = false;
42299 int32_t result(MOZ_KnownLive(self)(self)->IndexedGetter(ix, found));
42300 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42300); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42300; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42301
42302 if (found) {
42303 value.setInt32(int32_t(result));
42304 desc.set(mozilla::Some(JS::PropertyDescriptor::Data(value, { JS::PropertyAttribute::Configurable, JS::PropertyAttribute::Enumerable, JS::PropertyAttribute::Writable })));
42305 return true;
42306 }
42307 }
42308
42309 JS::Rooted<JSObject*> expando(cx);
42310 if (!isXray &&(expando = GetExpandoObject(proxy))) {
42311 if (!JS_GetOwnPropertyDescriptorById(cx, expando, id, desc)) {
42312 return false;
42313 }
42314 if (desc.isSome()) {
42315 return true;
42316 }
42317 }
42318
42319 bool callNamedGetter = false;
42320 if (!IsArrayIndex(index) && !ignoreNamedProps) {
42321 bool hasOnProto;
42322 if (!HasPropertyOnPrototype(cx, proxy, id, &hasOnProto)) {
42323 return false;
42324 }
42325 callNamedGetter = !hasOnProto;
42326 }
42327 if (callNamedGetter) {
42328 JS::Rooted<JS::Value> value(cx);
42329 FakeString<char16_t> nom;
42330 bool isSymbol;
42331 if (!ConvertIdToString(cx, id, nom, isSymbol)) {
42332 return false;
42333 }
42334 if (!isSymbol) {
42335 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42336 bool found = false;
42337 int16_t result(MOZ_KnownLive(self)(self)->NamedGetter(NonNullHelper(Constify(nom)), found));
42338 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42338); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42338; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42339
42340 if (found) {
42341 value.setInt32(int32_t(result));
42342 desc.set(mozilla::Some(JS::PropertyDescriptor::Data(value, { JS::PropertyAttribute::Configurable, JS::PropertyAttribute::Enumerable, JS::PropertyAttribute::Writable })));
42343 return true;
42344 }
42345 }
42346 }
42347
42348 desc.reset();
42349 return true;
42350}
42351
42352bool
42353DOMProxyHandler::defineProperty(JSContext* cx_, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, JS::Handle<JS::PropertyDescriptor> desc, JS::ObjectOpResult& opresult, bool* done) const
42354{
42355 uint32_t index = GetArrayIndexFromId(id);
42356 if (IsArrayIndex(index)) {
42357 JSContext* cx = cx_;
42358 *done = true;
42359 // https://webidl.spec.whatwg.org/#legacy-platform-object-defineownproperty
42360 // Step 1.1. The no-indexed-setter case is handled by step 1.2.
42361 if (!desc.isDataDescriptor()) {
42362 return opresult.failNotDataDescriptor();
42363 }
42364
42365 uint32_t y = index;
42366 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42367 JS::Rooted<JS::Value> rootedValue(cx, desc.value());
42368 int32_t z;
42369 if (!ValueToPrimitive<int32_t, eDefault>(cx, desc.value(), "Value being assigned to TestExampleProxyInterface setter", &z)) {
42370 return false;
42371 }
42372 // NOTE: This assert does NOT call the function.
42373 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->IndexedSetter(y, z))>, "Should be returning void here");
42374 MOZ_KnownLive(self)(self)->IndexedSetter(y, z);
42375 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42375); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42375; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42376 return opresult.succeed();
42377 }
42378 JSContext* cx = cx_;
42379 // https://webidl.spec.whatwg.org/#legacy-platform-object-defineownproperty
42380 // Step 2.2.2.1.
42381 if (!desc.isDataDescriptor()) {
42382 *done = true;
42383 return opresult.failNotDataDescriptor();
42384 }
42385 FakeString<char16_t> me;
42386 bool isSymbol;
42387 if (!ConvertIdToString(cx, id, me, isSymbol)) {
42388 return false;
42389 }
42390 if (!isSymbol) {
42391 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42392 JS::Rooted<JS::Value> rootedValue(cx, desc.value());
42393 int16_t value;
42394 if (!ValueToPrimitive<int16_t, eDefault>(cx, desc.value(), "Value being assigned to TestExampleProxyInterface setter", &value)) {
42395 return false;
42396 }
42397 // NOTE: This assert does NOT call the function.
42398 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NamedSetter(NonNullHelper(Constify(me)), value))>, "Should be returning void here");
42399 MOZ_KnownLive(self)(self)->NamedSetter(NonNullHelper(Constify(me)), value);
42400 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42400); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42400; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42401 *done = true;
42402 return opresult.succeed();
42403 }
42404 return mozilla::dom::DOMProxyHandler::defineProperty(cx_, proxy, id, desc, opresult, done);
42405}
42406
42407
42408bool
42409DOMProxyHandler::ownPropNames(JSContext* cx, JS::Handle<JSObject*> proxy, unsigned flags, JS::MutableHandleVector<jsid> props) const
42410{
42411 bool isXray = xpc::WrapperFactory::IsXrayWrapper(proxy);
42412
42413 uint32_t length = UnwrapProxy(proxy)->Length();
42414 MOZ_ASSERT(int32_t(length) >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(int32_t(length) >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(int32_t(length) >= 0))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("int32_t(length) >= 0"
, "../TestExampleGenBinding.cpp", 42414); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "int32_t(length) >= 0" ")"); do { *((volatile
int*)__null) = 42414; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42415 for (int32_t i = 0; i < int32_t(length); ++i) {
42416 if (!props.append(JS::PropertyKey::Int(i))) {
42417 return false;
42418 }
42419 }
42420
42421 nsTArray<nsString> names;
42422 UnwrapProxy(proxy)->GetSupportedNames(names);
42423 if (!AppendNamedPropertyIds(cx, proxy, names, false, props)) {
42424 return false;
42425 }
42426
42427 JS::Rooted<JSObject*> expando(cx);
42428 if (!isXray &&(expando = DOMProxyHandler::GetExpandoObject(proxy)) &&
42429 !js::GetPropertyKeys(cx, expando, flags, props)) {
42430 return false;
42431 }
42432
42433 return true;
42434}
42435
42436bool
42437DOMProxyHandler::hasOwn(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, bool* bp) const
42438{
42439 MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(proxy),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42440); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42440; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
42440 "Should not have a XrayWrapper here")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42440); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42440; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42441 uint32_t index = GetArrayIndexFromId(id);
42442 if (IsArrayIndex(index)) {
42443 bool found = false;
42444 uint32_t ix = index;
42445 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42446 int32_t result(MOZ_KnownLive(self)(self)->IndexedGetter(ix, found));
42447 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42447); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42447; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42448 (void)result;
42449
42450 *bp = found;
42451 return true;
42452 }
42453
42454
42455 JS::Rooted<JSObject*> expando(cx, GetExpandoObject(proxy));
42456 if (expando) {
42457 bool b = true;
42458 bool ok = JS_HasPropertyById(cx, expando, id, &b);
42459 *bp = !!b;
42460 if (!ok || *bp) {
42461 return ok;
42462 }
42463 }
42464
42465 bool hasOnProto;
42466 if (!HasPropertyOnPrototype(cx, proxy, id, &hasOnProto)) {
42467 return false;
42468 }
42469 if (!hasOnProto) {
42470 bool found = false;
42471 FakeString<char16_t> nom;
42472 bool isSymbol;
42473 if (!ConvertIdToString(cx, id, nom, isSymbol)) {
42474 return false;
42475 }
42476 if (!isSymbol) {
42477 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42478 int16_t result(MOZ_KnownLive(self)(self)->NamedGetter(NonNullHelper(Constify(nom)), found));
42479 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42479); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42479; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42480 (void)result;
42481 }
42482
42483 *bp = found;
42484 return true;
42485 }
42486 *bp = false;
42487 return true;
42488}
42489
42490bool
42491DOMProxyHandler::get(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<JS::Value> receiver, JS::Handle<jsid> id, JS::MutableHandle<JS::Value> vp) const
42492{
42493 MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(proxy),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42494); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42494; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
42494 "Should not have a XrayWrapper here")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42494); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42494; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42495
42496 uint32_t index = GetArrayIndexFromId(id);
42497 if (IsArrayIndex(index)) {
42498 uint32_t ix = index;
42499 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42500 bool found = false;
42501 int32_t result(MOZ_KnownLive(self)(self)->IndexedGetter(ix, found));
42502 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42502); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42502; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42503
42504 if (found) {
42505 vp.setInt32(int32_t(result));
42506 return true;
42507 }
42508 // Even if we don't have this index, we don't forward the
42509 // get on to our expando object.
42510 } else {
42511 bool expandoHasProp = false;
42512 { // Scope for expando
42513 JS::Rooted<JSObject*> expando(cx, DOMProxyHandler::GetExpandoObject(proxy));
42514 if (expando) {
42515 if (!JS_HasPropertyById(cx, expando, id, &expandoHasProp)) {
42516 return false;
42517 }
42518
42519 if (expandoHasProp) {
42520 // Forward the get to the expando object, but our receiver is whatever our
42521 // receiver is.
42522 if (!JS_ForwardGetPropertyTo(cx, expando, id, receiver, vp)) {
42523 return false;
42524 }
42525 }
42526 }
42527 }
42528
42529 if (expandoHasProp) {
42530 return true;
42531 }
42532 }
42533
42534 bool foundOnPrototype;
42535 if (!GetPropertyOnPrototype(cx, proxy, receiver, id, &foundOnPrototype, vp)) {
42536 return false;
42537 }
42538
42539 if (foundOnPrototype) {
42540 return true;
42541 }
42542
42543 MOZ_ASSERT(vp.isUndefined())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(vp.isUndefined())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(vp.isUndefined()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("vp.isUndefined()"
, "../TestExampleGenBinding.cpp", 42543); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "vp.isUndefined()" ")"); do { *((volatile int
*)__null) = 42543; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42544 if (!IsArrayIndex(index)) {
42545 FakeString<char16_t> nom;
42546 bool isSymbol;
42547 if (!ConvertIdToString(cx, id, nom, isSymbol)) {
42548 return false;
42549 }
42550 if (!isSymbol) {
42551 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42552 bool found = false;
42553 int16_t result(MOZ_KnownLive(self)(self)->NamedGetter(NonNullHelper(Constify(nom)), found));
42554 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42554); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42554; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42555
42556 if (found) {
42557 vp.setInt32(int32_t(result));
42558 return true;
42559 }
42560 }
42561 }
42562
42563 return true;
42564}
42565
42566const char*
42567DOMProxyHandler::className(JSContext* cx, JS::Handle<JSObject*> proxy) const
42568{
42569 return "TestExampleProxyInterface";
42570}
42571
42572bool
42573DOMProxyHandler::finalizeInBackground(const JS::Value& priv) const
42574{
42575 return false;
42576}
42577
42578void
42579DOMProxyHandler::finalize(JS::GCContext* gcx, JSObject* proxy) const
42580{
42581 mozilla::dom::TestExampleProxyInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleProxyInterface>(proxy);
42582 if (self) {
42583 JS::SetReservedSlot(proxy, DOM_OBJECT_SLOT0, JS::UndefinedValue());
42584 ClearWrapper(self, self, proxy);
42585 if (size_t mallocBytes = BindingJSObjectMallocBytes(self)) {
42586 JS::RemoveAssociatedMemory(proxy, mallocBytes,
42587 JS::MemoryUse::DOMBinding);
42588 }
42589 AddForDeferredFinalization<mozilla::dom::TestExampleProxyInterface>(self);
42590 }
42591}
42592
42593const DOMProxyHandler*
42594DOMProxyHandler::getInstance()
42595{
42596 static const DOMProxyHandler instance;
42597 return &instance;
42598}
42599
42600bool
42601DOMProxyHandler::delete_(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, JS::ObjectOpResult& opresult) const
42602{
42603 MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(proxy),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42604); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42604; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
42604 "Should not have a XrayWrapper here")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42604); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42604; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42605
42606 uint32_t index = GetArrayIndexFromId(id);
42607 if (IsArrayIndex(index)) {
42608 bool deleteSucceeded;
42609 bool found = false;
42610 uint32_t ix = index;
42611 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42612 int32_t result(MOZ_KnownLive(self)(self)->IndexedGetter(ix, found));
42613 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42613); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42613; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42614 (void)result;
42615 deleteSucceeded = !found;
42616 return deleteSucceeded ? opresult.succeed() : opresult.failCantDelete();
42617 }
42618 // Try named delete only if the named property visibility
42619 // algorithm says the property is visible.
42620 bool tryNamedDelete = true;
42621 { // Scope for expando
42622 JS::Rooted<JSObject*> expando(cx, DOMProxyHandler::GetExpandoObject(proxy));
42623 if (expando) {
42624 bool hasProp;
42625 if (!JS_HasPropertyById(cx, expando, id, &hasProp)) {
42626 return false;
42627 }
42628 tryNamedDelete = !hasProp;
42629 }
42630 }
42631 if (tryNamedDelete) {
42632 bool hasOnProto;
42633 if (!HasPropertyOnPrototype(cx, proxy, id, &hasOnProto)) {
42634 return false;
42635 }
42636 tryNamedDelete = !hasOnProto;
42637 }
42638 if (tryNamedDelete) {
42639 bool found = false;
42640 bool deleteSucceeded;
42641 FakeString<char16_t> nomnom;
42642 bool isSymbol;
42643 if (!ConvertIdToString(cx, id, nomnom, isSymbol)) {
42644 return false;
42645 }
42646 if (!isSymbol) {
42647 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42648 // NOTE: This assert does NOT call the function.
42649 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NamedDeleter(NonNullHelper(Constify(nomnom)), found))>, "Should be returning void here");
42650 MOZ_KnownLive(self)(self)->NamedDeleter(NonNullHelper(Constify(nomnom)), found);
42651 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42651); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42651; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42652 }
42653 deleteSucceeded = true;
42654 if (found) {
42655 return deleteSucceeded ? opresult.succeed() : opresult.failCantDelete();
42656 }
42657 }
42658
42659 return dom::DOMProxyHandler::delete_(cx, proxy, id, opresult);
42660}
42661
42662bool
42663DOMProxyHandler::getElements(JSContext* cx, JS::Handle<JSObject*> proxy, uint32_t begin, uint32_t end, js::ElementAdder* adder) const
42664{
42665 JS::Rooted<JS::Value> temp(cx);
42666 MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(proxy),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42667); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42667; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
42667 "Should not have a XrayWrapper here")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42667); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42667; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42668
42669 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42670 uint32_t length = self->Length();
42671 // Compute the end of the indices we'll get ourselves
42672 uint32_t ourEnd = std::max(begin, std::min(end, length));
42673
42674 for (uint32_t index = begin; index < ourEnd; ++index) {
42675 uint32_t ix = index;
42676 bool found = false;
42677 int32_t result(MOZ_KnownLive(self)(self)->IndexedGetter(ix, found));
42678 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42678); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42678; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42679
42680 MOZ_ASSERT(found)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(found)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(found))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("found", "../TestExampleGenBinding.cpp"
, 42680); AnnotateMozCrashReason("MOZ_ASSERT" "(" "found" ")"
); do { *((volatile int*)__null) = 42680; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
42681 temp.setInt32(int32_t(result));
42682 if (!adder->append(cx, temp)) return false;
42683 continue;
42684 }
42685
42686 if (end > ourEnd) {
42687 JS::Rooted<JSObject*> proto(cx);
42688 if (!js::GetObjectProto(cx, proxy, &proto)) {
42689 return false;
42690 }
42691 return js::GetElementsWithAdder(cx, proto, proxy, ourEnd, end, adder);
42692 }
42693
42694 return true;
42695}
42696
42697bool
42698DOMProxyHandler::setCustom(JSContext* cx_, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, JS::Handle<JS::Value> v, bool* done) const
42699{
42700 MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(proxy),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42701); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42701; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
42701 "Should not have a XrayWrapper here")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!xpc::WrapperFactory::IsXrayWrapper(proxy))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(!xpc::WrapperFactory::IsXrayWrapper(proxy)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("!xpc::WrapperFactory::IsXrayWrapper(proxy)"
" (" "Should not have a XrayWrapper here" ")", "../TestExampleGenBinding.cpp"
, 42701); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!xpc::WrapperFactory::IsXrayWrapper(proxy)"
") (" "Should not have a XrayWrapper here" ")"); do { *((volatile
int*)__null) = 42701; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42702 uint32_t index = GetArrayIndexFromId(id);
42703 if (IsArrayIndex(index)) {
42704 JSContext* cx = cx_;
42705 uint32_t y = index;
42706 mozilla::dom::TestExampleProxyInterface* self = UnwrapProxy(proxy);
42707 JS::Rooted<JS::Value> rootedValue(cx, v);
42708 int32_t z;
42709 if (!ValueToPrimitive<int32_t, eDefault>(cx, v, "Value being assigned to TestExampleProxyInterface setter", &z)) {
42710 return false;
42711 }
42712 // NOTE: This assert does NOT call the function.
42713 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->IndexedSetter(y, z))>, "Should be returning void here");
42714 MOZ_KnownLive(self)(self)->IndexedSetter(y, z);
42715 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42715); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42715; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42716 *done = true;
42717 return true;
42718 }
42719
42720 *done = false;
42721 return true;
42722}
42723
42724size_t
42725DOMProxyHandler::objectMoved(JSObject* obj, JSObject* old) const
42726{
42727 mozilla::dom::TestExampleProxyInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleProxyInterface>(obj);
42728 if (self) {
42729 UpdateWrapper(self, self, obj, old);
42730 }
42731
42732 return 0;
42733}
42734
42735static const DOMJSClass sClass = {
42736 PROXY_CLASS_DEF("TestExampleProxyInterface",{"TestExampleProxyInterface", JSClass::NON_NATIVE | JSCLASS_IS_PROXY
| JSCLASS_DELAY_METADATA_BUILDER | js::CheckProxyFlags<JSCLASS_IS_DOMJSCLASS
| JSCLASS_HAS_RESERVED_SLOTS(1)>(), &js::ProxyClassOps
, JS_NULL_CLASS_SPEC, &js::ProxyClassExtension, &js::
ProxyObjectOps}
42737 JSCLASS_IS_DOMJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(1)){"TestExampleProxyInterface", JSClass::NON_NATIVE | JSCLASS_IS_PROXY
| JSCLASS_DELAY_METADATA_BUILDER | js::CheckProxyFlags<JSCLASS_IS_DOMJSCLASS
| JSCLASS_HAS_RESERVED_SLOTS(1)>(), &js::ProxyClassOps
, JS_NULL_CLASS_SPEC, &js::ProxyClassExtension, &js::
ProxyObjectOps}
,
42738 { prototypes::id::TestExampleProxyInterface, 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 },
42739 std::is_base_of_v<nsISupports, mozilla::dom::TestExampleProxyInterface>,
42740 &sNativePropertyHooks,
42741 FindAssociatedGlobalForNative<mozilla::dom::TestExampleProxyInterface>::Get,
42742 GetProtoObjectHandle,
42743 GetCCParticipant<mozilla::dom::TestExampleProxyInterface>::Get(),
42744 nullptr,
42745 nullptr
42746};
42747
42748bool
42749Wrap(JSContext* aCx, mozilla::dom::TestExampleProxyInterface* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
42750{
42751 static_assert(!std::is_base_of_v<NonRefcountedDOMObject, mozilla::dom::TestExampleProxyInterface>,
42752 "Shouldn't have wrappercached things that are not refcounted.");
42753 static_assert(std::is_same_v<decltype(aObject), mozilla::dom::TestExampleProxyInterface*>);
42754 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)", "../TestExampleGenBinding.cpp"
, 42754); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsCorrect(aObject)"
")"); do { *((volatile int*)__null) = 42754; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
42755 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)", "../TestExampleGenBinding.cpp"
, 42755); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(aGivenProto, aCx)"
")"); do { *((volatile int*)__null) = 42755; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
42756 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" ")", "../TestExampleGenBinding.cpp"
, 42758); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 42758; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
42757 "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" ")", "../TestExampleGenBinding.cpp"
, 42758); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 42758; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
42758 "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" ")", "../TestExampleGenBinding.cpp"
, 42758); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 42758; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42759
42760 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" ")", "../TestExampleGenBinding.cpp"
, 42761); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 42761; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
42761 "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" ")", "../TestExampleGenBinding.cpp"
, 42761); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 42761; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
42762
42763 // If the wrapper cache contains a dead reflector then finalize that
42764 // now, ensuring that the finalizer for the old reflector always
42765 // runs before the new reflector is created and attached. This
42766 // avoids the awkward situation where there are multiple reflector
42767 // objects that contain pointers to the same native.
42768
42769 if (JSObject* oldReflector = aCache->GetWrapperMaybeDead()) {
42770 DOMProxyHandler::getInstance()->finalize(nullptr /* unused */, oldReflector);
42771 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()", "../TestExampleGenBinding.cpp"
, 42771); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapperMaybeDead()"
")"); do { *((volatile int*)__null) = 42771; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
42772 }
42773
42774 JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
42775 if (!global) {
42776 return false;
42777 }
42778 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)"
, "../TestExampleGenBinding.cpp", 42778); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsGlobalObject(global)" ")"); do { *((volatile
int*)__null) = 42778; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42779 JS::AssertObjectIsNotGray(global);
42780
42781 // That might have ended up wrapping us already, due to the wonders
42782 // of XBL. Check for that, and bail out as needed.
42783 aReflector.set(aCache->GetWrapper());
42784 if (aReflector) {
42785#ifdef DEBUG1
42786 AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
42787#endif // DEBUG
42788 return true;
42789 }
42790
42791 JSAutoRealm ar(aCx, global);
42792 JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
42793 if (!canonicalProto) {
42794 return false;
42795 }
42796 JS::Rooted<JSObject*> proto(aCx);
42797 if (aGivenProto) {
42798 proto = aGivenProto;
42799 // Unfortunately, while aGivenProto was in the compartment of aCx
42800 // coming in, we changed compartments to that of "parent" so may need
42801 // to wrap the proto here.
42802 if (js::GetContextCompartment(aCx) != JS::GetCompartment(proto)) {
42803 if (!JS_WrapObject(aCx, &proto)) {
42804 return false;
42805 }
42806 }
42807 } else {
42808 proto = canonicalProto;
42809 }
42810
42811 BindingJSObjectCreator<mozilla::dom::TestExampleProxyInterface> creator(aCx);
42812 creator.CreateProxyObject(aCx, &sClass.mBase, DOMProxyHandler::getInstance(),
42813 proto, /* aLazyProto = */ false,
42814 aObject, JS::UndefinedHandleValue, aReflector);
42815 if (!aReflector) {
42816 return false;
42817 }
42818
42819 aCache->SetWrapper(aReflector);
42820 creator.InitializationSucceeded();
42821
42822 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"
, "../TestExampleGenBinding.cpp", 42823); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 42823; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
42823 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"
, "../TestExampleGenBinding.cpp", 42823); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 42823; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
42824 // If proto != canonicalProto, we have to preserve our wrapper;
42825 // otherwise we won't be able to properly recreate it later, since
42826 // we won't know what proto to use. Note that we don't check
42827 // aGivenProto here, since it's entirely possible (and even
42828 // somewhat common) to have a non-null aGivenProto which is the
42829 // same as canonicalProto.
42830 if (proto != canonicalProto) {
42831 PreserveWrapper(aObject);
42832 }
42833
42834 return true;
42835}
42836
42837void
42838CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
42839{
42840 JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::TestExampleProxyInterface);
42841 JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::TestExampleProxyInterface);
42842
42843 JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
42844 if (!parentProto) {
42845 return;
42846 }
42847
42848 JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
42849 if (!constructorProto) {
42850 return;
42851 }
42852
42853 dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
42854 &sPrototypeClass, protoCache,
42855 constructorProto, &sInterfaceObjectInfo, 0, false, Span<const LegacyFactoryFunction, 0>{},
42856 interfaceCache,
42857 sNativeProperties.Upcast(),
42858 nullptr,
42859 "TestExampleProxyInterface", aDefineOnGlobal,
42860 nullptr,
42861 false,
42862 nullptr);
42863}
42864
42865JSObject*
42866GetConstructorObject(JSContext* aCx)
42867{
42868 return GetConstructorObjectHandle(aCx);
42869}
42870
42871} // namespace TestExampleProxyInterface_Binding
42872
42873
42874
42875namespace TestExampleThrowingConstructorInterface_Binding {
42876
42877static bool
42878_addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
42879{
42880 mozilla::dom::TestExampleThrowingConstructorInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleThrowingConstructorInterface>(obj);
42881 // We don't want to preserve if we don't have a wrapper, and we
42882 // obviously can't preserve if we're not initialized.
42883 if (self && self->GetWrapperPreserveColor()) {
42884 PreserveWrapper(self);
42885 }
42886 return true;
42887}
42888
42889static void
42890_finalize(JS::GCContext* gcx, JSObject* obj)
42891{
42892 mozilla::dom::TestExampleThrowingConstructorInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleThrowingConstructorInterface>(obj);
42893 if (self) {
42894 JS::SetReservedSlot(obj, DOM_OBJECT_SLOT0, JS::UndefinedValue());
42895 ClearWrapper(self, self, obj);
42896 if (size_t mallocBytes = BindingJSObjectMallocBytes(self)) {
42897 JS::RemoveAssociatedMemory(obj, mallocBytes,
42898 JS::MemoryUse::DOMBinding);
42899 }
42900 AddForDeferredFinalization<mozilla::dom::TestExampleThrowingConstructorInterface>(self);
42901 }
42902}
42903
42904static nsWrapperCache*
42905_getWrapperCache(JS::Handle<JSObject*> obj)
42906{
42907 mozilla::dom::TestExampleThrowingConstructorInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleThrowingConstructorInterface>(obj);
42908 return self;
42909}
42910
42911static size_t
42912_objectMoved(JSObject* obj, JSObject* old)
42913{
42914 mozilla::dom::TestExampleThrowingConstructorInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleThrowingConstructorInterface>(obj);
42915 if (self) {
42916 UpdateWrapper(self, self, obj, old);
42917 }
42918
42919 return 0;
42920}
42921
42922bool sNativePropertiesInited = false;
42923const NativePropertyHooks sNativePropertyHooks = {
42924 nullptr,
42925 { nullptr, nullptr, &sNativePropertiesInited },
42926 prototypes::id::TestExampleThrowingConstructorInterface,
42927 constructors::id::TestExampleThrowingConstructorInterface,
42928 &DefaultXrayExpandoObjectClass
42929};
42930
42931static bool
42932_constructor(JSContext* cx_, unsigned argc, JS::Value* vp)
42933{
42934 BindingCallContext cx(cx_, "TestExampleThrowingConstructorInterface constructor");
42935 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42937( cx, "TestExampleThrowingConstructorInterface"
, "constructor", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42936 "TestExampleThrowingConstructorInterface", "constructor", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42937( cx, "TestExampleThrowingConstructorInterface"
, "constructor", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42937 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42937( cx, "TestExampleThrowingConstructorInterface"
, "constructor", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
42938
42939 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
42940 JS::Rooted<JSObject*> obj(cx, &args.callee());
42941 if (!args.isConstructing()) {
42942 return ThrowConstructorWithoutNew(cx, "TestExampleThrowingConstructorInterface");
42943 }
42944
42945 JS::Rooted<JSObject*> desiredProto(cx);
42946 if (!GetDesiredProto(cx, args,
42947 prototypes::id::TestExampleThrowingConstructorInterface,
42948 CreateInterfaceObjects,
42949 &desiredProto)) {
42950 return false;
42951 }
42952
42953 unsigned argcount = std::min(args.length(), 2u);
42954 switch (argcount) {
42955 case 0: {
42956 GlobalObject global(cx, obj);
42957 if (global.Failed()) {
42958 return false;
42959 }
42960
42961 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42962 Maybe<JSAutoRealm> ar;
42963 if (objIsXray) {
42964 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42965 // we know Xrays have no dynamic unwrap behavior.
42966 obj = js::CheckedUnwrapStatic(obj);
42967 if (!obj) {
42968 return false;
42969 }
42970 ar.emplace(cx, obj);
42971 if (!JS_WrapObject(cx, &desiredProto)) {
42972 return false;
42973 }
42974 }
42975 FastErrorResult rv;
42976 auto result(StrongOrRawPtr<mozilla::dom::TestExampleThrowingConstructorInterface>(mozilla::dom::TestExampleThrowingConstructorInterface::Constructor(global, rv)));
42977 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"
)), 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)"
, "../TestExampleGenBinding.cpp", 42980); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42980; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42981 static_assert(!std::is_pointer_v<decltype(result)>,
42982 "NewObject implies that we need to keep the object alive with a strong reference.");
42983 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
42984 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 42984); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 42984; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
42985 return false;
42986 }
42987 return true;
42988 break;
42989 }
42990 case 1: {
42991 if (args[0].isNullOrUndefined()) {
42992 mozilla::dom::TestInterface* arg0;
42993 arg0 = nullptr;
42994 GlobalObject global(cx, obj);
42995 if (global.Failed()) {
42996 return false;
42997 }
42998
42999 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
43000 Maybe<JSAutoRealm> ar;
43001 if (objIsXray) {
43002 // Since our object is an Xray, we can just CheckedUnwrapStatic:
43003 // we know Xrays have no dynamic unwrap behavior.
43004 obj = js::CheckedUnwrapStatic(obj);
43005 if (!obj) {
43006 return false;
43007 }
43008 ar.emplace(cx, obj);
43009 if (!JS_WrapObject(cx, &desiredProto)) {
43010 return false;
43011 }
43012 }
43013 FastErrorResult rv;
43014 auto result(StrongOrRawPtr<mozilla::dom::TestExampleThrowingConstructorInterface>(mozilla::dom::TestExampleThrowingConstructorInterface::Constructor(global, MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv)));
43015 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"
)), 0))
) {
43016 return false;
43017 }
43018 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43018); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43018; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43019 static_assert(!std::is_pointer_v<decltype(result)>,
43020 "NewObject implies that we need to keep the object alive with a strong reference.");
43021 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
43022 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43022); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 43022; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
43023 return false;
43024 }
43025 return true;
43026 }
43027 if (args[0].isObject()) {
43028 do {
43029 mozilla::dom::TestInterface* arg0;
43030 {
43031 // Our JSContext should be in the right global to do unwrapping in.
43032 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
43033 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
43034 break;
43035 }
43036 }
43037 GlobalObject global(cx, obj);
43038 if (global.Failed()) {
43039 return false;
43040 }
43041
43042 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
43043 Maybe<JSAutoRealm> ar;
43044 if (objIsXray) {
43045 // Since our object is an Xray, we can just CheckedUnwrapStatic:
43046 // we know Xrays have no dynamic unwrap behavior.
43047 obj = js::CheckedUnwrapStatic(obj);
43048 if (!obj) {
43049 return false;
43050 }
43051 ar.emplace(cx, obj);
43052 if (!JS_WrapObject(cx, &desiredProto)) {
43053 return false;
43054 }
43055 }
43056 FastErrorResult rv;
43057 auto result(StrongOrRawPtr<mozilla::dom::TestExampleThrowingConstructorInterface>(mozilla::dom::TestExampleThrowingConstructorInterface::Constructor(global, MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv)));
43058 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"
)), 0))
) {
43059 return false;
43060 }
43061 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43061); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43061; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43062 static_assert(!std::is_pointer_v<decltype(result)>,
43063 "NewObject implies that we need to keep the object alive with a strong reference.");
43064 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
43065 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43065); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 43065; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
43066 return false;
43067 }
43068 return true;
43069 } while (false);
43070 do {
43071 RootedSpiderMonkeyInterface<ArrayBuffer> arg0(cx);
43072 if (!arg0.Init(&args[0].toObject())) {
43073 break;
43074 }
43075 if (JS::IsSharedArrayBufferObject(arg0.Obj())) {
43076 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
43077 return false;
43078 }
43079 if (JS::IsLargeArrayBufferMaybeShared(arg0.Obj())) {
43080 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
43081 return false;
43082 }
43083 if (JS::IsResizableArrayBufferMaybeShared(arg0.Obj())) {
43084 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
43085 return false;
43086 }
43087 GlobalObject global(cx, obj);
43088 if (global.Failed()) {
43089 return false;
43090 }
43091
43092 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
43093 Maybe<JSAutoRealm> ar;
43094 if (objIsXray) {
43095 // Since our object is an Xray, we can just CheckedUnwrapStatic:
43096 // we know Xrays have no dynamic unwrap behavior.
43097 obj = js::CheckedUnwrapStatic(obj);
43098 if (!obj) {
43099 return false;
43100 }
43101 ar.emplace(cx, obj);
43102 if (!JS_WrapObject(cx, &desiredProto)) {
43103 return false;
43104 }
43105 if (!arg0.WrapIntoNewCompartment(cx)) {
43106 return false;
43107 }
43108 }
43109 FastErrorResult rv;
43110 auto result(StrongOrRawPtr<mozilla::dom::TestExampleThrowingConstructorInterface>(mozilla::dom::TestExampleThrowingConstructorInterface::Constructor(global, Constify(arg0), rv)));
43111 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"
)), 0))
) {
43112 return false;
43113 }
43114 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43114); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43114; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43115 static_assert(!std::is_pointer_v<decltype(result)>,
43116 "NewObject implies that we need to keep the object alive with a strong reference.");
43117 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
43118 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43118); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 43118; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
43119 return false;
43120 }
43121 return true;
43122 } while (false);
43123 do {
43124 RootedSpiderMonkeyInterface<Uint8Array> arg0(cx);
43125 if (!arg0.Init(&args[0].toObject())) {
43126 break;
43127 }
43128 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
43129 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
43130 return false;
43131 }
43132 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
43133 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
43134 return false;
43135 }
43136 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
43137 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
43138 return false;
43139 }
43140 GlobalObject global(cx, obj);
43141 if (global.Failed()) {
43142 return false;
43143 }
43144
43145 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
43146 Maybe<JSAutoRealm> ar;
43147 if (objIsXray) {
43148 // Since our object is an Xray, we can just CheckedUnwrapStatic:
43149 // we know Xrays have no dynamic unwrap behavior.
43150 obj = js::CheckedUnwrapStatic(obj);
43151 if (!obj) {
43152 return false;
43153 }
43154 ar.emplace(cx, obj);
43155 if (!JS_WrapObject(cx, &desiredProto)) {
43156 return false;
43157 }
43158 if (!arg0.WrapIntoNewCompartment(cx)) {
43159 return false;
43160 }
43161 }
43162 FastErrorResult rv;
43163 auto result(StrongOrRawPtr<mozilla::dom::TestExampleThrowingConstructorInterface>(mozilla::dom::TestExampleThrowingConstructorInterface::Constructor(global, Constify(arg0), rv)));
43164 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"
)), 0))
) {
43165 return false;
43166 }
43167 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43167); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43167; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43168 static_assert(!std::is_pointer_v<decltype(result)>,
43169 "NewObject implies that we need to keep the object alive with a strong reference.");
43170 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
43171 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43171); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 43171; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
43172 return false;
43173 }
43174 return true;
43175 } while (false);
43176 }
43177 GlobalObject global(cx, obj);
43178 if (global.Failed()) {
43179 return false;
43180 }
43181
43182 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
43183 binding_detail::FakeString<char16_t> arg0;
43184 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
43185 return false;
43186 }
43187 Maybe<JSAutoRealm> ar;
43188 if (objIsXray) {
43189 // Since our object is an Xray, we can just CheckedUnwrapStatic:
43190 // we know Xrays have no dynamic unwrap behavior.
43191 obj = js::CheckedUnwrapStatic(obj);
43192 if (!obj) {
43193 return false;
43194 }
43195 ar.emplace(cx, obj);
43196 if (!JS_WrapObject(cx, &desiredProto)) {
43197 return false;
43198 }
43199 }
43200 FastErrorResult rv;
43201 auto result(StrongOrRawPtr<mozilla::dom::TestExampleThrowingConstructorInterface>(mozilla::dom::TestExampleThrowingConstructorInterface::Constructor(global, NonNullHelper(Constify(arg0)), rv)));
43202 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"
)), 0))
) {
43203 return false;
43204 }
43205 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43205); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43205; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43206 static_assert(!std::is_pointer_v<decltype(result)>,
43207 "NewObject implies that we need to keep the object alive with a strong reference.");
43208 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
43209 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43209); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 43209; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
43210 return false;
43211 }
43212 return true;
43213 break;
43214 }
43215 case 2: {
43216 uint32_t arg0;
43217 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
43218 return false;
43219 }
43220 if (args[1].isObject()) {
43221 do {
43222 NonNull<mozilla::dom::TestInterface> arg1;
43223 {
43224 // Our JSContext should be in the right global to do unwrapping in.
43225 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[1], arg1, cx);
43226 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
43227 break;
43228 }
43229 }
43230 GlobalObject global(cx, obj);
43231 if (global.Failed()) {
43232 return false;
43233 }
43234
43235 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
43236 Maybe<JSAutoRealm> ar;
43237 if (objIsXray) {
43238 // Since our object is an Xray, we can just CheckedUnwrapStatic:
43239 // we know Xrays have no dynamic unwrap behavior.
43240 obj = js::CheckedUnwrapStatic(obj);
43241 if (!obj) {
43242 return false;
43243 }
43244 ar.emplace(cx, obj);
43245 if (!JS_WrapObject(cx, &desiredProto)) {
43246 return false;
43247 }
43248 }
43249 FastErrorResult rv;
43250 auto result(StrongOrRawPtr<mozilla::dom::TestExampleThrowingConstructorInterface>(mozilla::dom::TestExampleThrowingConstructorInterface::Constructor(global, arg0, MOZ_KnownLive(NonNullHelper(arg1))(NonNullHelper(arg1)), rv)));
43251 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"
)), 0))
) {
43252 return false;
43253 }
43254 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43254); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43254; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43255 static_assert(!std::is_pointer_v<decltype(result)>,
43256 "NewObject implies that we need to keep the object alive with a strong reference.");
43257 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
43258 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43258); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 43258; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
43259 return false;
43260 }
43261 return true;
43262 } while (false);
43263 }
43264 GlobalObject global(cx, obj);
43265 if (global.Failed()) {
43266 return false;
43267 }
43268
43269 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
43270 Nullable<bool> arg1;
43271 if (args[1].isNullOrUndefined()) {
43272 arg1.SetNull();
43273 } else if (!ValueToPrimitive<bool, eDefault>(cx, args[1], "Argument 2", &arg1.SetValue())) {
43274 return false;
43275 }
43276 Maybe<JSAutoRealm> ar;
43277 if (objIsXray) {
43278 // Since our object is an Xray, we can just CheckedUnwrapStatic:
43279 // we know Xrays have no dynamic unwrap behavior.
43280 obj = js::CheckedUnwrapStatic(obj);
43281 if (!obj) {
43282 return false;
43283 }
43284 ar.emplace(cx, obj);
43285 if (!JS_WrapObject(cx, &desiredProto)) {
43286 return false;
43287 }
43288 }
43289 FastErrorResult rv;
43290 auto result(StrongOrRawPtr<mozilla::dom::TestExampleThrowingConstructorInterface>(mozilla::dom::TestExampleThrowingConstructorInterface::Constructor(global, arg0, Constify(arg1), rv)));
43291 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestExampleThrowingConstructorInterface constructor"
)), 0))
) {
43292 return false;
43293 }
43294 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43294); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43294; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43295 static_assert(!std::is_pointer_v<decltype(result)>,
43296 "NewObject implies that we need to keep the object alive with a strong reference.");
43297 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
43298 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43298); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 43298; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
43299 return false;
43300 }
43301 return true;
43302 break;
43303 }
43304 default: {
43305 // Using nsPrintfCString here would require including that
43306 // header. Let's not worry about it.
43307 nsAutoCString argCountStr;
43308 argCountStr.AppendPrintf("%u", args.length());
43309 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
43310 }
43311 }
43312 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestExampleGenBinding.cpp", 43312); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 43312; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
43313 return false;
43314}
43315
43316static const DOMInterfaceInfo sInterfaceObjectInfo = {
43317 { _constructor, &sNativePropertyHooks },
43318 JS::GetRealmFunctionPrototype,
43319 prototypes::id::TestExampleThrowingConstructorInterface,
43320 PrototypeTraits<prototypes::id::TestExampleThrowingConstructorInterface>::Depth,
43321 true,
43322};
43323
43324static const DOMIfaceAndProtoJSClass sPrototypeClass = {
43325 {
43326 "TestExampleThrowingConstructorInterfacePrototype",
43327 JSCLASS_IS_DOMIFACEANDPROTOJSCLASSJSCLASS_USERBIT2 | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE0),
43328 JS_NULL_CLASS_OPS,
43329 JS_NULL_CLASS_SPEC,
43330 JS_NULL_CLASS_EXT,
43331 JS_NULL_OBJECT_OPS
43332 },
43333 eInterfacePrototype,
43334 prototypes::id::TestExampleThrowingConstructorInterface,
43335 PrototypeTraits<prototypes::id::TestExampleThrowingConstructorInterface>::Depth,
43336 &sNativePropertyHooks,
43337 JS::GetRealmObjectPrototype
43338};
43339
43340static const JSClassOps sClassOps = {
43341 _addProperty, /* addProperty */
43342 nullptr, /* delProperty */
43343 nullptr, /* enumerate */
43344 nullptr, /* newEnumerate */
43345 nullptr, /* resolve */
43346 nullptr, /* mayResolve */
43347 _finalize, /* finalize */
43348 nullptr, /* call */
43349 nullptr, /* construct */
43350 nullptr, /* trace */
43351};
43352
43353static const js::ClassExtension sClassExtension = {
43354 _objectMoved /* objectMovedOp */
43355};
43356
43357static const DOMJSClass sClass = {
43358 { "TestExampleThrowingConstructorInterface",
43359 JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
43360 &sClassOps,
43361 JS_NULL_CLASS_SPEC,
43362 &sClassExtension,
43363 JS_NULL_OBJECT_OPS
43364 },
43365 { prototypes::id::TestExampleThrowingConstructorInterface, 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 },
43366 std::is_base_of_v<nsISupports, mozilla::dom::TestExampleThrowingConstructorInterface>,
43367 &sNativePropertyHooks,
43368 FindAssociatedGlobalForNative<mozilla::dom::TestExampleThrowingConstructorInterface>::Get,
43369 GetProtoObjectHandle,
43370 GetCCParticipant<mozilla::dom::TestExampleThrowingConstructorInterface>::Get(),
43371 nullptr,
43372 _getWrapperCache
43373};
43374static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS1,
43375 "Must have the right minimal number of reserved slots.");
43376static_assert(1 >= 1,
43377 "Must have enough reserved slots.");
43378
43379bool
43380Wrap(JSContext* aCx, mozilla::dom::TestExampleThrowingConstructorInterface* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
43381{
43382 static_assert(!std::is_base_of_v<NonRefcountedDOMObject, mozilla::dom::TestExampleThrowingConstructorInterface>,
43383 "Shouldn't have wrappercached things that are not refcounted.");
43384 static_assert(std::is_same_v<decltype(aObject), mozilla::dom::TestExampleThrowingConstructorInterface*>);
43385 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)", "../TestExampleGenBinding.cpp"
, 43385); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsCorrect(aObject)"
")"); do { *((volatile int*)__null) = 43385; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
43386 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)", "../TestExampleGenBinding.cpp"
, 43386); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(aGivenProto, aCx)"
")"); do { *((volatile int*)__null) = 43386; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
43387 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" ")", "../TestExampleGenBinding.cpp"
, 43389); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 43389; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
43388 "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" ")", "../TestExampleGenBinding.cpp"
, 43389); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 43389; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
43389 "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" ")", "../TestExampleGenBinding.cpp"
, 43389); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 43389; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
43390
43391 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" ")", "../TestExampleGenBinding.cpp"
, 43392); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 43392; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
43392 "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" ")", "../TestExampleGenBinding.cpp"
, 43392); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 43392; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
43393
43394 // If the wrapper cache contains a dead reflector then finalize that
43395 // now, ensuring that the finalizer for the old reflector always
43396 // runs before the new reflector is created and attached. This
43397 // avoids the awkward situation where there are multiple reflector
43398 // objects that contain pointers to the same native.
43399
43400 if (JSObject* oldReflector = aCache->GetWrapperMaybeDead()) {
43401 _finalize(nullptr /* unused */, oldReflector);
43402 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()", "../TestExampleGenBinding.cpp"
, 43402); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapperMaybeDead()"
")"); do { *((volatile int*)__null) = 43402; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
43403 }
43404
43405 JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
43406 if (!global) {
43407 return false;
43408 }
43409 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)"
, "../TestExampleGenBinding.cpp", 43409); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsGlobalObject(global)" ")"); do { *((volatile
int*)__null) = 43409; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
43410 JS::AssertObjectIsNotGray(global);
43411
43412 // That might have ended up wrapping us already, due to the wonders
43413 // of XBL. Check for that, and bail out as needed.
43414 aReflector.set(aCache->GetWrapper());
43415 if (aReflector) {
43416#ifdef DEBUG1
43417 AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
43418#endif // DEBUG
43419 return true;
43420 }
43421
43422 JSAutoRealm ar(aCx, global);
43423 JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
43424 if (!canonicalProto) {
43425 return false;
43426 }
43427 JS::Rooted<JSObject*> proto(aCx);
43428 if (aGivenProto) {
43429 proto = aGivenProto;
43430 // Unfortunately, while aGivenProto was in the compartment of aCx
43431 // coming in, we changed compartments to that of "parent" so may need
43432 // to wrap the proto here.
43433 if (js::GetContextCompartment(aCx) != JS::GetCompartment(proto)) {
43434 if (!JS_WrapObject(aCx, &proto)) {
43435 return false;
43436 }
43437 }
43438 } else {
43439 proto = canonicalProto;
43440 }
43441
43442 BindingJSObjectCreator<mozilla::dom::TestExampleThrowingConstructorInterface> creator(aCx);
43443 creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
43444 if (!aReflector) {
43445 return false;
43446 }
43447
43448 aCache->SetWrapper(aReflector);
43449 creator.InitializationSucceeded();
43450
43451 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"
, "../TestExampleGenBinding.cpp", 43452); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 43452; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
43452 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"
, "../TestExampleGenBinding.cpp", 43452); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 43452; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
43453 // If proto != canonicalProto, we have to preserve our wrapper;
43454 // otherwise we won't be able to properly recreate it later, since
43455 // we won't know what proto to use. Note that we don't check
43456 // aGivenProto here, since it's entirely possible (and even
43457 // somewhat common) to have a non-null aGivenProto which is the
43458 // same as canonicalProto.
43459 if (proto != canonicalProto) {
43460 PreserveWrapper(aObject);
43461 }
43462
43463 return true;
43464}
43465
43466void
43467CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
43468{
43469 JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::TestExampleThrowingConstructorInterface);
43470 JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::TestExampleThrowingConstructorInterface);
43471
43472 JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
43473 if (!parentProto) {
43474 return;
43475 }
43476
43477 JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
43478 if (!constructorProto) {
43479 return;
43480 }
43481
43482 dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
43483 &sPrototypeClass, protoCache,
43484 constructorProto, &sInterfaceObjectInfo, 0, false, Span<const LegacyFactoryFunction, 0>{},
43485 interfaceCache,
43486 nullptr,
43487 nullptr,
43488 "TestExampleThrowingConstructorInterface", aDefineOnGlobal,
43489 nullptr,
43490 false,
43491 nullptr);
43492}
43493
43494JSObject*
43495GetConstructorObject(JSContext* aCx)
43496{
43497 return GetConstructorObjectHandle(aCx);
43498}
43499
43500} // namespace TestExampleThrowingConstructorInterface_Binding
43501
43502
43503
43504namespace TestExampleWorkerInterface_Binding {
43505
43506MOZ_CAN_RUN_SCRIPT static bool
43507needsSubjectPrincipalMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
43508{
43509 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43512( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalMethod", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43510 "TestExampleWorkerInterface", "needsSubjectPrincipalMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43512( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalMethod", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43511 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject43512( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalMethod", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43512 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43512( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalMethod", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
43513
43514 auto* self = static_cast<mozilla::dom::TestExampleWorkerInterface*>(void_self);
43515 NonNull<nsIPrincipal> subjectPrincipal;
43516 {
43517 JS::Realm* realm = js::GetContextRealm(cx);
43518 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 43518); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 43518; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
43519 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
43520 nsIPrincipal* principal = nsJSPrincipals::get(principals);
43521
43522 subjectPrincipal = principal;
43523 }
43524 // NOTE: This assert does NOT call the function.
43525 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NeedsSubjectPrincipalMethod(MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal))))>, "Should be returning void here");
43526 MOZ_KnownLive(self)(self)->NeedsSubjectPrincipalMethod(MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal)));
43527 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43527); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43527; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43528 args.rval().setUndefined();
43529 return true;
43530}
43531
43532static const JSJitInfo needsSubjectPrincipalMethod_methodinfo = {
43533 { (JSJitGetterOp)needsSubjectPrincipalMethod },
43534 { prototypes::id::TestExampleWorkerInterface },
43535 { PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth },
43536 JSJitInfo::Method,
43537 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43538 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
43539 true, /* isInfallible. False in setters. */
43540 false, /* isMovable. Not relevant for setters. */
43541 false, /* isEliminatable. Not relevant for setters. */
43542 false, /* isAlwaysInSlot. Only relevant for getters. */
43543 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43544 false, /* isTypedMethod. Only relevant for methods. */
43545 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43546};
43547
43548MOZ_CAN_RUN_SCRIPT static bool
43549get_needsSubjectPrincipalAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
43550{
43551 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43554( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43552 "TestExampleWorkerInterface", "needsSubjectPrincipalAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43554( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43553 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject43554( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43554 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43554( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
43555
43556 auto* self = static_cast<mozilla::dom::TestExampleWorkerInterface*>(void_self);
43557 NonNull<nsIPrincipal> subjectPrincipal;
43558 {
43559 JS::Realm* realm = js::GetContextRealm(cx);
43560 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 43560); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 43560; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
43561 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
43562 nsIPrincipal* principal = nsJSPrincipals::get(principals);
43563
43564 subjectPrincipal = principal;
43565 }
43566 bool result(MOZ_KnownLive(self)(self)->NeedsSubjectPrincipalAttr(MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal))));
43567 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43567); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43567; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43568 args.rval().setBoolean(result);
43569 return true;
43570}
43571
43572MOZ_CAN_RUN_SCRIPT static bool
43573set_needsSubjectPrincipalAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
43574{
43575 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43578( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43576 "TestExampleWorkerInterface", "needsSubjectPrincipalAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43578( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43577 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject43578( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43578 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43578( cx, "TestExampleWorkerInterface"
, "needsSubjectPrincipalAttr", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
43579
43580 auto* self = static_cast<mozilla::dom::TestExampleWorkerInterface*>(void_self);
43581 bool arg0;
43582 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
43583 return false;
43584 }
43585 NonNull<nsIPrincipal> subjectPrincipal;
43586 {
43587 JS::Realm* realm = js::GetContextRealm(cx);
43588 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 43588); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 43588; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
43589 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
43590 nsIPrincipal* principal = nsJSPrincipals::get(principals);
43591
43592 subjectPrincipal = principal;
43593 }
43594 // NOTE: This assert does NOT call the function.
43595 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNeedsSubjectPrincipalAttr(arg0, MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal))))>, "Should be returning void here");
43596 MOZ_KnownLive(self)(self)->SetNeedsSubjectPrincipalAttr(arg0, MOZ_KnownLive(NonNullHelper(subjectPrincipal))(NonNullHelper(subjectPrincipal)));
43597 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43597); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43597; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43598
43599 return true;
43600}
43601
43602static const JSJitInfo needsSubjectPrincipalAttr_getterinfo = {
43603 { get_needsSubjectPrincipalAttr },
43604 { prototypes::id::TestExampleWorkerInterface },
43605 { PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth },
43606 JSJitInfo::Getter,
43607 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43608 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
43609 true, /* isInfallible. False in setters. */
43610 false, /* isMovable. Not relevant for setters. */
43611 false, /* isEliminatable. Not relevant for setters. */
43612 false, /* isAlwaysInSlot. Only relevant for getters. */
43613 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43614 false, /* isTypedMethod. Only relevant for methods. */
43615 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43616};
43617static const JSJitInfo needsSubjectPrincipalAttr_setterinfo = {
43618 { (JSJitGetterOp)set_needsSubjectPrincipalAttr },
43619 { prototypes::id::TestExampleWorkerInterface },
43620 { PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth },
43621 JSJitInfo::Setter,
43622 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43623 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
43624 false, /* isInfallible. False in setters. */
43625 false, /* isMovable. Not relevant for setters. */
43626 false, /* isEliminatable. Not relevant for setters. */
43627 false, /* isAlwaysInSlot. Only relevant for getters. */
43628 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43629 false, /* isTypedMethod. Only relevant for methods. */
43630 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43631};
43632
43633MOZ_CAN_RUN_SCRIPT static bool
43634needsCallerTypeMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
43635{
43636 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43639( cx, "TestExampleWorkerInterface"
, "needsCallerTypeMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
43637 "TestExampleWorkerInterface", "needsCallerTypeMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43639( cx, "TestExampleWorkerInterface"
, "needsCallerTypeMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
43638 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject43639( cx, "TestExampleWorkerInterface"
, "needsCallerTypeMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
43639 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43639( cx, "TestExampleWorkerInterface"
, "needsCallerTypeMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
43640
43641 auto* self = static_cast<mozilla::dom::TestExampleWorkerInterface*>(void_self);
43642 // NOTE: This assert does NOT call the function.
43643 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NeedsCallerTypeMethod(nsContentUtils::ThreadsafeIsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem))>, "Should be returning void here");
43644 MOZ_KnownLive(self)(self)->NeedsCallerTypeMethod(nsContentUtils::ThreadsafeIsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem);
43645 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43645); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43645; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43646 args.rval().setUndefined();
43647 return true;
43648}
43649
43650static const JSJitInfo needsCallerTypeMethod_methodinfo = {
43651 { (JSJitGetterOp)needsCallerTypeMethod },
43652 { prototypes::id::TestExampleWorkerInterface },
43653 { PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth },
43654 JSJitInfo::Method,
43655 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43656 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
43657 true, /* isInfallible. False in setters. */
43658 false, /* isMovable. Not relevant for setters. */
43659 false, /* isEliminatable. Not relevant for setters. */
43660 false, /* isAlwaysInSlot. Only relevant for getters. */
43661 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43662 false, /* isTypedMethod. Only relevant for methods. */
43663 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43664};
43665
43666MOZ_CAN_RUN_SCRIPT static bool
43667get_needsCallerTypeAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
43668{
43669 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43672( cx, "TestExampleWorkerInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
43670 "TestExampleWorkerInterface", "needsCallerTypeAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43672( cx, "TestExampleWorkerInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
43671 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject43672( cx, "TestExampleWorkerInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
43672 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43672( cx, "TestExampleWorkerInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
43673
43674 auto* self = static_cast<mozilla::dom::TestExampleWorkerInterface*>(void_self);
43675 bool result(MOZ_KnownLive(self)(self)->NeedsCallerTypeAttr(nsContentUtils::ThreadsafeIsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem));
43676 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43676); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43676; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43677 args.rval().setBoolean(result);
43678 return true;
43679}
43680
43681MOZ_CAN_RUN_SCRIPT static bool
43682set_needsCallerTypeAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
43683{
43684 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43687( cx, "TestExampleWorkerInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
43685 "TestExampleWorkerInterface", "needsCallerTypeAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43687( cx, "TestExampleWorkerInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
43686 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject43687( cx, "TestExampleWorkerInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
43687 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43687( cx, "TestExampleWorkerInterface"
, "needsCallerTypeAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
43688
43689 auto* self = static_cast<mozilla::dom::TestExampleWorkerInterface*>(void_self);
43690 bool arg0;
43691 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
43692 return false;
43693 }
43694 // NOTE: This assert does NOT call the function.
43695 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNeedsCallerTypeAttr(arg0, nsContentUtils::ThreadsafeIsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem))>, "Should be returning void here");
43696 MOZ_KnownLive(self)(self)->SetNeedsCallerTypeAttr(arg0, nsContentUtils::ThreadsafeIsSystemCaller(cx) ? CallerType::System : CallerType::NonSystem);
43697 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43697); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43697; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43698
43699 return true;
43700}
43701
43702static const JSJitInfo needsCallerTypeAttr_getterinfo = {
43703 { get_needsCallerTypeAttr },
43704 { prototypes::id::TestExampleWorkerInterface },
43705 { PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth },
43706 JSJitInfo::Getter,
43707 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43708 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
43709 true, /* isInfallible. False in setters. */
43710 false, /* isMovable. Not relevant for setters. */
43711 false, /* isEliminatable. Not relevant for setters. */
43712 false, /* isAlwaysInSlot. Only relevant for getters. */
43713 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43714 false, /* isTypedMethod. Only relevant for methods. */
43715 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43716};
43717static const JSJitInfo needsCallerTypeAttr_setterinfo = {
43718 { (JSJitGetterOp)set_needsCallerTypeAttr },
43719 { prototypes::id::TestExampleWorkerInterface },
43720 { PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth },
43721 JSJitInfo::Setter,
43722 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43723 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
43724 false, /* isInfallible. False in setters. */
43725 false, /* isMovable. Not relevant for setters. */
43726 false, /* isEliminatable. Not relevant for setters. */
43727 false, /* isAlwaysInSlot. Only relevant for getters. */
43728 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43729 false, /* isTypedMethod. Only relevant for methods. */
43730 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43731};
43732
43733MOZ_CAN_RUN_SCRIPT static bool
43734needsNonSystemSubjectPrincipalMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
43735{
43736 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43739( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalMethod", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43737 "TestExampleWorkerInterface", "needsNonSystemSubjectPrincipalMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43739( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalMethod", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43738 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject43739( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalMethod", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43739 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43739( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalMethod", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
43740
43741 auto* self = static_cast<mozilla::dom::TestExampleWorkerInterface*>(void_self);
43742 nsIPrincipal* subjectPrincipal;
43743 {
43744 JS::Realm* realm = js::GetContextRealm(cx);
43745 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 43745); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 43745; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
43746 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
43747 nsIPrincipal* principal = nsJSPrincipals::get(principals);
43748 if (principal->IsSystemPrincipal()) {
43749 principal = nullptr;
43750 }
43751
43752 subjectPrincipal = principal;
43753 }
43754 // NOTE: This assert does NOT call the function.
43755 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NeedsNonSystemSubjectPrincipalMethod(MOZ_KnownLive(subjectPrincipal)(subjectPrincipal)))>, "Should be returning void here");
43756 MOZ_KnownLive(self)(self)->NeedsNonSystemSubjectPrincipalMethod(MOZ_KnownLive(subjectPrincipal)(subjectPrincipal));
43757 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43757); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43757; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43758 args.rval().setUndefined();
43759 return true;
43760}
43761
43762static const JSJitInfo needsNonSystemSubjectPrincipalMethod_methodinfo = {
43763 { (JSJitGetterOp)needsNonSystemSubjectPrincipalMethod },
43764 { prototypes::id::TestExampleWorkerInterface },
43765 { PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth },
43766 JSJitInfo::Method,
43767 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43768 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
43769 true, /* isInfallible. False in setters. */
43770 false, /* isMovable. Not relevant for setters. */
43771 false, /* isEliminatable. Not relevant for setters. */
43772 false, /* isAlwaysInSlot. Only relevant for getters. */
43773 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43774 false, /* isTypedMethod. Only relevant for methods. */
43775 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43776};
43777
43778MOZ_CAN_RUN_SCRIPT static bool
43779get_needsNonSystemSubjectPrincipalAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
43780{
43781 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43784( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43782 "TestExampleWorkerInterface", "needsNonSystemSubjectPrincipalAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43784( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43783 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject43784( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43784 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43784( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
43785
43786 auto* self = static_cast<mozilla::dom::TestExampleWorkerInterface*>(void_self);
43787 nsIPrincipal* subjectPrincipal;
43788 {
43789 JS::Realm* realm = js::GetContextRealm(cx);
43790 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 43790); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 43790; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
43791 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
43792 nsIPrincipal* principal = nsJSPrincipals::get(principals);
43793 if (principal->IsSystemPrincipal()) {
43794 principal = nullptr;
43795 }
43796
43797 subjectPrincipal = principal;
43798 }
43799 bool result(MOZ_KnownLive(self)(self)->NeedsNonSystemSubjectPrincipalAttr(MOZ_KnownLive(subjectPrincipal)(subjectPrincipal)));
43800 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43800); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43800; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43801 args.rval().setBoolean(result);
43802 return true;
43803}
43804
43805MOZ_CAN_RUN_SCRIPT static bool
43806set_needsNonSystemSubjectPrincipalAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
43807{
43808 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43811( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43809 "TestExampleWorkerInterface", "needsNonSystemSubjectPrincipalAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43811( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43810 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject43811( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43811 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43811( cx, "TestExampleWorkerInterface"
, "needsNonSystemSubjectPrincipalAttr", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
43812
43813 auto* self = static_cast<mozilla::dom::TestExampleWorkerInterface*>(void_self);
43814 bool arg0;
43815 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
43816 return false;
43817 }
43818 nsIPrincipal* subjectPrincipal;
43819 {
43820 JS::Realm* realm = js::GetContextRealm(cx);
43821 MOZ_ASSERT(realm)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(realm)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(realm))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("realm", "../TestExampleGenBinding.cpp"
, 43821); AnnotateMozCrashReason("MOZ_ASSERT" "(" "realm" ")"
); do { *((volatile int*)__null) = 43821; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
43822 JSPrincipals* principals = JS::GetRealmPrincipals(realm);
43823 nsIPrincipal* principal = nsJSPrincipals::get(principals);
43824 if (principal->IsSystemPrincipal()) {
43825 principal = nullptr;
43826 }
43827
43828 subjectPrincipal = principal;
43829 }
43830 // NOTE: This assert does NOT call the function.
43831 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNeedsNonSystemSubjectPrincipalAttr(arg0, MOZ_KnownLive(subjectPrincipal)(subjectPrincipal)))>, "Should be returning void here");
43832 MOZ_KnownLive(self)(self)->SetNeedsNonSystemSubjectPrincipalAttr(arg0, MOZ_KnownLive(subjectPrincipal)(subjectPrincipal));
43833 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestExampleGenBinding.cpp", 43833); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43833; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43834
43835 return true;
43836}
43837
43838static const JSJitInfo needsNonSystemSubjectPrincipalAttr_getterinfo = {
43839 { get_needsNonSystemSubjectPrincipalAttr },
43840 { prototypes::id::TestExampleWorkerInterface },
43841 { PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth },
43842 JSJitInfo::Getter,
43843 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43844 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
43845 true, /* isInfallible. False in setters. */
43846 false, /* isMovable. Not relevant for setters. */
43847 false, /* isEliminatable. Not relevant for setters. */
43848 false, /* isAlwaysInSlot. Only relevant for getters. */
43849 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43850 false, /* isTypedMethod. Only relevant for methods. */
43851 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43852};
43853static const JSJitInfo needsNonSystemSubjectPrincipalAttr_setterinfo = {
43854 { (JSJitGetterOp)set_needsNonSystemSubjectPrincipalAttr },
43855 { prototypes::id::TestExampleWorkerInterface },
43856 { PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth },
43857 JSJitInfo::Setter,
43858 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43859 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
43860 false, /* isInfallible. False in setters. */
43861 false, /* isMovable. Not relevant for setters. */
43862 false, /* isEliminatable. Not relevant for setters. */
43863 false, /* isAlwaysInSlot. Only relevant for getters. */
43864 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43865 false, /* isTypedMethod. Only relevant for methods. */
43866 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43867};
43868
43869static bool
43870_addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
43871{
43872 mozilla::dom::TestExampleWorkerInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleWorkerInterface>(obj);
43873 // We don't want to preserve if we don't have a wrapper, and we
43874 // obviously can't preserve if we're not initialized.
43875 if (self && self->GetWrapperPreserveColor()) {
43876 PreserveWrapper(self);
43877 }
43878 return true;
43879}
43880
43881static void
43882_finalize(JS::GCContext* gcx, JSObject* obj)
43883{
43884 mozilla::dom::TestExampleWorkerInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleWorkerInterface>(obj);
43885 if (self) {
43886 JS::SetReservedSlot(obj, DOM_OBJECT_SLOT0, JS::UndefinedValue());
43887 ClearWrapper(self, self, obj);
43888 if (size_t mallocBytes = BindingJSObjectMallocBytes(self)) {
43889 JS::RemoveAssociatedMemory(obj, mallocBytes,
43890 JS::MemoryUse::DOMBinding);
43891 }
43892 AddForDeferredFinalization<mozilla::dom::TestExampleWorkerInterface>(self);
43893 }
43894}
43895
43896static nsWrapperCache*
43897_getWrapperCache(JS::Handle<JSObject*> obj)
43898{
43899 mozilla::dom::TestExampleWorkerInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleWorkerInterface>(obj);
43900 return self;
43901}
43902
43903static size_t
43904_objectMoved(JSObject* obj, JSObject* old)
43905{
43906 mozilla::dom::TestExampleWorkerInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestExampleWorkerInterface>(obj);
43907 if (self) {
43908 UpdateWrapper(self, self, obj, old);
43909 }
43910
43911 return 0;
43912}
43913
43914static const JSFunctionSpec sMethods_specs[] = {
43915 JS_FNSPEC("needsSubjectPrincipalMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&needsSubjectPrincipalMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("needsSubjectPrincipalMethod"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&needsSubjectPrincipalMethod_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43916 JS_FNSPEC("needsCallerTypeMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&needsCallerTypeMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("needsCallerTypeMethod"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&needsCallerTypeMethod_methodinfo)},
0, JSPROP_ENUMERATE, nullptr}
,
43917 JS_FNSPEC("needsNonSystemSubjectPrincipalMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&needsNonSystemSubjectPrincipalMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("needsNonSystemSubjectPrincipalMethod")
, {(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&needsNonSystemSubjectPrincipalMethod_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43918 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
43919};
43920
43921
43922static const Prefable<const JSFunctionSpec> sMethods[] = {
43923 { nullptr, &sMethods_specs[0] },
43924 { nullptr, nullptr }
43925};
43926
43927static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
43928 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
43929static_assert(3 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
43930 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
43931
43932static const JSPropertySpec sAttributes_specs[] = {
43933 JSPropertySpec::nativeAccessors("needsSubjectPrincipalAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &needsSubjectPrincipalAttr_getterinfo, GenericSetter<NormalThisPolicy>, &needsSubjectPrincipalAttr_setterinfo),
43934 JSPropertySpec::nativeAccessors("needsCallerTypeAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &needsCallerTypeAttr_getterinfo, GenericSetter<NormalThisPolicy>, &needsCallerTypeAttr_setterinfo),
43935 JSPropertySpec::nativeAccessors("needsNonSystemSubjectPrincipalAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &needsNonSystemSubjectPrincipalAttr_getterinfo, GenericSetter<NormalThisPolicy>, &needsNonSystemSubjectPrincipalAttr_setterinfo),
43936 JS_PS_ENDJSPropertySpec::sentinel()
43937};
43938
43939
43940static const Prefable<const JSPropertySpec> sAttributes[] = {
43941 { nullptr, &sAttributes_specs[0] },
43942 { nullptr, nullptr }
43943};
43944
43945static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
43946 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
43947static_assert(3 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
43948 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
43949
43950
43951static uint16_t sNativeProperties_sortedPropertyIndices[6];
43952static PropertyInfo sNativeProperties_propertyInfos[6];
43953
43954static const NativePropertiesN<2> sNativeProperties = {
43955 false, 0,
43956 false, 0,
43957 true, 0 /* sMethods */,
43958 true, 1 /* sAttributes */,
43959 false, 0,
43960 false, 0,
43961 false, 0,
43962 -1,
43963 6,
43964 sNativeProperties_sortedPropertyIndices,
43965 {
43966 { sMethods, &sNativeProperties_propertyInfos[0] },
43967 { sAttributes, &sNativeProperties_propertyInfos[3] }
43968 }
43969};
43970static_assert(6 < 1ull << (CHAR_BIT8 * sizeof(sNativeProperties.propertyInfoCount)),
43971 "We have a property info count that is oversized");
43972
43973bool sNativePropertiesInited = false;
43974const NativePropertyHooks sNativePropertyHooks = {
43975 nullptr,
43976 { sNativeProperties.Upcast(), nullptr, &sNativePropertiesInited },
43977 prototypes::id::TestExampleWorkerInterface,
43978 constructors::id::TestExampleWorkerInterface,
43979 &DefaultXrayExpandoObjectClass
43980};
43981
43982static const DOMInterfaceInfo sInterfaceObjectInfo = {
43983 { ThrowingConstructor, &sNativePropertyHooks },
43984 JS::GetRealmFunctionPrototype,
43985 prototypes::id::TestExampleWorkerInterface,
43986 PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth,
43987 true,
43988};
43989
43990static const DOMIfaceAndProtoJSClass sPrototypeClass = {
43991 {
43992 "TestExampleWorkerInterfacePrototype",
43993 JSCLASS_IS_DOMIFACEANDPROTOJSCLASSJSCLASS_USERBIT2 | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE0),
43994 JS_NULL_CLASS_OPS,
43995 JS_NULL_CLASS_SPEC,
43996 JS_NULL_CLASS_EXT,
43997 JS_NULL_OBJECT_OPS
43998 },
43999 eInterfacePrototype,
44000 prototypes::id::TestExampleWorkerInterface,
44001 PrototypeTraits<prototypes::id::TestExampleWorkerInterface>::Depth,
44002 &sNativePropertyHooks,
44003 JS::GetRealmObjectPrototype
44004};
44005
44006static const JSClassOps sClassOps = {
44007 _addProperty, /* addProperty */
44008 nullptr, /* delProperty */
44009 nullptr, /* enumerate */
44010 nullptr, /* newEnumerate */
44011 nullptr, /* resolve */
44012 nullptr, /* mayResolve */
44013 _finalize, /* finalize */
44014 nullptr, /* call */
44015 nullptr, /* construct */
44016 nullptr, /* trace */
44017};
44018
44019static const js::ClassExtension sClassExtension = {
44020 _objectMoved /* objectMovedOp */
44021};
44022
44023static const DOMJSClass sClass = {
44024 { "TestExampleWorkerInterface",
44025 JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
44026 &sClassOps,
44027 JS_NULL_CLASS_SPEC,
44028 &sClassExtension,
44029 JS_NULL_OBJECT_OPS
44030 },
44031 { prototypes::id::TestExampleWorkerInterface, 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 },
44032 std::is_base_of_v<nsISupports, mozilla::dom::TestExampleWorkerInterface>,
44033 &sNativePropertyHooks,
44034 FindAssociatedGlobalForNative<mozilla::dom::TestExampleWorkerInterface>::Get,
44035 GetProtoObjectHandle,
44036 GetCCParticipant<mozilla::dom::TestExampleWorkerInterface>::Get(),
44037 nullptr,
44038 _getWrapperCache
44039};
44040static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS1,
44041 "Must have the right minimal number of reserved slots.");
44042static_assert(1 >= 1,
44043 "Must have enough reserved slots.");
44044
44045bool
44046Wrap(JSContext* aCx, mozilla::dom::TestExampleWorkerInterface* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
44047{
44048 static_assert(!std::is_base_of_v<NonRefcountedDOMObject, mozilla::dom::TestExampleWorkerInterface>,
44049 "Shouldn't have wrappercached things that are not refcounted.");
44050 static_assert(std::is_same_v<decltype(aObject), mozilla::dom::TestExampleWorkerInterface*>);
44051 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)", "../TestExampleGenBinding.cpp"
, 44051); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsCorrect(aObject)"
")"); do { *((volatile int*)__null) = 44051; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
44052 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)", "../TestExampleGenBinding.cpp"
, 44052); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(aGivenProto, aCx)"
")"); do { *((volatile int*)__null) = 44052; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
44053 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" ")", "../TestExampleGenBinding.cpp"
, 44055); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 44055; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
44054 "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" ")", "../TestExampleGenBinding.cpp"
, 44055); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 44055; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
44055 "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" ")", "../TestExampleGenBinding.cpp"
, 44055); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 44055; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
44056
44057 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" ")", "../TestExampleGenBinding.cpp"
, 44058); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 44058; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
44058 "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" ")", "../TestExampleGenBinding.cpp"
, 44058); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 44058; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
44059
44060 // If the wrapper cache contains a dead reflector then finalize that
44061 // now, ensuring that the finalizer for the old reflector always
44062 // runs before the new reflector is created and attached. This
44063 // avoids the awkward situation where there are multiple reflector
44064 // objects that contain pointers to the same native.
44065
44066 if (JSObject* oldReflector = aCache->GetWrapperMaybeDead()) {
44067 _finalize(nullptr /* unused */, oldReflector);
44068 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()", "../TestExampleGenBinding.cpp"
, 44068); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapperMaybeDead()"
")"); do { *((volatile int*)__null) = 44068; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
44069 }
44070
44071 JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
44072 if (!global) {
44073 return false;
44074 }
44075 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)"
, "../TestExampleGenBinding.cpp", 44075); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsGlobalObject(global)" ")"); do { *((volatile
int*)__null) = 44075; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
44076 JS::AssertObjectIsNotGray(global);
44077
44078 // That might have ended up wrapping us already, due to the wonders
44079 // of XBL. Check for that, and bail out as needed.
44080 aReflector.set(aCache->GetWrapper());
44081 if (aReflector) {
44082#ifdef DEBUG1
44083 AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
44084#endif // DEBUG
44085 return true;
44086 }
44087
44088 JSAutoRealm ar(aCx, global);
44089 JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
44090 if (!canonicalProto) {
44091 return false;
44092 }
44093 JS::Rooted<JSObject*> proto(aCx);
44094 if (aGivenProto) {
44095 proto = aGivenProto;
44096 // Unfortunately, while aGivenProto was in the compartment of aCx
44097 // coming in, we changed compartments to that of "parent" so may need
44098 // to wrap the proto here.
44099 if (js::GetContextCompartment(aCx) != JS::GetCompartment(proto)) {
44100 if (!JS_WrapObject(aCx, &proto)) {
44101 return false;
44102 }
44103 }
44104 } else {
44105 proto = canonicalProto;
44106 }
44107
44108 BindingJSObjectCreator<mozilla::dom::TestExampleWorkerInterface> creator(aCx);
44109 creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
44110 if (!aReflector) {
44111 return false;
44112 }
44113
44114 aCache->SetWrapper(aReflector);
44115 creator.InitializationSucceeded();
44116
44117 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"
, "../TestExampleGenBinding.cpp", 44118); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 44118; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
44118 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"
, "../TestExampleGenBinding.cpp", 44118); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 44118; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
44119 // If proto != canonicalProto, we have to preserve our wrapper;
44120 // otherwise we won't be able to properly recreate it later, since
44121 // we won't know what proto to use. Note that we don't check
44122 // aGivenProto here, since it's entirely possible (and even
44123 // somewhat common) to have a non-null aGivenProto which is the
44124 // same as canonicalProto.
44125 if (proto != canonicalProto) {
44126 PreserveWrapper(aObject);
44127 }
44128
44129 return true;
44130}
44131
44132void
44133CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
44134{
44135 JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::TestExampleWorkerInterface);
44136 JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::TestExampleWorkerInterface);
44137
44138 JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
44139 if (!parentProto) {
44140 return;
44141 }
44142
44143 JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
44144 if (!constructorProto) {
44145 return;
44146 }
44147
44148 dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
44149 &sPrototypeClass, protoCache,
44150 constructorProto, &sInterfaceObjectInfo, 0, false, Span<const LegacyFactoryFunction, 0>{},
44151 interfaceCache,
44152 sNativeProperties.Upcast(),
44153 nullptr,
44154 "TestExampleWorkerInterface", aDefineOnGlobal,
44155 nullptr,
44156 false,
44157 nullptr);
44158}
44159
44160JSObject*
44161GetConstructorObject(JSContext* aCx)
44162{
44163 return GetConstructorObjectHandle(aCx);
44164}
44165
44166} // namespace TestExampleWorkerInterface_Binding
44167
44168
44169
44170} // namespace mozilla::dom

/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.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 * A header for declaring various things that binding implementation headers
9 * might need. The idea is to make binding implementation headers safe to
10 * include anywhere without running into include hell like we do with
11 * BindingUtils.h
12 */
13#ifndef mozilla_dom_BindingDeclarations_h__
14#define mozilla_dom_BindingDeclarations_h__
15
16#include "js/RootingAPI.h"
17#include "js/TypeDecls.h"
18
19#include "mozilla/Maybe.h"
20
21#include "mozilla/dom/DOMString.h"
22
23#include "nsCOMPtr.h"
24#include "nsString.h"
25#include "nsTArray.h"
26
27#include <type_traits>
28
29#include "js/Value.h"
30#include "mozilla/RootedOwningNonNull.h"
31#include "mozilla/RootedRefPtr.h"
32
33class nsIPrincipal;
34class nsWrapperCache;
35
36namespace mozilla {
37
38class ErrorResult;
39class OOMReporter;
40class CopyableErrorResult;
41
42namespace dom {
43
44class BindingCallContext;
45
46// Struct that serves as a base class for all dictionaries. Particularly useful
47// so we can use std::is_base_of to detect dictionary template arguments.
48struct DictionaryBase {
49 protected:
50 bool ParseJSON(JSContext* aCx, const nsAString& aJSON,
51 JS::MutableHandle<JS::Value> aVal);
52
53 bool StringifyToJSON(JSContext* aCx, JS::Handle<JSObject*> aObj,
54 nsAString& aJSON) const;
55
56 // Struct used as a way to force a dictionary constructor to not init the
57 // dictionary (via constructing from a pointer to this class). We're putting
58 // it here so that all the dictionaries will have access to it, but outside
59 // code will not.
60 struct FastDictionaryInitializer {};
61
62 bool mIsAnyMemberPresent = false;
63
64 private:
65 // aString is expected to actually be an nsAString*. Should only be
66 // called from StringifyToJSON.
67 static bool AppendJSONToString(const char16_t* aJSONData,
68 uint32_t aDataLength, void* aString);
69
70 public:
71 bool IsAnyMemberPresent() const { return mIsAnyMemberPresent; }
72};
73
74template <class T>
75constexpr bool is_dom_dictionary = std::is_base_of_v<DictionaryBase, T>;
76
77template <typename T>
78inline std::enable_if_t<is_dom_dictionary<T>, void> ImplCycleCollectionUnlink(
79 T& aDictionary) {
80 aDictionary.UnlinkForCC();
81}
82
83template <typename T>
84inline std::enable_if_t<is_dom_dictionary<T>, void> ImplCycleCollectionTraverse(
85 nsCycleCollectionTraversalCallback& aCallback, T& aDictionary,
86 const char* aName, uint32_t aFlags = 0) {
87 aDictionary.TraverseForCC(aCallback, aFlags);
88}
89
90template <typename T>
91inline std::enable_if_t<is_dom_dictionary<T>, void> ImplCycleCollectionUnlink(
92 UniquePtr<T>& aDictionary) {
93 aDictionary.reset();
94}
95
96template <typename T>
97inline std::enable_if_t<is_dom_dictionary<T>, void> ImplCycleCollectionTraverse(
98 nsCycleCollectionTraversalCallback& aCallback, UniquePtr<T>& aDictionary,
99 const char* aName, uint32_t aFlags = 0) {
100 if (aDictionary) {
101 ImplCycleCollectionTraverse(aCallback, *aDictionary, aName, aFlags);
102 }
103}
104// Struct that serves as a base class for all typed arrays and array buffers and
105// array buffer views. Particularly useful so we can use std::is_base_of to
106// detect typed array/buffer/view template arguments.
107struct AllTypedArraysBase {};
108
109template <class T>
110constexpr bool is_dom_typed_array = std::is_base_of_v<AllTypedArraysBase, T>;
111
112// Struct that serves as a base class for all unions.
113// Particularly useful so we can use std::is_base_of to detect union
114// template arguments.
115struct AllUnionBase {};
116
117template <class T>
118constexpr bool is_dom_union = std::is_base_of_v<AllUnionBase, T>;
119
120// Struct that serves as a base class for all owning unions.
121// Particularly useful so we can use std::is_base_of to detect owning union
122// template arguments.
123struct AllOwningUnionBase : public AllUnionBase {};
124
125template <class T>
126constexpr bool is_dom_owning_union = std::is_base_of_v<AllOwningUnionBase, T>;
127
128struct UnionWithTypedArraysBase {};
129
130template <class T>
131constexpr bool is_dom_union_with_typedarray_members =
132 std::is_base_of_v<UnionWithTypedArraysBase, T>;
133
134enum class CallerType : uint32_t;
135
136class MOZ_STACK_CLASS GlobalObject {
137 public:
138 GlobalObject(JSContext* aCx, JSObject* aObject);
139
140 JSObject* Get() const { return mGlobalJSObject; }
141
142 nsISupports* GetAsSupports() const;
143
144 // The context that this returns is not guaranteed to be in the compartment of
145 // the object returned from Get(), in fact it's generally in the caller's
146 // compartment.
147 JSContext* Context() const { return mCx; }
148
149 bool Failed() const { return !Get(); }
150
151 // It returns the subjectPrincipal if called on the main-thread, otherwise
152 // a nullptr is returned.
153 nsIPrincipal* GetSubjectPrincipal() const;
154
155 // Get the caller type. Note that this needs to be called before anyone has
156 // had a chance to mess with the JSContext.
157 dom::CallerType CallerType() const;
158
159 protected:
160 JS::Rooted<JSObject*> mGlobalJSObject;
161 JSContext* mCx;
162 mutable nsISupports* MOZ_UNSAFE_REF(
163 "Valid because GlobalObject is a stack "
164 "class, and mGlobalObject points to the "
165 "global, so it won't be destroyed as long "
166 "as GlobalObject lives on the stack") mGlobalObject;
167};
168
169// Class for representing optional arguments.
170template <typename T, typename InternalType>
171class Optional_base {
172 public:
173 Optional_base() = default;
4
Calling defaulted default constructor for 'Maybe<JS::Rooted<JSObject *>>'
15
Returning from default constructor for 'Maybe<JS::Rooted<JSObject *>>'
16
Returning without writing to 'this->mImpl.mStorage.val.stack'
174
175 Optional_base(Optional_base&&) = default;
176 Optional_base& operator=(Optional_base&&) = default;
177
178 explicit Optional_base(const T& aValue) { mImpl.emplace(aValue); }
179 explicit Optional_base(T&& aValue) { mImpl.emplace(std::move(aValue)); }
180
181 bool operator==(const Optional_base<T, InternalType>& aOther) const {
182 return mImpl == aOther.mImpl;
183 }
184
185 bool operator!=(const Optional_base<T, InternalType>& aOther) const {
186 return mImpl != aOther.mImpl;
187 }
188
189 template <typename T1, typename T2>
190 explicit Optional_base(const T1& aValue1, const T2& aValue2) {
191 mImpl.emplace(aValue1, aValue2);
192 }
193
194 bool WasPassed() const { return mImpl.isSome(); }
195
196 // Return InternalType here so we can work with it usefully.
197 template <typename... Args>
198 InternalType& Construct(Args&&... aArgs) {
199 mImpl.emplace(std::forward<Args>(aArgs)...);
200 return *mImpl;
201 }
202
203 void Reset() { mImpl.reset(); }
204
205 const T& Value() const { return *mImpl; }
206
207 // Return InternalType here so we can work with it usefully.
208 InternalType& Value() { return *mImpl; }
209
210 // And an explicit way to get the InternalType even if we're const.
211 const InternalType& InternalValue() const { return *mImpl; }
212
213 // If we ever decide to add conversion operators for optional arrays
214 // like the ones Nullable has, we'll need to ensure that Maybe<> has
215 // the boolean before the actual data.
216
217 private:
218 // Forbid copy-construction and assignment
219 Optional_base(const Optional_base& other) = delete;
220 const Optional_base& operator=(const Optional_base& other) = delete;
221
222 protected:
223 Maybe<InternalType> mImpl;
224};
225
226template <typename T>
227class Optional : public Optional_base<T, T> {
228 public:
229 MOZ_ALLOW_TEMPORARY Optional() : Optional_base<T, T>() {}
230
231 explicit Optional(const T& aValue) : Optional_base<T, T>(aValue) {}
232 Optional(Optional&&) = default;
233};
234
235template <typename T>
236class Optional<JS::Handle<T>>
237 : public Optional_base<JS::Handle<T>, JS::Rooted<T>> {
238 public:
239 MOZ_ALLOW_TEMPORARY Optional()
240 : Optional_base<JS::Handle<T>, JS::Rooted<T>>() {}
2
Null pointer value stored to 'arg0.mImpl.mStorage.val.stack'
3
Calling defaulted default constructor for 'Optional_base<JS::Handle<JSObject *>, JS::Rooted<JSObject *>>'
17
Returning from default constructor for 'Optional_base<JS::Handle<JSObject *>, JS::Rooted<JSObject *>>'
18
Returning without writing to 'this->mImpl.mStorage.val.stack'
241
242 explicit Optional(JSContext* cx)
243 : Optional_base<JS::Handle<T>, JS::Rooted<T>>() {
244 this->Construct(cx);
245 }
246
247 Optional(JSContext* cx, const T& aValue)
248 : Optional_base<JS::Handle<T>, JS::Rooted<T>>(cx, aValue) {}
249
250 // Override the const Value() to return the right thing so we're not
251 // returning references to temporaries.
252 JS::Handle<T> Value() const { return *this->mImpl; }
253
254 // And we have to override the non-const one too, since we're
255 // shadowing the one on the superclass.
256 JS::Rooted<T>& Value() { return *this->mImpl; }
257};
258
259// A specialization of Optional for JSObject* to make sure that when someone
260// calls Construct() on it we will pre-initialized the JSObject* to nullptr so
261// it can be traced safely.
262template <>
263class Optional<JSObject*> : public Optional_base<JSObject*, JSObject*> {
264 public:
265 Optional() = default;
266
267 explicit Optional(JSObject* aValue)
268 : Optional_base<JSObject*, JSObject*>(aValue) {}
269
270 // Don't allow us to have an uninitialized JSObject*
271 JSObject*& Construct() {
272 // The Android compiler sucks and thinks we're trying to construct
273 // a JSObject* from an int if we don't cast here. :(
274 return Optional_base<JSObject*, JSObject*>::Construct(
275 static_cast<JSObject*>(nullptr));
276 }
277
278 template <class T1>
279 JSObject*& Construct(const T1& t1) {
280 return Optional_base<JSObject*, JSObject*>::Construct(t1);
281 }
282};
283
284// A specialization of Optional for JS::Value to make sure no one ever uses it.
285template <>
286class Optional<JS::Value> {
287 private:
288 Optional() = delete;
289
290 explicit Optional(const JS::Value& aValue) = delete;
291};
292
293// A specialization of Optional for NonNull that lets us get a T& from Value()
294template <typename U>
295class NonNull;
296template <typename T>
297class Optional<NonNull<T>> : public Optional_base<T, NonNull<T>> {
298 public:
299 // We want our Value to actually return a non-const reference, even
300 // if we're const. At least for things that are normally pointer
301 // types...
302 T& Value() const { return *this->mImpl->get(); }
303
304 // And we have to override the non-const one too, since we're
305 // shadowing the one on the superclass.
306 NonNull<T>& Value() { return *this->mImpl; }
307};
308
309// A specialization of Optional for OwningNonNull that lets us get a
310// T& from Value()
311template <typename T>
312class Optional<OwningNonNull<T>> : public Optional_base<T, OwningNonNull<T>> {
313 public:
314 // We want our Value to actually return a non-const reference, even
315 // if we're const. At least for things that are normally pointer
316 // types...
317 T& Value() const { return *this->mImpl->get(); }
318
319 // And we have to override the non-const one too, since we're
320 // shadowing the one on the superclass.
321 OwningNonNull<T>& Value() { return *this->mImpl; }
322};
323
324// Specialization for strings.
325// XXXbz we can't pull in FakeString here, because it depends on internal
326// strings. So we just have to forward-declare it and reimplement its
327// ToAStringPtr.
328
329namespace binding_detail {
330template <typename CharT>
331struct FakeString;
332} // namespace binding_detail
333
334template <typename CharT>
335class Optional<nsTSubstring<CharT>> {
336 using AString = nsTSubstring<CharT>;
337
338 public:
339 Optional() : mStr(nullptr) {}
340
341 bool WasPassed() const { return !!mStr; }
342
343 void operator=(const AString* str) {
344 MOZ_ASSERT(str)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(str)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(str))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("str", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 344); AnnotateMozCrashReason("MOZ_ASSERT" "(" "str" ")"); do
{ *((volatile int*)__null) = 344; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
345 mStr = str;
346 }
347
348 // If this code ever goes away, remove the comment pointing to it in the
349 // FakeString class in BindingUtils.h.
350 void operator=(const binding_detail::FakeString<CharT>* str) {
351 MOZ_ASSERT(str)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(str)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(str))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("str", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 351); AnnotateMozCrashReason("MOZ_ASSERT" "(" "str" ")"); do
{ *((volatile int*)__null) = 351; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
352 mStr = reinterpret_cast<const nsTString<CharT>*>(str);
353 }
354
355 const AString& Value() const {
356 MOZ_ASSERT(WasPassed())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(WasPassed())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(WasPassed()))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("WasPassed()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 356); AnnotateMozCrashReason("MOZ_ASSERT" "(" "WasPassed()"
")"); do { *((volatile int*)__null) = 356; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
357 return *mStr;
358 }
359
360 private:
361 // Forbid copy-construction and assignment
362 Optional(const Optional& other) = delete;
363 const Optional& operator=(const Optional& other) = delete;
364
365 const AString* mStr;
366};
367
368template <typename T>
369inline void ImplCycleCollectionUnlink(Optional<T>& aField) {
370 if (aField.WasPassed()) {
371 ImplCycleCollectionUnlink(aField.Value());
372 }
373}
374
375template <typename T>
376inline void ImplCycleCollectionTraverse(
377 nsCycleCollectionTraversalCallback& aCallback, Optional<T>& aField,
378 const char* aName, uint32_t aFlags = 0) {
379 if (aField.WasPassed()) {
380 ImplCycleCollectionTraverse(aCallback, aField.Value(), aName, aFlags);
381 }
382}
383
384template <class T>
385class NonNull {
386 public:
387 NonNull()
388#ifdef DEBUG1
389 : inited(false)
390#endif
391 {
392 }
393
394 // This is no worse than get() in terms of const handling.
395 operator T&() const {
396 MOZ_ASSERT(inited)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(inited)>::isValid, "invalid assertion condition")
; if ((__builtin_expect(!!(!(!!(inited))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("inited", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 396); AnnotateMozCrashReason("MOZ_ASSERT" "(" "inited" ")")
; do { *((volatile int*)__null) = 396; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
397 MOZ_ASSERT(ptr, "NonNull<T> was set to null")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ptr)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(ptr))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("ptr" " (" "NonNull<T> was set to null"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 397); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ptr" ") (" "NonNull<T> was set to null"
")"); do { *((volatile int*)__null) = 397; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
398 return *ptr;
399 }
400
401 operator T*() const {
402 MOZ_ASSERT(inited)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(inited)>::isValid, "invalid assertion condition")
; if ((__builtin_expect(!!(!(!!(inited))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("inited", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 402); AnnotateMozCrashReason("MOZ_ASSERT" "(" "inited" ")")
; do { *((volatile int*)__null) = 402; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
403 MOZ_ASSERT(ptr, "NonNull<T> was set to null")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ptr)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(ptr))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("ptr" " (" "NonNull<T> was set to null"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 403); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ptr" ") (" "NonNull<T> was set to null"
")"); do { *((volatile int*)__null) = 403; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
404 return ptr;
405 }
406
407 void operator=(T* t) {
408 ptr = t;
409 MOZ_ASSERT(ptr)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ptr)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(ptr))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("ptr", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 409); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ptr" ")"); do
{ *((volatile int*)__null) = 409; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
410#ifdef DEBUG1
411 inited = true;
412#endif
413 }
414
415 template <typename U>
416 void operator=(U* t) {
417 ptr = t->ToAStringPtr();
418 MOZ_ASSERT(ptr)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ptr)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(ptr))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("ptr", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 418); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ptr" ")"); do
{ *((volatile int*)__null) = 418; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
419#ifdef DEBUG1
420 inited = true;
421#endif
422 }
423
424 T** Slot() {
425#ifdef DEBUG1
426 inited = true;
427#endif
428 return &ptr;
429 }
430
431 T* Ptr() {
432 MOZ_ASSERT(inited)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(inited)>::isValid, "invalid assertion condition")
; if ((__builtin_expect(!!(!(!!(inited))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("inited", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 432); AnnotateMozCrashReason("MOZ_ASSERT" "(" "inited" ")")
; do { *((volatile int*)__null) = 432; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
433 MOZ_ASSERT(ptr, "NonNull<T> was set to null")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ptr)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(ptr))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("ptr" " (" "NonNull<T> was set to null"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 433); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ptr" ") (" "NonNull<T> was set to null"
")"); do { *((volatile int*)__null) = 433; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
434 return ptr;
435 }
436
437 // Make us work with smart-ptr helpers that expect a get()
438 T* get() const {
439 MOZ_ASSERT(inited)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(inited)>::isValid, "invalid assertion condition")
; if ((__builtin_expect(!!(!(!!(inited))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("inited", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 439); AnnotateMozCrashReason("MOZ_ASSERT" "(" "inited" ")")
; do { *((volatile int*)__null) = 439; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
440 MOZ_ASSERT(ptr)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ptr)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(ptr))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("ptr", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 440); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ptr" ")"); do
{ *((volatile int*)__null) = 440; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
441 return ptr;
442 }
443
444 protected:
445 // ptr is left uninitialized for optimization purposes.
446 MOZ_INIT_OUTSIDE_CTOR T* ptr;
447#ifdef DEBUG1
448 bool inited;
449#endif
450};
451
452// Class for representing sequences in arguments. We use a non-auto array
453// because that allows us to use sequences of sequences and the like. This
454// needs to be fallible because web content controls the length of the array,
455// and can easily try to create very large lengths.
456template <typename T>
457class Sequence : public FallibleTArray<T> {
458 public:
459 Sequence() : FallibleTArray<T>() {}
460 MOZ_IMPLICIT Sequence(FallibleTArray<T>&& aArray)
461 : FallibleTArray<T>(std::move(aArray)) {}
462 MOZ_IMPLICIT Sequence(nsTArray<T>&& aArray)
463 : FallibleTArray<T>(std::move(aArray)) {}
464
465 Sequence(Sequence&&) = default;
466 Sequence& operator=(Sequence&&) = default;
467
468 // XXX(Bug 1631461) Codegen.py must be adapted to allow making Sequence
469 // uncopyable.
470 Sequence(const Sequence& aOther) {
471 if (!this->AppendElements(aOther, fallible)) {
472 MOZ_CRASH("Out of memory")do { do { } while (false); MOZ_ReportCrash("" "Out of memory"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 472); AnnotateMozCrashReason("MOZ_CRASH(" "Out of memory" ")"
); do { *((volatile int*)__null) = 472; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
473 }
474 }
475 Sequence& operator=(const Sequence& aOther) {
476 if (this != &aOther) {
477 this->Clear();
478 if (!this->AppendElements(aOther, fallible)) {
479 MOZ_CRASH("Out of memory")do { do { } while (false); MOZ_ReportCrash("" "Out of memory"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingDeclarations.h"
, 479); AnnotateMozCrashReason("MOZ_CRASH(" "Out of memory" ")"
); do { *((volatile int*)__null) = 479; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
480 }
481 }
482 return *this;
483 }
484};
485
486inline nsWrapperCache* GetWrapperCache(nsWrapperCache* cache) { return cache; }
487
488inline nsWrapperCache* GetWrapperCache(void* p) { return nullptr; }
489
490// Helper template for smart pointers to resolve ambiguity between
491// GetWrappeCache(void*) and GetWrapperCache(const ParentObject&).
492template <template <typename> class SmartPtr, typename T>
493inline nsWrapperCache* GetWrapperCache(const SmartPtr<T>& aObject) {
494 return GetWrapperCache(aObject.get());
495}
496
497enum class ReflectionScope { Content, NAC, UAWidget };
498
499struct MOZ_STACK_CLASS ParentObject {
500 template <class T>
501 MOZ_IMPLICIT ParentObject(T* aObject)
502 : mObject(ToSupports(aObject)),
503 mWrapperCache(GetWrapperCache(aObject)),
504 mReflectionScope(ReflectionScope::Content) {}
505
506 template <class T, template <typename> class SmartPtr>
507 MOZ_IMPLICIT ParentObject(const SmartPtr<T>& aObject)
508 : mObject(aObject.get()),
509 mWrapperCache(GetWrapperCache(aObject.get())),
510 mReflectionScope(ReflectionScope::Content) {}
511
512 ParentObject(nsISupports* aObject, nsWrapperCache* aCache)
513 : mObject(aObject),
514 mWrapperCache(aCache),
515 mReflectionScope(ReflectionScope::Content) {}
516
517 // We don't want to make this an nsCOMPtr because of performance reasons, but
518 // it's safe because ParentObject is a stack class.
519 nsISupports* const MOZ_NON_OWNING_REF mObject;
520 nsWrapperCache* const mWrapperCache;
521 ReflectionScope mReflectionScope;
522};
523
524namespace binding_detail {
525
526// Class for simple sequence arguments, only used internally by codegen.
527template <typename T>
528class AutoSequence : public AutoTArray<T, 16> {
529 public:
530 AutoSequence() : AutoTArray<T, 16>() {}
531
532 // Allow converting to const sequences as needed
533 operator const Sequence<T>&() const {
534 return *reinterpret_cast<const Sequence<T>*>(this);
535 }
536};
537
538} // namespace binding_detail
539
540// Enum to represent a system or non-system caller type.
541enum class CallerType : uint32_t { System, NonSystem };
542
543// A class that can be passed (by value or const reference) to indicate that the
544// caller is always a system caller. This can be used as the type of an
545// argument to force only system callers to call a function.
546class SystemCallerGuarantee {
547 public:
548 operator CallerType() const { return CallerType::System; }
549};
550
551class ProtoAndIfaceCache;
552typedef void (*CreateInterfaceObjectsMethod)(JSContext* aCx,
553 JS::Handle<JSObject*> aGlobal,
554 ProtoAndIfaceCache& aCache,
555 bool aDefineOnGlobal);
556JS::Handle<JSObject*> GetPerInterfaceObjectHandle(
557 JSContext* aCx, size_t aSlotId, CreateInterfaceObjectsMethod aCreator,
558 bool aDefineOnGlobal);
559
560namespace binding_detail {
561
562template <typename Enum>
563struct EnumStrings;
564
565} // namespace binding_detail
566
567} // namespace dom
568} // namespace mozilla
569
570#endif // mozilla_dom_BindingDeclarations_h__

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

1/* -*- Mode: C++; tab-width: 2; 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
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7/* A class for optional values and in-place lazy construction. */
8
9#ifndef mozilla_Maybe_h
10#define mozilla_Maybe_h
11
12#include <functional>
13#include <new> // for placement new
14#include <ostream>
15#include <type_traits>
16#include <utility>
17
18#include "mozilla/Alignment.h"
19#include "mozilla/Assertions.h"
20#include "mozilla/Attributes.h"
21#include "mozilla/MaybeStorageBase.h"
22#include "mozilla/MemoryChecking.h"
23#include "mozilla/OperatorNewExtensions.h"
24#include "mozilla/Poison.h"
25#include "mozilla/ThreadSafety.h"
26
27class nsCycleCollectionTraversalCallback;
28
29template <typename T>
30inline void CycleCollectionNoteChild(
31 nsCycleCollectionTraversalCallback& aCallback, T* aChild, const char* aName,
32 uint32_t aFlags);
33
34namespace mozilla {
35
36struct Nothing {};
37
38inline constexpr bool operator==(const Nothing&, const Nothing&) {
39 return true;
40}
41
42template <class T>
43class Maybe;
44
45namespace detail {
46
47// You would think that poisoning Maybe instances could just be a call
48// to mozWritePoison. Unfortunately, using a simple call to
49// mozWritePoison generates poor code on MSVC for small structures. The
50// generated code contains (always not-taken) branches and does a bunch
51// of setup for `rep stos{l,q}`, even though we know at compile time
52// exactly how many words we're poisoning. Instead, we're going to
53// force MSVC to generate the code we want via recursive templates.
54
55// Write the given poisonValue into p at offset*sizeof(uintptr_t).
56template <size_t offset>
57inline void WritePoisonAtOffset(void* p, const uintptr_t poisonValue) {
58 memcpy(static_cast<char*>(p) + offset * sizeof(poisonValue), &poisonValue,
59 sizeof(poisonValue));
60}
61
62template <size_t Offset, size_t NOffsets>
63struct InlinePoisoner {
64 static void poison(void* p, const uintptr_t poisonValue) {
65 WritePoisonAtOffset<Offset>(p, poisonValue);
66 InlinePoisoner<Offset + 1, NOffsets>::poison(p, poisonValue);
67 }
68};
69
70template <size_t N>
71struct InlinePoisoner<N, N> {
72 static void poison(void*, const uintptr_t) {
73 // All done!
74 }
75};
76
77// We can't generate inline code for large structures, though, because we'll
78// blow out recursive template instantiation limits, and the code would be
79// bloated to boot. So provide a fallback to the out-of-line poisoner.
80template <size_t ObjectSize>
81struct OutOfLinePoisoner {
82 static MOZ_NEVER_INLINE__attribute__((noinline)) void poison(void* p, const uintptr_t) {
83 mozWritePoison(p, ObjectSize);
84 }
85};
86
87template <typename T>
88inline void PoisonObject(T* p) {
89 const uintptr_t POISON = mozPoisonValue();
90 std::conditional_t<(sizeof(T) <= 8 * sizeof(POISON)),
91 InlinePoisoner<0, sizeof(T) / sizeof(POISON)>,
92 OutOfLinePoisoner<sizeof(T)>>::poison(p, POISON);
93}
94
95template <typename T>
96struct MaybePoisoner {
97 static const size_t N = sizeof(T);
98
99 static void poison(void* aPtr) {
100#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED1
101 if (N >= sizeof(uintptr_t)) {
102 PoisonObject(static_cast<std::remove_cv_t<T>*>(aPtr));
103 }
104#endif
105 MOZ_MAKE_MEM_UNDEFINED(aPtr, N)do { } while (0);
106 }
107};
108
109template <typename T,
110 bool TriviallyDestructibleAndCopyable =
111 IsTriviallyDestructibleAndCopyable<T>,
112 bool Copyable = std::is_copy_constructible_v<T>,
113 bool Movable = std::is_move_constructible_v<T>>
114class Maybe_CopyMove_Enabler;
115
116#define MOZ_MAYBE_COPY_OPS() \
117 Maybe_CopyMove_Enabler(const Maybe_CopyMove_Enabler& aOther) { \
118 if (downcast(aOther).isSome()) { \
119 downcast(*this).emplace(*downcast(aOther)); \
120 } \
121 } \
122 \
123 Maybe_CopyMove_Enabler& operator=(const Maybe_CopyMove_Enabler& aOther) { \
124 return downcast(*this).template operator= <T>(downcast(aOther)); \
125 }
126
127#define MOZ_MAYBE_MOVE_OPS() \
128 constexpr Maybe_CopyMove_Enabler(Maybe_CopyMove_Enabler&& aOther) { \
129 if (downcast(aOther).isSome()) { \
130 downcast(*this).emplace(std::move(*downcast(aOther))); \
131 downcast(aOther).reset(); \
132 } \
133 } \
134 \
135 constexpr Maybe_CopyMove_Enabler& operator=( \
136 Maybe_CopyMove_Enabler&& aOther) { \
137 downcast(*this).template operator= <T>(std::move(downcast(aOther))); \
138 \
139 return *this; \
140 }
141
142#define MOZ_MAYBE_DOWNCAST() \
143 static constexpr Maybe<T>& downcast(Maybe_CopyMove_Enabler& aObj) { \
144 return static_cast<Maybe<T>&>(aObj); \
145 } \
146 static constexpr const Maybe<T>& downcast( \
147 const Maybe_CopyMove_Enabler& aObj) { \
148 return static_cast<const Maybe<T>&>(aObj); \
149 }
150
151template <typename T>
152class Maybe_CopyMove_Enabler<T, true, true, true> {
153 public:
154 Maybe_CopyMove_Enabler() = default;
155
156 Maybe_CopyMove_Enabler(const Maybe_CopyMove_Enabler&) = default;
157 Maybe_CopyMove_Enabler& operator=(const Maybe_CopyMove_Enabler&) = default;
158 constexpr Maybe_CopyMove_Enabler(Maybe_CopyMove_Enabler&& aOther) {
159 downcast(aOther).reset();
160 }
161 constexpr Maybe_CopyMove_Enabler& operator=(Maybe_CopyMove_Enabler&& aOther) {
162 downcast(aOther).reset();
163 return *this;
164 }
165
166 private:
167 MOZ_MAYBE_DOWNCAST()
168};
169
170template <typename T>
171class Maybe_CopyMove_Enabler<T, true, false, true> {
172 public:
173 Maybe_CopyMove_Enabler() = default;
174
175 Maybe_CopyMove_Enabler(const Maybe_CopyMove_Enabler&) = delete;
176 Maybe_CopyMove_Enabler& operator=(const Maybe_CopyMove_Enabler&) = delete;
177 constexpr Maybe_CopyMove_Enabler(Maybe_CopyMove_Enabler&& aOther) {
178 downcast(aOther).reset();
179 }
180 constexpr Maybe_CopyMove_Enabler& operator=(Maybe_CopyMove_Enabler&& aOther) {
181 downcast(aOther).reset();
182 return *this;
183 }
184
185 private:
186 MOZ_MAYBE_DOWNCAST()
187};
188
189template <typename T>
190class Maybe_CopyMove_Enabler<T, false, true, true> {
191 public:
192 Maybe_CopyMove_Enabler() = default;
193
194 MOZ_MAYBE_COPY_OPS()
195 MOZ_MAYBE_MOVE_OPS()
196
197 private:
198 MOZ_MAYBE_DOWNCAST()
199};
200
201template <typename T>
202class Maybe_CopyMove_Enabler<T, false, false, true> {
203 public:
204 Maybe_CopyMove_Enabler() = default;
205
206 Maybe_CopyMove_Enabler(const Maybe_CopyMove_Enabler&) = delete;
207 Maybe_CopyMove_Enabler& operator=(const Maybe_CopyMove_Enabler&) = delete;
208 MOZ_MAYBE_MOVE_OPS()
209
210 private:
211 MOZ_MAYBE_DOWNCAST()
212};
213
214template <typename T>
215class Maybe_CopyMove_Enabler<T, false, true, false> {
216 public:
217 Maybe_CopyMove_Enabler() = default;
218
219 MOZ_MAYBE_COPY_OPS()
220 Maybe_CopyMove_Enabler(Maybe_CopyMove_Enabler&&) = delete;
221 Maybe_CopyMove_Enabler& operator=(Maybe_CopyMove_Enabler&&) = delete;
222
223 private:
224 MOZ_MAYBE_DOWNCAST()
225};
226
227template <typename T, bool TriviallyDestructibleAndCopyable>
228class Maybe_CopyMove_Enabler<T, TriviallyDestructibleAndCopyable, false,
229 false> {
230 public:
231 Maybe_CopyMove_Enabler() = default;
232
233 Maybe_CopyMove_Enabler(const Maybe_CopyMove_Enabler&) = delete;
234 Maybe_CopyMove_Enabler& operator=(const Maybe_CopyMove_Enabler&) = delete;
235 Maybe_CopyMove_Enabler(Maybe_CopyMove_Enabler&&) = delete;
236 Maybe_CopyMove_Enabler& operator=(Maybe_CopyMove_Enabler&&) = delete;
237};
238
239#undef MOZ_MAYBE_COPY_OPS
240#undef MOZ_MAYBE_MOVE_OPS
241#undef MOZ_MAYBE_DOWNCAST
242
243template <typename T, bool TriviallyDestructibleAndCopyable =
244 IsTriviallyDestructibleAndCopyable<T>>
245struct MaybeStorage;
246
247template <typename T>
248struct MaybeStorage<T, false> : MaybeStorageBase<T> {
249 protected:
250 char mIsSome = false; // not bool -- guarantees minimal space consumption
251
252 MaybeStorage() = default;
6
Calling defaulted default constructor for 'MaybeStorageBase<JS::Rooted<JSObject *>, false>'
11
Returning from default constructor for 'MaybeStorageBase<JS::Rooted<JSObject *>, false>'
12
Returning without writing to 'this->mStorage.val.stack'
253 explicit MaybeStorage(const T& aVal)
254 : MaybeStorageBase<T>{aVal}, mIsSome{true} {}
255 explicit MaybeStorage(T&& aVal)
256 : MaybeStorageBase<T>{std::move(aVal)}, mIsSome{true} {}
257
258 template <typename... Args>
259 explicit MaybeStorage(std::in_place_t, Args&&... aArgs)
260 : MaybeStorageBase<T>{std::in_place, std::forward<Args>(aArgs)...},
261 mIsSome{true} {}
262
263 public:
264 // Copy and move operations are no-ops, since copying is moving is implemented
265 // by Maybe_CopyMove_Enabler.
266
267 MaybeStorage(const MaybeStorage&) : MaybeStorageBase<T>{} {}
268 MaybeStorage& operator=(const MaybeStorage&) { return *this; }
269 MaybeStorage(MaybeStorage&&) : MaybeStorageBase<T>{} {}
270 MaybeStorage& operator=(MaybeStorage&&) { return *this; }
271
272 ~MaybeStorage() {
273 if (mIsSome
30.1
Field 'mIsSome' is 0
30.1
Field 'mIsSome' is 0
30.1
Field 'mIsSome' is 0
30.1
Field 'mIsSome' is 0
30.1
Field 'mIsSome' is 0
30.1
Field 'mIsSome' is 0
) {
31
Taking false branch
274 this->addr()->T::~T();
275 }
276 }
32
Calling implicit destructor for 'MaybeStorageBase<JS::Rooted<JSObject *>, false>'
33
Calling '~Union'
277};
278
279template <typename T>
280struct MaybeStorage<T, true> : MaybeStorageBase<T> {
281 protected:
282 char mIsSome = false; // not bool -- guarantees minimal space consumption
283
284 constexpr MaybeStorage() = default;
285 constexpr explicit MaybeStorage(const T& aVal)
286 : MaybeStorageBase<T>{aVal}, mIsSome{true} {}
287 constexpr explicit MaybeStorage(T&& aVal)
288 : MaybeStorageBase<T>{std::move(aVal)}, mIsSome{true} {}
289
290 template <typename... Args>
291 constexpr explicit MaybeStorage(std::in_place_t, Args&&... aArgs)
292 : MaybeStorageBase<T>{std::in_place, std::forward<Args>(aArgs)...},
293 mIsSome{true} {}
294};
295
296template <typename T>
297struct IsMaybeImpl : std::false_type {};
298
299template <typename T>
300struct IsMaybeImpl<Maybe<T>> : std::true_type {};
301
302template <typename T>
303using IsMaybe = IsMaybeImpl<std::decay_t<T>>;
304
305} // namespace detail
306
307template <typename T, typename U = typename std::remove_cv<
308 typename std::remove_reference<T>::type>::type>
309constexpr Maybe<U> Some(T&& aValue);
310
311/*
312 * Maybe is a container class which contains either zero or one elements. It
313 * serves two roles. It can represent values which are *semantically* optional,
314 * augmenting a type with an explicit 'Nothing' value. In this role, it provides
315 * methods that make it easy to work with values that may be missing, along with
316 * equality and comparison operators so that Maybe values can be stored in
317 * containers. Maybe values can be constructed conveniently in expressions using
318 * type inference, as follows:
319 *
320 * void doSomething(Maybe<Foo> aFoo) {
321 * if (aFoo) // Make sure that aFoo contains a value...
322 * aFoo->takeAction(); // and then use |aFoo->| to access it.
323 * } // |*aFoo| also works!
324 *
325 * doSomething(Nothing()); // Passes a Maybe<Foo> containing no value.
326 * doSomething(Some(Foo(100))); // Passes a Maybe<Foo> containing |Foo(100)|.
327 *
328 * You'll note that it's important to check whether a Maybe contains a value
329 * before using it, using conversion to bool, |isSome()|, or |isNothing()|. You
330 * can avoid these checks, and sometimes write more readable code, using
331 * |valueOr()|, |ptrOr()|, and |refOr()|, which allow you to retrieve the value
332 * in the Maybe and provide a default for the 'Nothing' case. You can also use
333 * |apply()| to call a function only if the Maybe holds a value, and |map()| to
334 * transform the value in the Maybe, returning another Maybe with a possibly
335 * different type.
336 *
337 * Maybe's other role is to support lazily constructing objects without using
338 * dynamic storage. A Maybe directly contains storage for a value, but it's
339 * empty by default. |emplace()|, as mentioned above, can be used to construct a
340 * value in Maybe's storage. The value a Maybe contains can be destroyed by
341 * calling |reset()|; this will happen automatically if a Maybe is destroyed
342 * while holding a value.
343 *
344 * It's a common idiom in C++ to use a pointer as a 'Maybe' type, with a null
345 * value meaning 'Nothing' and any other value meaning 'Some'. You can convert
346 * from such a pointer to a Maybe value using 'ToMaybe()'.
347 *
348 * Maybe is inspired by similar types in the standard library of many other
349 * languages (e.g. Haskell's Maybe and Rust's Option). In the C++ world it's
350 * very similar to std::optional, which was proposed for C++14 and originated in
351 * Boost. The most important differences between Maybe and std::optional are:
352 *
353 * - std::optional<T> may be compared with T. We deliberately forbid that.
354 * - std::optional has |valueOr()|, equivalent to Maybe's |valueOr()|, but
355 * lacks corresponding methods for |refOr()| and |ptrOr()|.
356 * - std::optional lacks |map()| and |apply()|, making it less suitable for
357 * functional-style code.
358 * - std::optional lacks many convenience functions that Maybe has. Most
359 * unfortunately, it lacks equivalents of the type-inferred constructor
360 * functions |Some()| and |Nothing()|.
361 */
362template <class T>
363class MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS Maybe
364 : private detail::MaybeStorage<T>,
365 public detail::Maybe_CopyMove_Enabler<T> {
366 template <typename, bool, bool, bool>
367 friend class detail::Maybe_CopyMove_Enabler;
368
369 template <typename U, typename V>
370 friend constexpr Maybe<V> Some(U&& aValue);
371
372 struct SomeGuard {};
373
374 template <typename U>
375 constexpr Maybe(U&& aValue, SomeGuard)
376 : detail::MaybeStorage<T>{std::forward<U>(aValue)} {}
377
378 using detail::MaybeStorage<T>::mIsSome;
379 using detail::MaybeStorage<T>::mStorage;
380
381 void poisonData() { detail::MaybePoisoner<T>::poison(&mStorage.val); }
382
383 public:
384 using ValueType = T;
385
386 MOZ_ALLOW_TEMPORARY constexpr Maybe() = default;
5
Calling defaulted default constructor for 'MaybeStorage<JS::Rooted<JSObject *>, false>'
13
Returning from default constructor for 'MaybeStorage<JS::Rooted<JSObject *>, false>'
14
Returning without writing to 'this->mStorage.val.stack'
387
388 MOZ_ALLOW_TEMPORARY MOZ_IMPLICIT constexpr Maybe(Nothing) : Maybe{} {}
389
390 template <typename... Args>
391 constexpr explicit Maybe(std::in_place_t, Args&&... aArgs)
392 : detail::MaybeStorage<T>{std::in_place, std::forward<Args>(aArgs)...} {}
393
394 /**
395 * Maybe<T> can be copy-constructed from a Maybe<U> if T is constructible from
396 * a const U&.
397 */
398 template <typename U,
399 std::enable_if_t<std::is_constructible_v<T, const U&>, bool> = true>
400 MOZ_IMPLICIT Maybe(const Maybe<U>& aOther) {
401 if (aOther.isSome()) {
402 emplace(*aOther);
403 }
404 }
405
406 template <typename U, std::enable_if_t<!std::is_constructible_v<T, const U&>,
407 bool> = true>
408 explicit Maybe(const Maybe<U>& aOther) = delete;
409
410 /**
411 * Maybe<T> can be move-constructed from a Maybe<U> if T is constructible from
412 * a U&&.
413 */
414 template <typename U,
415 std::enable_if_t<std::is_constructible_v<T, U&&>, bool> = true>
416 MOZ_IMPLICIT Maybe(Maybe<U>&& aOther) {
417 if (aOther.isSome()) {
418 emplace(std::move(*aOther));
419 aOther.reset();
420 }
421 }
422 template <typename U,
423 std::enable_if_t<!std::is_constructible_v<T, U&&>, bool> = true>
424 explicit Maybe(Maybe<U>&& aOther) = delete;
425
426 template <typename U,
427 std::enable_if_t<std::is_constructible_v<T, const U&>, bool> = true>
428 Maybe& operator=(const Maybe<U>& aOther) {
429 if (aOther.isSome()) {
430 if (mIsSome) {
431 ref() = aOther.ref();
432 } else {
433 emplace(*aOther);
434 }
435 } else {
436 reset();
437 }
438 return *this;
439 }
440
441 template <typename U, std::enable_if_t<!std::is_constructible_v<T, const U&>,
442 bool> = true>
443 Maybe& operator=(const Maybe<U>& aOther) = delete;
444
445 template <typename U,
446 std::enable_if_t<std::is_constructible_v<T, U&&>, bool> = true>
447 Maybe& operator=(Maybe<U>&& aOther) {
448 if (aOther.isSome()) {
449 if (mIsSome) {
450 ref() = std::move(aOther.ref());
451 } else {
452 emplace(std::move(*aOther));
453 }
454 aOther.reset();
455 } else {
456 reset();
457 }
458
459 return *this;
460 }
461
462 template <typename U,
463 std::enable_if_t<!std::is_constructible_v<T, U&&>, bool> = true>
464 Maybe& operator=(Maybe<U>&& aOther) = delete;
465
466 constexpr Maybe& operator=(Nothing) {
467 reset();
468 return *this;
469 }
470
471 /* Methods that check whether this Maybe contains a value */
472 constexpr explicit operator bool() const { return isSome(); }
473 constexpr bool isSome() const { return mIsSome; }
474 constexpr bool isNothing() const { return !mIsSome; }
475
476 /* Returns the contents of this Maybe<T> by value. Unsafe unless |isSome()|.
477 */
478 constexpr T value() const&;
479 constexpr T value() &&;
480 constexpr T value() const&&;
481
482 /**
483 * Move the contents of this Maybe<T> out of internal storage and return it
484 * without calling the destructor. The internal storage is also reset to
485 * avoid multiple calls. Unsafe unless |isSome()|.
486 */
487 constexpr T extract() {
488 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 488); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 488; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
489 T v = std::move(mStorage.val);
490 reset();
491 return v;
492 }
493
494 /**
495 * Returns the value (possibly |Nothing()|) by moving it out of this Maybe<T>
496 * and leaving |Nothing()| in its place.
497 */
498 Maybe<T> take() { return std::exchange(*this, Nothing()); }
499
500 /*
501 * Returns the contents of this Maybe<T> by value. If |isNothing()|, returns
502 * the default value provided.
503 *
504 * Note: If the value passed to aDefault is not the result of a trivial
505 * expression, but expensive to evaluate, e.g. |valueOr(ExpensiveFunction())|,
506 * use |valueOrFrom| instead, e.g.
507 * |valueOrFrom([arg] { return ExpensiveFunction(arg); })|. This ensures
508 * that the expensive expression is only evaluated when its result will
509 * actually be used.
510 */
511 template <typename V>
512 constexpr T valueOr(V&& aDefault) const {
513 if (isSome()) {
514 return ref();
515 }
516 return std::forward<V>(aDefault);
517 }
518
519 /*
520 * Returns the contents of this Maybe<T> by value. If |isNothing()|, returns
521 * the value returned from the function or functor provided.
522 */
523 template <typename F>
524 constexpr T valueOrFrom(F&& aFunc) const {
525 if (isSome()) {
526 return ref();
527 }
528 return aFunc();
529 }
530
531 /* Returns the contents of this Maybe<T> by pointer. Unsafe unless |isSome()|.
532 */
533 T* ptr();
534 constexpr const T* ptr() const;
535
536 /*
537 * Returns the contents of this Maybe<T> by pointer. If |isNothing()|,
538 * returns the default value provided.
539 */
540 T* ptrOr(T* aDefault) {
541 if (isSome()) {
542 return ptr();
543 }
544 return aDefault;
545 }
546
547 constexpr const T* ptrOr(const T* aDefault) const {
548 if (isSome()) {
549 return ptr();
550 }
551 return aDefault;
552 }
553
554 /*
555 * Returns the contents of this Maybe<T> by pointer. If |isNothing()|,
556 * returns the value returned from the function or functor provided.
557 */
558 template <typename F>
559 T* ptrOrFrom(F&& aFunc) {
560 if (isSome()) {
561 return ptr();
562 }
563 return aFunc();
564 }
565
566 template <typename F>
567 const T* ptrOrFrom(F&& aFunc) const {
568 if (isSome()) {
569 return ptr();
570 }
571 return aFunc();
572 }
573
574 constexpr T* operator->();
575 constexpr const T* operator->() const;
576
577 /* Returns the contents of this Maybe<T> by ref. Unsafe unless |isSome()|. */
578 constexpr T& ref() &;
579 constexpr const T& ref() const&;
580 constexpr T&& ref() &&;
581 constexpr const T&& ref() const&&;
582
583 /*
584 * Returns the contents of this Maybe<T> by ref. If |isNothing()|, returns
585 * the default value provided.
586 */
587 constexpr T& refOr(T& aDefault) {
588 if (isSome()) {
589 return ref();
590 }
591 return aDefault;
592 }
593
594 constexpr const T& refOr(const T& aDefault) const {
595 if (isSome()) {
596 return ref();
597 }
598 return aDefault;
599 }
600
601 /*
602 * Returns the contents of this Maybe<T> by ref. If |isNothing()|, returns the
603 * value returned from the function or functor provided.
604 */
605 template <typename F>
606 constexpr T& refOrFrom(F&& aFunc) {
607 if (isSome()) {
608 return ref();
609 }
610 return aFunc();
611 }
612
613 template <typename F>
614 constexpr const T& refOrFrom(F&& aFunc) const {
615 if (isSome()) {
616 return ref();
617 }
618 return aFunc();
619 }
620
621 constexpr T& operator*() &;
622 constexpr const T& operator*() const&;
623 constexpr T&& operator*() &&;
624 constexpr const T&& operator*() const&&;
625
626 /* If |isSome()|, runs the provided function or functor on the contents of
627 * this Maybe. */
628 template <typename Func>
629 constexpr Maybe& apply(Func&& aFunc) & {
630 if (isSome()) {
631 std::forward<Func>(aFunc)(ref());
632 }
633 return *this;
634 }
635
636 template <typename Func>
637 constexpr const Maybe& apply(Func&& aFunc) const& {
638 if (isSome()) {
639 std::forward<Func>(aFunc)(ref());
640 }
641 return *this;
642 }
643
644 template <typename Func>
645 constexpr Maybe& apply(Func&& aFunc) && {
646 if (isSome()) {
647 std::forward<Func>(aFunc)(extract());
648 }
649 return *this;
650 }
651
652 template <typename Func>
653 constexpr Maybe& apply(Func&& aFunc) const&& {
654 if (isSome()) {
655 std::forward<Func>(aFunc)(extract());
656 }
657 return *this;
658 }
659
660 /*
661 * If |isSome()|, runs the provided function and returns the result wrapped
662 * in a Maybe. If |isNothing()|, returns an empty Maybe value with the same
663 * value type as what the provided function would have returned.
664 */
665 template <typename Func>
666 constexpr auto map(Func&& aFunc) & {
667 if (isSome()) {
668 return Some(std::forward<Func>(aFunc)(ref()));
669 }
670 return Maybe<decltype(std::forward<Func>(aFunc)(ref()))>{};
671 }
672
673 template <typename Func>
674 constexpr auto map(Func&& aFunc) const& {
675 if (isSome()) {
676 return Some(std::forward<Func>(aFunc)(ref()));
677 }
678 return Maybe<decltype(std::forward<Func>(aFunc)(ref()))>{};
679 }
680
681 template <typename Func>
682 constexpr auto map(Func&& aFunc) && {
683 if (isSome()) {
684 return Some(std::forward<Func>(aFunc)(extract()));
685 }
686 return Maybe<decltype(std::forward<Func>(aFunc)(extract()))>{};
687 }
688
689 template <typename Func>
690 constexpr auto map(Func&& aFunc) const&& {
691 if (isSome()) {
692 return Some(std::forward<Func>(aFunc)(extract()));
693 }
694 return Maybe<decltype(std::forward<Func>(aFunc)(extract()))>{};
695 }
696
697 /*
698 * If |isSome()|, runs the provided function or functor on the contents of
699 * this Maybe and returns the result. Note that the provided function or
700 * functor must return a Maybe<U> of any type U.
701 * If |isNothing()|, returns an empty Maybe value with the same type as what
702 * the provided function would have returned.
703 */
704 template <typename Func>
705 constexpr auto andThen(Func&& aFunc) & {
706 static_assert(std::is_invocable_v<Func, T&>);
707 using U = std::invoke_result_t<Func, T&>;
708 static_assert(detail::IsMaybe<U>::value);
709 if (isSome()) {
710 return std::invoke(std::forward<Func>(aFunc), ref());
711 }
712 return std::remove_cv_t<std::remove_reference_t<U>>{};
713 }
714
715 template <typename Func>
716 constexpr auto andThen(Func&& aFunc) const& {
717 static_assert(std::is_invocable_v<Func, const T&>);
718 using U = std::invoke_result_t<Func, const T&>;
719 static_assert(detail::IsMaybe<U>::value);
720 if (isSome()) {
721 return std::invoke(std::forward<Func>(aFunc), ref());
722 }
723 return std::remove_cv_t<std::remove_reference_t<U>>{};
724 }
725
726 template <typename Func>
727 constexpr auto andThen(Func&& aFunc) && {
728 static_assert(std::is_invocable_v<Func, T&&>);
729 using U = std::invoke_result_t<Func, T&&>;
730 static_assert(detail::IsMaybe<U>::value);
731 if (isSome()) {
732 return std::invoke(std::forward<Func>(aFunc), extract());
733 }
734 return std::remove_cv_t<std::remove_reference_t<U>>{};
735 }
736
737 template <typename Func>
738 constexpr auto andThen(Func&& aFunc) const&& {
739 static_assert(std::is_invocable_v<Func, const T&&>);
740 using U = std::invoke_result_t<Func, const T&&>;
741 static_assert(detail::IsMaybe<U>::value);
742 if (isSome()) {
743 return std::invoke(std::forward<Func>(aFunc), extract());
744 }
745 return std::remove_cv_t<std::remove_reference_t<U>>{};
746 }
747
748 /*
749 * If |isNothing()|, runs the provided function or functor and returns its
750 * result. If |isSome()|, returns the contained value wrapped in a Maybe.
751 */
752 template <typename Func>
753 constexpr Maybe orElse(Func&& aFunc) & {
754 static_assert(std::is_invocable_v<Func>);
755 using U = std::invoke_result_t<Func>;
756 static_assert(
757 std::is_same_v<Maybe, std::remove_cv_t<std::remove_reference_t<U>>>);
758 if (isSome()) {
759 return *this;
760 }
761 return std::invoke(std::forward<Func>(aFunc));
762 }
763
764 template <typename Func>
765 constexpr Maybe orElse(Func&& aFunc) const& {
766 static_assert(std::is_invocable_v<Func>);
767 using U = std::invoke_result_t<Func>;
768 static_assert(
769 std::is_same_v<Maybe, std::remove_cv_t<std::remove_reference_t<U>>>);
770 if (isSome()) {
771 return *this;
772 }
773 return std::invoke(std::forward<Func>(aFunc));
774 }
775
776 template <typename Func>
777 constexpr Maybe orElse(Func&& aFunc) && {
778 static_assert(std::is_invocable_v<Func>);
779 using U = std::invoke_result_t<Func>;
780 static_assert(
781 std::is_same_v<Maybe, std::remove_cv_t<std::remove_reference_t<U>>>);
782 if (isSome()) {
783 return std::move(*this);
784 }
785 return std::invoke(std::forward<Func>(aFunc));
786 }
787
788 template <typename Func>
789 constexpr Maybe orElse(Func&& aFunc) const&& {
790 static_assert(std::is_invocable_v<Func>);
791 using U = std::invoke_result_t<Func>;
792 static_assert(
793 std::is_same_v<Maybe, std::remove_cv_t<std::remove_reference_t<U>>>);
794 if (isSome()) {
795 return std::move(*this);
796 }
797 return std::invoke(std::forward<Func>(aFunc));
798 }
799
800 /* If |isSome()|, empties this Maybe and destroys its contents. */
801 constexpr void reset() {
802 if (isSome()) {
803 if constexpr (!std::is_trivially_destructible_v<T>) {
804 /*
805 * Static analyzer gets confused if we have Maybe<MutexAutoLock>,
806 * so we suppress thread-safety warnings here
807 */
808 MOZ_PUSH_IGNORE_THREAD_SAFETYGCC diagnostic push GCC diagnostic ignored "-Wthread-safety"
809 ref().T::~T();
810 MOZ_POP_THREAD_SAFETYGCC diagnostic pop
811 poisonData();
812 }
813 mIsSome = false;
814 }
815 }
816
817 /*
818 * Constructs a T value in-place in this empty Maybe<T>'s storage. The
819 * arguments to |emplace()| are the parameters to T's constructor.
820 */
821 template <typename... Args>
822 constexpr void emplace(Args&&... aArgs);
823
824 template <typename U>
825 constexpr std::enable_if_t<std::is_same_v<T, U> &&
826 std::is_copy_constructible_v<U> &&
827 !std::is_move_constructible_v<U>>
828 emplace(U&& aArgs) {
829 emplace(aArgs);
830 }
831
832 friend std::ostream& operator<<(std::ostream& aStream,
833 const Maybe<T>& aMaybe) {
834 if (aMaybe) {
835 aStream << aMaybe.ref();
836 } else {
837 aStream << "<Nothing>";
838 }
839 return aStream;
840 }
841};
842
843template <typename T>
844class Maybe<T&> {
845 public:
846 constexpr Maybe() = default;
847 constexpr MOZ_IMPLICIT Maybe(Nothing) {}
848
849 void emplace(T& aRef) { mValue = &aRef; }
850
851 /* Methods that check whether this Maybe contains a value */
852 constexpr explicit operator bool() const { return isSome(); }
853 constexpr bool isSome() const { return mValue; }
854 constexpr bool isNothing() const { return !mValue; }
855
856 T& ref() const {
857 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 857); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 857; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
858 return *mValue;
859 }
860
861 T* operator->() const { return &ref(); }
862 T& operator*() const { return ref(); }
863
864 // Deliberately not defining value and ptr accessors, as these may be
865 // confusing on a reference-typed Maybe.
866
867 // XXX Should we define refOr?
868
869 void reset() { mValue = nullptr; }
870
871 template <typename Func>
872 const Maybe& apply(Func&& aFunc) const {
873 if (isSome()) {
874 std::forward<Func>(aFunc)(ref());
875 }
876 return *this;
877 }
878
879 template <typename Func>
880 auto map(Func&& aFunc) const {
881 Maybe<decltype(std::forward<Func>(aFunc)(ref()))> val;
882 if (isSome()) {
883 val.emplace(std::forward<Func>(aFunc)(ref()));
884 }
885 return val;
886 }
887
888 template <typename Func>
889 constexpr auto andThen(Func&& aFunc) const {
890 static_assert(std::is_invocable_v<Func, T&>);
891 using U = std::invoke_result_t<Func, T&>;
892 static_assert(detail::IsMaybe<U>::value);
893 if (isSome()) {
894 return std::invoke(std::forward<Func>(aFunc), ref());
895 }
896 return std::remove_cv_t<std::remove_reference_t<U>>{};
897 }
898
899 template <typename Func>
900 constexpr Maybe orElse(Func&& aFunc) const {
901 static_assert(std::is_invocable_v<Func>);
902 using U = std::invoke_result_t<Func>;
903 static_assert(
904 std::is_same_v<Maybe, std::remove_cv_t<std::remove_reference_t<U>>>);
905 if (isSome()) {
906 return *this;
907 }
908 return std::invoke(std::forward<Func>(aFunc));
909 }
910
911 bool refEquals(const Maybe<T&>& aOther) const {
912 return mValue == aOther.mValue;
913 }
914
915 bool refEquals(const T& aOther) const { return mValue == &aOther; }
916
917 private:
918 T* mValue = nullptr;
919};
920
921template <typename T>
922constexpr T Maybe<T>::value() const& {
923 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 923); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 923; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
924 return ref();
925}
926
927template <typename T>
928constexpr T Maybe<T>::value() && {
929 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 929); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 929; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
930 return std::move(ref());
931}
932
933template <typename T>
934constexpr T Maybe<T>::value() const&& {
935 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 935); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 935; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
936 return std::move(ref());
937}
938
939template <typename T>
940T* Maybe<T>::ptr() {
941 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 941); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 941; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
942 return &ref();
943}
944
945template <typename T>
946constexpr const T* Maybe<T>::ptr() const {
947 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 947); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 947; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
948 return &ref();
949}
950
951template <typename T>
952constexpr T* Maybe<T>::operator->() {
953 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 953); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 953; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
954 return ptr();
955}
956
957template <typename T>
958constexpr const T* Maybe<T>::operator->() const {
959 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 959); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 959; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
960 return ptr();
961}
962
963template <typename T>
964constexpr T& Maybe<T>::ref() & {
965 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 965); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 965; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
966 return mStorage.val;
967}
968
969template <typename T>
970constexpr const T& Maybe<T>::ref() const& {
971 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 971); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 971; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
972 return mStorage.val;
973}
974
975template <typename T>
976constexpr T&& Maybe<T>::ref() && {
977 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 977); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 977; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
978 return std::move(mStorage.val);
979}
980
981template <typename T>
982constexpr const T&& Maybe<T>::ref() const&& {
983 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 983); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 983; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
984 return std::move(mStorage.val);
985}
986
987template <typename T>
988constexpr T& Maybe<T>::operator*() & {
989 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 989); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 989; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
990 return ref();
991}
992
993template <typename T>
994constexpr const T& Maybe<T>::operator*() const& {
995 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 995); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 995; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
996 return ref();
997}
998
999template <typename T>
1000constexpr T&& Maybe<T>::operator*() && {
1001 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 1001); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 1001; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1002 return std::move(ref());
1003}
1004
1005template <typename T>
1006constexpr const T&& Maybe<T>::operator*() const&& {
1007 MOZ_RELEASE_ASSERT(isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 1007); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "isSome()"
")"); do { *((volatile int*)__null) = 1007; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1008 return std::move(ref());
1009}
1010
1011template <typename T>
1012template <typename... Args>
1013constexpr void Maybe<T>::emplace(Args&&... aArgs) {
1014 MOZ_RELEASE_ASSERT(!isSome())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!isSome())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!isSome()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("!isSome()", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Maybe.h"
, 1014); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!isSome()"
")"); do { *((volatile int*)__null) = 1014; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1015 ::new (KnownNotNull, &mStorage.val) T(std::forward<Args>(aArgs)...);
1016 mIsSome = true;
1017}
1018
1019/*
1020 * Some() creates a Maybe<T> value containing the provided T value. If T has a
1021 * move constructor, it's used to make this as efficient as possible.
1022 *
1023 * Some() selects the type of Maybe it returns by removing any const, volatile,
1024 * or reference qualifiers from the type of the value you pass to it. This gives
1025 * it more intuitive behavior when used in expressions, but it also means that
1026 * if you need to construct a Maybe value that holds a const, volatile, or
1027 * reference value, you need to use emplace() instead.
1028 */
1029template <typename T, typename U>
1030constexpr Maybe<U> Some(T&& aValue) {
1031 return {std::forward<T>(aValue), typename Maybe<U>::SomeGuard{}};
1032}
1033
1034template <typename T>
1035constexpr Maybe<T&> SomeRef(T& aValue) {
1036 Maybe<T&> value;
1037 value.emplace(aValue);
1038 return value;
1039}
1040
1041template <typename T>
1042constexpr Maybe<T&> ToMaybeRef(T* const aPtr) {
1043 return aPtr ? SomeRef(*aPtr) : Nothing{};
1044}
1045
1046template <typename T>
1047Maybe<std::remove_cv_t<std::remove_reference_t<T>>> ToMaybe(T* aPtr) {
1048 if (aPtr) {
1049 return Some(*aPtr);
1050 }
1051 return Nothing();
1052}
1053
1054/*
1055 * Two Maybe<T> values are equal if
1056 * - both are Nothing, or
1057 * - both are Some, and the values they contain are equal.
1058 */
1059template <typename T>
1060constexpr bool operator==(const Maybe<T>& aLHS, const Maybe<T>& aRHS) {
1061 static_assert(!std::is_reference_v<T>,
1062 "operator== is not defined for Maybe<T&>, compare values or "
1063 "addresses explicitly instead");
1064 if (aLHS.isNothing() != aRHS.isNothing()) {
1065 return false;
1066 }
1067 return aLHS.isNothing() || *aLHS == *aRHS;
1068}
1069
1070template <typename T>
1071constexpr bool operator!=(const Maybe<T>& aLHS, const Maybe<T>& aRHS) {
1072 return !(aLHS == aRHS);
1073}
1074
1075/*
1076 * We support comparison to Nothing to allow reasonable expressions like:
1077 * if (maybeValue == Nothing()) { ... }
1078 */
1079template <typename T>
1080constexpr bool operator==(const Maybe<T>& aLHS, const Nothing& aRHS) {
1081 return aLHS.isNothing();
1082}
1083
1084template <typename T>
1085constexpr bool operator!=(const Maybe<T>& aLHS, const Nothing& aRHS) {
1086 return !(aLHS == aRHS);
1087}
1088
1089template <typename T>
1090constexpr bool operator==(const Nothing& aLHS, const Maybe<T>& aRHS) {
1091 return aRHS.isNothing();
1092}
1093
1094template <typename T>
1095constexpr bool operator!=(const Nothing& aLHS, const Maybe<T>& aRHS) {
1096 return !(aLHS == aRHS);
1097}
1098
1099/*
1100 * Maybe<T> values are ordered in the same way T values are ordered, except that
1101 * Nothing comes before anything else.
1102 */
1103template <typename T>
1104constexpr bool operator<(const Maybe<T>& aLHS, const Maybe<T>& aRHS) {
1105 if (aLHS.isNothing()) {
1106 return aRHS.isSome();
1107 }
1108 if (aRHS.isNothing()) {
1109 return false;
1110 }
1111 return *aLHS < *aRHS;
1112}
1113
1114template <typename T>
1115constexpr bool operator>(const Maybe<T>& aLHS, const Maybe<T>& aRHS) {
1116 return !(aLHS < aRHS || aLHS == aRHS);
1117}
1118
1119template <typename T>
1120constexpr bool operator<=(const Maybe<T>& aLHS, const Maybe<T>& aRHS) {
1121 return aLHS < aRHS || aLHS == aRHS;
1122}
1123
1124template <typename T>
1125constexpr bool operator>=(const Maybe<T>& aLHS, const Maybe<T>& aRHS) {
1126 return !(aLHS < aRHS);
1127}
1128
1129template <typename T>
1130inline void ImplCycleCollectionTraverse(
1131 nsCycleCollectionTraversalCallback& aCallback, mozilla::Maybe<T>& aField,
1132 const char* aName, uint32_t aFlags = 0) {
1133 if (aField) {
1134 ImplCycleCollectionTraverse(aCallback, aField.ref(), aName, aFlags);
1135 }
1136}
1137
1138template <typename T>
1139inline void ImplCycleCollectionUnlink(mozilla::Maybe<T>& aField) {
1140 if (aField) {
1141 ImplCycleCollectionUnlink(aField.ref());
1142 }
1143}
1144
1145} // namespace mozilla
1146
1147#endif /* mozilla_Maybe_h */

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

1/* -*- Mode: C++; tab-width: 2; 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
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7/* Internal storage class used e.g. by Maybe and Result. This file doesn't
8 * contain any public declarations. */
9
10#ifndef mfbt_MaybeStorageBase_h
11#define mfbt_MaybeStorageBase_h
12
13#include <type_traits>
14#include <utility>
15
16namespace mozilla::detail {
17
18template <typename T>
19constexpr bool IsTriviallyDestructibleAndCopyable =
20 std::is_trivially_destructible_v<T> &&
21 (std::is_trivially_copy_constructible_v<T> ||
22 !std::is_copy_constructible_v<T>);
23
24template <typename T, bool TriviallyDestructibleAndCopyable =
25 IsTriviallyDestructibleAndCopyable<T>>
26struct MaybeStorageBase;
27
28template <typename T>
29struct MaybeStorageBase<T, false> {
30 protected:
31 using NonConstT = std::remove_const_t<T>;
32
33 union Union {
34 Union() {}
8
Returning without writing to 'this->val.stack'
35 explicit Union(const T& aVal) : val{aVal} {}
36 template <typename U,
37 typename = std::enable_if_t<std::is_move_constructible_v<U>>>
38 explicit Union(U&& aVal) : val{std::forward<U>(aVal)} {}
39 template <typename... Args>
40 explicit Union(std::in_place_t, Args&&... aArgs)
41 : val{std::forward<Args>(aArgs)...} {}
42
43 ~Union() {}
34
Calling '~Rooted'
44
45 NonConstT val;
46 } mStorage;
47
48 public:
49 MaybeStorageBase() = default;
7
Calling default constructor for 'Union'
9
Returning from default constructor for 'Union'
10
Returning without writing to 'this->mStorage.val.stack'
50 explicit MaybeStorageBase(const T& aVal) : mStorage{aVal} {}
51 explicit MaybeStorageBase(T&& aVal) : mStorage{std::move(aVal)} {}
52 template <typename... Args>
53 explicit MaybeStorageBase(std::in_place_t, Args&&... aArgs)
54 : mStorage{std::in_place, std::forward<Args>(aArgs)...} {}
55
56 const T* addr() const { return &mStorage.val; }
57 T* addr() { return &mStorage.val; }
58};
59
60template <typename T>
61struct MaybeStorageBase<T, true> {
62 protected:
63 using NonConstT = std::remove_const_t<T>;
64
65 union Union {
66 constexpr Union() : dummy() {}
67 constexpr explicit Union(const T& aVal) : val{aVal} {}
68 constexpr explicit Union(T&& aVal) : val{std::move(aVal)} {}
69 template <typename... Args>
70 constexpr explicit Union(std::in_place_t, Args&&... aArgs)
71 : val{std::forward<Args>(aArgs)...} {}
72
73 NonConstT val;
74 char dummy;
75 } mStorage;
76
77 public:
78 constexpr MaybeStorageBase() = default;
79 constexpr explicit MaybeStorageBase(const T& aVal) : mStorage{aVal} {}
80 constexpr explicit MaybeStorageBase(T&& aVal) : mStorage{std::move(aVal)} {}
81
82 template <typename... Args>
83 constexpr explicit MaybeStorageBase(std::in_place_t, Args&&... aArgs)
84 : mStorage{std::in_place, std::forward<Args>(aArgs)...} {}
85
86 constexpr const T* addr() const { return &mStorage.val; }
87 constexpr T* addr() { return &mStorage.val; }
88};
89
90} // namespace mozilla::detail
91
92#endif

/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.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#ifndef mozilla_dom_BindingUtils_h__
8#define mozilla_dom_BindingUtils_h__
9
10#include <type_traits>
11
12#include "jsfriendapi.h"
13#include "js/CharacterEncoding.h"
14#include "js/Conversions.h"
15#include "js/experimental/JitInfo.h" // JSJitGetterOp, JSJitInfo
16#include "js/friend/WindowProxy.h" // js::IsWindow, js::IsWindowProxy, js::ToWindowProxyIfWindow
17#include "js/MemoryFunctions.h"
18#include "js/Object.h" // JS::GetClass, JS::GetCompartment, JS::GetReservedSlot, JS::SetReservedSlot
19#include "js/RealmOptions.h"
20#include "js/String.h" // JS::GetLatin1LinearStringChars, JS::GetTwoByteLinearStringChars, JS::GetLinearStringLength, JS::LinearStringHasLatin1Chars, JS::StringHasLatin1Chars
21#include "js/Wrapper.h"
22#include "js/Zone.h"
23#include "mozilla/ArrayUtils.h"
24#include "mozilla/Array.h"
25#include "mozilla/Assertions.h"
26#include "mozilla/DeferredFinalize.h"
27#include "mozilla/EnumTypeTraits.h"
28#include "mozilla/EnumeratedRange.h"
29#include "mozilla/UniquePtr.h"
30#include "mozilla/dom/BindingCallContext.h"
31#include "mozilla/dom/BindingDeclarations.h"
32#include "mozilla/dom/DOMJSClass.h"
33#include "mozilla/dom/DOMJSProxyHandler.h"
34#include "mozilla/dom/JSSlots.h"
35#include "mozilla/dom/NonRefcountedDOMObject.h"
36#include "mozilla/dom/Nullable.h"
37#include "mozilla/dom/PrototypeList.h"
38#include "mozilla/dom/RemoteObjectProxy.h"
39#include "mozilla/SegmentedVector.h"
40#include "mozilla/ErrorResult.h"
41#include "mozilla/Likely.h"
42#include "mozilla/MemoryReporting.h"
43#include "nsIGlobalObject.h"
44#include "nsJSUtils.h"
45#include "nsISupportsImpl.h"
46#include "xpcObjectHelper.h"
47#include "xpcpublic.h"
48#include "nsIVariant.h"
49#include "mozilla/dom/FakeString.h"
50#include "mozilla/ProfilerLabels.h"
51
52#include "nsWrapperCacheInlines.h"
53
54class nsGlobalWindowInner;
55class nsGlobalWindowOuter;
56class nsIInterfaceRequestor;
57
58namespace mozilla {
59
60enum UseCounter : int16_t;
61enum class UseCounterWorker : int16_t;
62
63namespace dom {
64class CustomElementReactionsStack;
65class Document;
66class EventTarget;
67class MessageManagerGlobal;
68class ObservableArrayProxyHandler;
69class DedicatedWorkerGlobalScope;
70template <typename KeyType, typename ValueType>
71class Record;
72class WindowProxyHolder;
73
74enum class DeprecatedOperations : uint16_t;
75
76nsresult UnwrapArgImpl(JSContext* cx, JS::Handle<JSObject*> src,
77 const nsIID& iid, void** ppArg);
78
79/** Convert a jsval to an XPCOM pointer. Caller must not assume that src will
80 keep the XPCOM pointer rooted. */
81template <class Interface>
82inline nsresult UnwrapArg(JSContext* cx, JS::Handle<JSObject*> src,
83 Interface** ppArg) {
84 return UnwrapArgImpl(cx, src, NS_GET_TEMPLATE_IID(Interface)(Interface::template COMTypeInfo<Interface, void>::kIID
)
,
85 reinterpret_cast<void**>(ppArg));
86}
87
88nsresult UnwrapWindowProxyArg(JSContext* cx, JS::Handle<JSObject*> src,
89 WindowProxyHolder& ppArg);
90
91// Returns true if the JSClass is used for DOM objects.
92inline bool IsDOMClass(const JSClass* clasp) {
93 return clasp->flags & JSCLASS_IS_DOMJSCLASS;
94}
95
96// Return true if the JSClass is used for non-proxy DOM objects.
97inline bool IsNonProxyDOMClass(const JSClass* clasp) {
98 return IsDOMClass(clasp) && clasp->isNativeObject();
99}
100
101// Returns true if the JSClass is used for DOM interface and interface
102// prototype objects.
103inline bool IsDOMIfaceAndProtoClass(const JSClass* clasp) {
104 return clasp->flags & JSCLASS_IS_DOMIFACEANDPROTOJSCLASSJSCLASS_USERBIT2;
105}
106
107static_assert(DOM_OBJECT_SLOT0 == 0,
108 "DOM_OBJECT_SLOT doesn't match the proxy private slot. "
109 "Expect bad things");
110template <class T>
111inline T* UnwrapDOMObject(JSObject* obj) {
112 MOZ_ASSERT(IsDOMClass(JS::GetClass(obj)),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsDOMClass(JS::GetClass(obj)))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsDOMClass(JS::GetClass(obj)
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsDOMClass(JS::GetClass(obj))" " (" "Don't pass non-DOM objects to this function"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 113); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsDOMClass(JS::GetClass(obj))"
") (" "Don't pass non-DOM objects to this function" ")"); do
{ *((volatile int*)__null) = 113; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
113 "Don't pass non-DOM objects to this function")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsDOMClass(JS::GetClass(obj)))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsDOMClass(JS::GetClass(obj)
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsDOMClass(JS::GetClass(obj))" " (" "Don't pass non-DOM objects to this function"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 113); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsDOMClass(JS::GetClass(obj))"
") (" "Don't pass non-DOM objects to this function" ")"); do
{ *((volatile int*)__null) = 113; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
114
115 JS::Value val = JS::GetReservedSlot(obj, DOM_OBJECT_SLOT0);
116 return static_cast<T*>(val.toPrivate());
117}
118
119template <class T>
120inline T* UnwrapPossiblyNotInitializedDOMObject(JSObject* obj) {
121 // This is used by the OjectMoved JSClass hook which can be called before
122 // JS_NewObject has returned and so before we have a chance to set
123 // DOM_OBJECT_SLOT to anything useful.
124
125 MOZ_ASSERT(IsDOMClass(JS::GetClass(obj)),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsDOMClass(JS::GetClass(obj)))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsDOMClass(JS::GetClass(obj)
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsDOMClass(JS::GetClass(obj))" " (" "Don't pass non-DOM objects to this function"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 126); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsDOMClass(JS::GetClass(obj))"
") (" "Don't pass non-DOM objects to this function" ")"); do
{ *((volatile int*)__null) = 126; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
126 "Don't pass non-DOM objects to this function")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsDOMClass(JS::GetClass(obj)))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsDOMClass(JS::GetClass(obj)
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsDOMClass(JS::GetClass(obj))" " (" "Don't pass non-DOM objects to this function"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 126); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsDOMClass(JS::GetClass(obj))"
") (" "Don't pass non-DOM objects to this function" ")"); do
{ *((volatile int*)__null) = 126; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
127
128 JS::Value val = JS::GetReservedSlot(obj, DOM_OBJECT_SLOT0);
129 if (val.isUndefined()) {
130 return nullptr;
131 }
132 return static_cast<T*>(val.toPrivate());
133}
134
135inline const DOMJSClass* GetDOMClass(const JSClass* clasp) {
136 return IsDOMClass(clasp) ? DOMJSClass::FromJSClass(clasp) : nullptr;
137}
138
139inline const DOMJSClass* GetDOMClass(JSObject* obj) {
140 return GetDOMClass(JS::GetClass(obj));
141}
142
143inline nsISupports* UnwrapDOMObjectToISupports(JSObject* aObject) {
144 const DOMJSClass* clasp = GetDOMClass(aObject);
145 if (!clasp || !clasp->mDOMObjectIsISupports) {
146 return nullptr;
147 }
148
149 return UnwrapPossiblyNotInitializedDOMObject<nsISupports>(aObject);
150}
151
152inline bool IsDOMObject(JSObject* obj) { return IsDOMClass(JS::GetClass(obj)); }
153
154// There are two valid ways to use UNWRAP_OBJECT: Either obj needs to
155// be a MutableHandle<JSObject*>, or value needs to be a strong-reference
156// smart pointer type (OwningNonNull or RefPtr or nsCOMPtr), in which case obj
157// can be anything that converts to JSObject*.
158//
159// This can't be used with Window, EventTarget, or Location as the "Interface"
160// argument (and will fail a static_assert if you try to do that). Use
161// UNWRAP_MAYBE_CROSS_ORIGIN_OBJECT to unwrap to those interfaces.
162#define UNWRAP_OBJECT(Interface, obj, value)mozilla::dom::binding_detail::UnwrapObjectWithCrossOriginAsserts
< mozilla::dom::prototypes::id::Interface, mozilla::dom::Interface_Binding
::NativeType>(obj, value)
\
163 mozilla::dom::binding_detail::UnwrapObjectWithCrossOriginAsserts< \
164 mozilla::dom::prototypes::id::Interface, \
165 mozilla::dom::Interface##_Binding::NativeType>(obj, value)
166
167// UNWRAP_MAYBE_CROSS_ORIGIN_OBJECT is just like UNWRAP_OBJECT but requires a
168// JSContext in a Realm that represents "who is doing the unwrapping?" to
169// properly unwrap the object.
170#define UNWRAP_MAYBE_CROSS_ORIGIN_OBJECT(Interface, obj, value, cx)mozilla::dom::UnwrapObject<mozilla::dom::prototypes::id::Interface
, mozilla::dom::Interface_Binding::NativeType>( obj, value
, cx)
\
171 mozilla::dom::UnwrapObject<mozilla::dom::prototypes::id::Interface, \
172 mozilla::dom::Interface##_Binding::NativeType>( \
173 obj, value, cx)
174
175// Test whether the given object is an instance of the given interface.
176#define IS_INSTANCE_OF(Interface, obj)mozilla::dom::IsInstanceOf<mozilla::dom::prototypes::id::Interface
, mozilla::dom::Interface_Binding::NativeType>( obj)
\
177 mozilla::dom::IsInstanceOf<mozilla::dom::prototypes::id::Interface, \
178 mozilla::dom::Interface##_Binding::NativeType>( \
179 obj)
180
181// Unwrap the given non-wrapper object. This can be used with any obj that
182// converts to JSObject*; as long as that JSObject* is live the return value
183// will be valid.
184#define UNWRAP_NON_WRAPPER_OBJECT(Interface, obj, value)mozilla::dom::UnwrapNonWrapperObject< mozilla::dom::prototypes
::id::Interface, mozilla::dom::Interface_Binding::NativeType>
(obj, value)
\
185 mozilla::dom::UnwrapNonWrapperObject< \
186 mozilla::dom::prototypes::id::Interface, \
187 mozilla::dom::Interface##_Binding::NativeType>(obj, value)
188
189// Some callers don't want to set an exception when unwrapping fails
190// (for example, overload resolution uses unwrapping to tell what sort
191// of thing it's looking at).
192// U must be something that a T* can be assigned to (e.g. T* or an RefPtr<T>).
193//
194// The obj argument will be mutated to point to CheckedUnwrap of itself if the
195// passed-in value is not a DOM object and CheckedUnwrap succeeds.
196//
197// If mayBeWrapper is true, there are three valid ways to invoke
198// UnwrapObjectInternal: Either obj needs to be a class wrapping a
199// MutableHandle<JSObject*>, with an assignment operator that sets the handle to
200// the given object, or U needs to be a strong-reference smart pointer type
201// (OwningNonNull or RefPtr or nsCOMPtr), or the value being stored in "value"
202// must not escape past being tested for falsiness immediately after the
203// UnwrapObjectInternal call.
204//
205// If mayBeWrapper is false, obj can just be a JSObject*, and U anything that a
206// T* can be assigned to.
207//
208// The cx arg is in practice allowed to be either nullptr or JSContext* or a
209// BindingCallContext reference. If it's nullptr we will do a
210// CheckedUnwrapStatic and it's the caller's responsibility to make sure they're
211// not trying to work with Window or Location objects. Otherwise we'll do a
212// CheckedUnwrapDynamic. This all only matters if mayBeWrapper is true; if it's
213// false just pass nullptr for the cx arg.
214namespace binding_detail {
215template <class T, bool mayBeWrapper, typename U, typename V, typename CxType>
216MOZ_ALWAYS_INLINEinline nsresult UnwrapObjectInternal(V& obj, U& value,
217 prototypes::ID protoID,
218 uint32_t protoDepth,
219 const CxType& cx) {
220 static_assert(std::is_same_v<CxType, JSContext*> ||
221 std::is_same_v<CxType, BindingCallContext> ||
222 std::is_same_v<CxType, decltype(nullptr)>,
223 "Unexpected CxType");
224
225 /* First check to see whether we have a DOM object */
226 const DOMJSClass* domClass = GetDOMClass(obj);
227 if (domClass) {
228 /* This object is a DOM object. Double-check that it is safely
229 castable to T by checking whether it claims to inherit from the
230 class identified by protoID. */
231 if (domClass->mInterfaceChain[protoDepth] == protoID) {
232 value = UnwrapDOMObject<T>(obj);
233 return NS_OK;
234 }
235 }
236
237 /* Maybe we have a security wrapper or outer window? */
238 if (!mayBeWrapper || !js::IsWrapper(obj)) {
239 // For non-cross-origin-accessible methods and properties, remote object
240 // proxies should behave the same as opaque wrappers.
241 if (IsRemoteObjectProxy(obj)) {
242 return NS_ERROR_XPC_SECURITY_MANAGER_VETO;
243 }
244
245 /* Not a DOM object, not a wrapper, just bail */
246 return NS_ERROR_XPC_BAD_CONVERT_JS;
247 }
248
249 JSObject* unwrappedObj;
250 if (std::is_same_v<CxType, decltype(nullptr)>) {
251 unwrappedObj = js::CheckedUnwrapStatic(obj);
252 } else {
253 unwrappedObj =
254 js::CheckedUnwrapDynamic(obj, cx, /* stopAtWindowProxy = */ false);
255 }
256 if (!unwrappedObj) {
257 return NS_ERROR_XPC_SECURITY_MANAGER_VETO;
258 }
259
260 if (std::is_same_v<CxType, decltype(nullptr)>) {
261 // We might still have a windowproxy here. But it shouldn't matter, because
262 // that's not what the caller is looking for, so we're going to fail out
263 // anyway below once we do the recursive call to ourselves with wrapper
264 // unwrapping disabled.
265 MOZ_ASSERT(!js::IsWrapper(unwrappedObj) || js::IsWindowProxy(unwrappedObj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(unwrappedObj) || js::IsWindowProxy(unwrappedObj
))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(!js::IsWrapper(unwrappedObj) || js::IsWindowProxy(unwrappedObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(unwrappedObj) || js::IsWindowProxy(unwrappedObj)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 265); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!js::IsWrapper(unwrappedObj) || js::IsWindowProxy(unwrappedObj)"
")"); do { *((volatile int*)__null) = 265; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
266 } else {
267 // We shouldn't have a wrapper by now.
268 MOZ_ASSERT(!js::IsWrapper(unwrappedObj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(unwrappedObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(unwrappedObj)
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"!js::IsWrapper(unwrappedObj)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 268); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!js::IsWrapper(unwrappedObj)"
")"); do { *((volatile int*)__null) = 268; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
269 }
270
271 // Recursive call is OK, because now we're using false for mayBeWrapper and
272 // we never reach this code if that boolean is false, so can't keep calling
273 // ourselves.
274 //
275 // Unwrap into a temporary pointer, because in general unwrapping into
276 // something of type U might trigger GC (e.g. release the value currently
277 // stored in there, with arbitrary consequences) and invalidate the
278 // "unwrappedObj" pointer.
279 T* tempValue = nullptr;
280 nsresult rv = UnwrapObjectInternal<T, false>(unwrappedObj, tempValue, protoID,
281 protoDepth, nullptr);
282 if (NS_SUCCEEDED(rv)((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1)))) {
283 // Suppress a hazard related to keeping tempValue alive across
284 // UnwrapObjectInternal, because the analysis can't tell that this function
285 // will not GC if maybeWrapped=False and we've already gone through a level
286 // of unwrapping so unwrappedObj will be !IsWrapper.
287 JS::AutoSuppressGCAnalysis suppress;
288
289 // It's very important to not update "obj" with the "unwrappedObj" value
290 // until we know the unwrap has succeeded. Otherwise, in a situation in
291 // which we have an overload of object and primitive we could end up
292 // converting to the primitive from the unwrappedObj, whereas we want to do
293 // it from the original object.
294 obj = unwrappedObj;
295 // And now assign to "value"; at this point we don't care if a GC happens
296 // and invalidates unwrappedObj.
297 value = tempValue;
298 return NS_OK;
299 }
300
301 /* It's the wrong sort of DOM object */
302 return NS_ERROR_XPC_BAD_CONVERT_JS;
303}
304
305struct MutableObjectHandleWrapper {
306 explicit MutableObjectHandleWrapper(JS::MutableHandle<JSObject*> aHandle)
307 : mHandle(aHandle) {}
308
309 void operator=(JSObject* aObject) {
310 MOZ_ASSERT(aObject)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(aObject)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(aObject))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("aObject", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 310); AnnotateMozCrashReason("MOZ_ASSERT" "(" "aObject" ")"
); do { *((volatile int*)__null) = 310; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
311 mHandle.set(aObject);
312 }
313
314 operator JSObject*() const { return mHandle; }
315
316 private:
317 JS::MutableHandle<JSObject*> mHandle;
318};
319
320struct MutableValueHandleWrapper {
321 explicit MutableValueHandleWrapper(JS::MutableHandle<JS::Value> aHandle)
322 : mHandle(aHandle) {}
323
324 void operator=(JSObject* aObject) {
325 MOZ_ASSERT(aObject)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(aObject)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(aObject))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("aObject", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 325); AnnotateMozCrashReason("MOZ_ASSERT" "(" "aObject" ")"
); do { *((volatile int*)__null) = 325; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
326#ifdef ENABLE_RECORD_TUPLE
327 MOZ_ASSERT(!js::gc::MaybeForwardedIsExtendedPrimitive(*aObject))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::gc::MaybeForwardedIsExtendedPrimitive(*aObject)
)>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(!js::gc::MaybeForwardedIsExtendedPrimitive(*aObject)
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"!js::gc::MaybeForwardedIsExtendedPrimitive(*aObject)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 327); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!js::gc::MaybeForwardedIsExtendedPrimitive(*aObject)"
")"); do { *((volatile int*)__null) = 327; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
328#endif
329 mHandle.setObject(*aObject);
330 }
331
332 operator JSObject*() const { return &mHandle.toObject(); }
333
334 private:
335 JS::MutableHandle<JS::Value> mHandle;
336};
337
338} // namespace binding_detail
339
340// UnwrapObject overloads that ensure we have a MutableHandle to keep it alive.
341template <prototypes::ID PrototypeID, class T, typename U, typename CxType>
342MOZ_ALWAYS_INLINEinline nsresult UnwrapObject(JS::MutableHandle<JSObject*> obj,
343 U& value, const CxType& cx) {
344 binding_detail::MutableObjectHandleWrapper wrapper(obj);
345 return binding_detail::UnwrapObjectInternal<T, true>(
346 wrapper, value, PrototypeID, PrototypeTraits<PrototypeID>::Depth, cx);
347}
348
349template <prototypes::ID PrototypeID, class T, typename U, typename CxType>
350MOZ_ALWAYS_INLINEinline nsresult UnwrapObject(JS::MutableHandle<JS::Value> obj,
351 U& value, const CxType& cx) {
352 MOZ_ASSERT(obj.isObject())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(obj.isObject())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(obj.isObject()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("obj.isObject()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 352); AnnotateMozCrashReason("MOZ_ASSERT" "(" "obj.isObject()"
")"); do { *((volatile int*)__null) = 352; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
353 binding_detail::MutableValueHandleWrapper wrapper(obj);
354 return binding_detail::UnwrapObjectInternal<T, true>(
355 wrapper, value, PrototypeID, PrototypeTraits<PrototypeID>::Depth, cx);
356}
357
358// UnwrapObject overloads that ensure we have a strong ref to keep it alive.
359template <prototypes::ID PrototypeID, class T, typename U, typename CxType>
360MOZ_ALWAYS_INLINEinline nsresult UnwrapObject(JSObject* obj, RefPtr<U>& value,
361 const CxType& cx) {
362 return binding_detail::UnwrapObjectInternal<T, true>(
363 obj, value, PrototypeID, PrototypeTraits<PrototypeID>::Depth, cx);
364}
365
366template <prototypes::ID PrototypeID, class T, typename U, typename CxType>
367MOZ_ALWAYS_INLINEinline nsresult UnwrapObject(JSObject* obj, nsCOMPtr<U>& value,
368 const CxType& cx) {
369 return binding_detail::UnwrapObjectInternal<T, true>(
370 obj, value, PrototypeID, PrototypeTraits<PrototypeID>::Depth, cx);
371}
372
373template <prototypes::ID PrototypeID, class T, typename U, typename CxType>
374MOZ_ALWAYS_INLINEinline nsresult UnwrapObject(JSObject* obj, OwningNonNull<U>& value,
375 const CxType& cx) {
376 return binding_detail::UnwrapObjectInternal<T, true>(
377 obj, value, PrototypeID, PrototypeTraits<PrototypeID>::Depth, cx);
378}
379
380template <prototypes::ID PrototypeID, class T, typename U, typename CxType>
381MOZ_ALWAYS_INLINEinline nsresult UnwrapObject(JSObject* obj, NonNull<U>& value,
382 const CxType& cx) {
383 return binding_detail::UnwrapObjectInternal<T, true>(
384 obj, value, PrototypeID, PrototypeTraits<PrototypeID>::Depth, cx);
385}
386
387// An UnwrapObject overload that just calls one of the JSObject* ones.
388template <prototypes::ID PrototypeID, class T, typename U, typename CxType>
389MOZ_ALWAYS_INLINEinline nsresult UnwrapObject(JS::Handle<JS::Value> obj, U& value,
390 const CxType& cx) {
391 MOZ_ASSERT(obj.isObject())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(obj.isObject())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(obj.isObject()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("obj.isObject()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 391); AnnotateMozCrashReason("MOZ_ASSERT" "(" "obj.isObject()"
")"); do { *((volatile int*)__null) = 391; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
392 return UnwrapObject<PrototypeID, T>(&obj.toObject(), value, cx);
393}
394
395template <prototypes::ID PrototypeID, class T, typename U, typename CxType>
396MOZ_ALWAYS_INLINEinline nsresult UnwrapObject(JS::Handle<JS::Value> obj,
397 NonNull<U>& value, const CxType& cx) {
398 MOZ_ASSERT(obj.isObject())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(obj.isObject())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(obj.isObject()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("obj.isObject()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 398); AnnotateMozCrashReason("MOZ_ASSERT" "(" "obj.isObject()"
")"); do { *((volatile int*)__null) = 398; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
399 return UnwrapObject<PrototypeID, T>(&obj.toObject(), value, cx);
400}
401
402template <prototypes::ID PrototypeID>
403MOZ_ALWAYS_INLINEinline void AssertStaticUnwrapOK() {
404 static_assert(PrototypeID != prototypes::id::Window,
405 "Can't do static unwrap of WindowProxy; use "
406 "UNWRAP_MAYBE_CROSS_ORIGIN_OBJECT or a cross-origin-object "
407 "aware version of IS_INSTANCE_OF");
408 static_assert(PrototypeID != prototypes::id::EventTarget,
409 "Can't do static unwrap of WindowProxy (which an EventTarget "
410 "might be); use UNWRAP_MAYBE_CROSS_ORIGIN_OBJECT or a "
411 "cross-origin-object aware version of IS_INSTANCE_OF");
412 static_assert(PrototypeID != prototypes::id::Location,
413 "Can't do static unwrap of Location; use "
414 "UNWRAP_MAYBE_CROSS_ORIGIN_OBJECT or a cross-origin-object "
415 "aware version of IS_INSTANCE_OF");
416}
417
418namespace binding_detail {
419// This function is just here so we can do some static asserts in a centralized
420// place instead of putting them in every single UnwrapObject overload.
421template <prototypes::ID PrototypeID, class T, typename U, typename V>
422MOZ_ALWAYS_INLINEinline nsresult UnwrapObjectWithCrossOriginAsserts(V&& obj,
423 U& value) {
424 AssertStaticUnwrapOK<PrototypeID>();
425 return UnwrapObject<PrototypeID, T>(obj, value, nullptr);
426}
427} // namespace binding_detail
428
429template <prototypes::ID PrototypeID, class T>
430MOZ_ALWAYS_INLINEinline bool IsInstanceOf(JSObject* obj) {
431 AssertStaticUnwrapOK<PrototypeID>();
432 void* ignored;
433 nsresult unwrapped = binding_detail::UnwrapObjectInternal<T, true>(
434 obj, ignored, PrototypeID, PrototypeTraits<PrototypeID>::Depth, nullptr);
435 return NS_SUCCEEDED(unwrapped)((bool)(__builtin_expect(!!(!NS_FAILED_impl(unwrapped)), 1)));
436}
437
438template <prototypes::ID PrototypeID, class T, typename U>
439MOZ_ALWAYS_INLINEinline nsresult UnwrapNonWrapperObject(JSObject* obj, U& value) {
440 MOZ_ASSERT(!js::IsWrapper(obj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(obj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(obj)))), 0)))
{ do { } while (false); MOZ_ReportAssertionFailure("!js::IsWrapper(obj)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 440); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!js::IsWrapper(obj)"
")"); do { *((volatile int*)__null) = 440; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
441 return binding_detail::UnwrapObjectInternal<T, false>(
442 obj, value, PrototypeID, PrototypeTraits<PrototypeID>::Depth, nullptr);
443}
444
445MOZ_ALWAYS_INLINEinline bool IsConvertibleToDictionary(JS::Handle<JS::Value> val) {
446 return val.isNullOrUndefined() || val.isObject();
447}
448
449// The items in the protoAndIfaceCache are indexed by the prototypes::id::ID,
450// constructors::id::ID and namedpropertiesobjects::id::ID enums, in that order.
451// The end of the prototype objects should be the start of the interface
452// objects, and the end of the interface objects should be the start of the
453// named properties objects.
454static_assert((size_t)constructors::id::_ID_Start ==
455 (size_t)prototypes::id::_ID_Count &&
456 (size_t)namedpropertiesobjects::id::_ID_Start ==
457 (size_t)constructors::id::_ID_Count,
458 "Overlapping or discontiguous indexes.");
459const size_t kProtoAndIfaceCacheCount = namedpropertiesobjects::id::_ID_Count;
460
461class ProtoAndIfaceCache {
462 // The caching strategy we use depends on what sort of global we're dealing
463 // with. For a window-like global, we want everything to be as fast as
464 // possible, so we use a flat array, indexed by prototype/constructor ID.
465 // For everything else (e.g. globals for JSMs), space is more important than
466 // speed, so we use a two-level lookup table.
467
468 class ArrayCache
469 : public Array<JS::Heap<JSObject*>, kProtoAndIfaceCacheCount> {
470 public:
471 bool HasEntryInSlot(size_t i) {
472 // Do an explicit call to the Heap<…> bool conversion operator. Because
473 // that operator is marked explicit we'd otherwise end up doing an
474 // implicit cast to JSObject* first, causing an unnecessary call to
475 // exposeToActiveJS().
476 return bool((*this)[i]);
477 }
478
479 JS::Heap<JSObject*>& EntrySlotOrCreate(size_t i) { return (*this)[i]; }
480
481 JS::Heap<JSObject*>& EntrySlotMustExist(size_t i) { return (*this)[i]; }
482
483 void Trace(JSTracer* aTracer) {
484 for (size_t i = 0; i < ArrayLength(*this); ++i) {
485 JS::TraceEdge(aTracer, &(*this)[i], "protoAndIfaceCache[i]");
486 }
487 }
488
489 size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) {
490 return aMallocSizeOf(this);
491 }
492 };
493
494 class PageTableCache {
495 public:
496 PageTableCache() { memset(mPages.begin(), 0, sizeof(mPages)); }
497
498 ~PageTableCache() {
499 for (size_t i = 0; i < ArrayLength(mPages); ++i) {
500 delete mPages[i];
501 }
502 }
503
504 bool HasEntryInSlot(size_t i) {
505 MOZ_ASSERT(i < kProtoAndIfaceCacheCount)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(i < kProtoAndIfaceCacheCount)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(i < kProtoAndIfaceCacheCount
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"i < kProtoAndIfaceCacheCount", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 505); AnnotateMozCrashReason("MOZ_ASSERT" "(" "i < kProtoAndIfaceCacheCount"
")"); do { *((volatile int*)__null) = 505; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
506 size_t pageIndex = i / kPageSize;
507 size_t leafIndex = i % kPageSize;
508 Page* p = mPages[pageIndex];
509 if (!p) {
510 return false;
511 }
512 // Do an explicit call to the Heap<…> bool conversion operator. Because
513 // that operator is marked explicit we'd otherwise end up doing an
514 // implicit cast to JSObject* first, causing an unnecessary call to
515 // exposeToActiveJS().
516 return bool((*p)[leafIndex]);
517 }
518
519 JS::Heap<JSObject*>& EntrySlotOrCreate(size_t i) {
520 MOZ_ASSERT(i < kProtoAndIfaceCacheCount)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(i < kProtoAndIfaceCacheCount)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(i < kProtoAndIfaceCacheCount
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"i < kProtoAndIfaceCacheCount", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 520); AnnotateMozCrashReason("MOZ_ASSERT" "(" "i < kProtoAndIfaceCacheCount"
")"); do { *((volatile int*)__null) = 520; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
521 size_t pageIndex = i / kPageSize;
522 size_t leafIndex = i % kPageSize;
523 Page* p = mPages[pageIndex];
524 if (!p) {
525 p = new Page;
526 mPages[pageIndex] = p;
527 }
528 return (*p)[leafIndex];
529 }
530
531 JS::Heap<JSObject*>& EntrySlotMustExist(size_t i) {
532 MOZ_ASSERT(i < kProtoAndIfaceCacheCount)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(i < kProtoAndIfaceCacheCount)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(i < kProtoAndIfaceCacheCount
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"i < kProtoAndIfaceCacheCount", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 532); AnnotateMozCrashReason("MOZ_ASSERT" "(" "i < kProtoAndIfaceCacheCount"
")"); do { *((volatile int*)__null) = 532; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
533 size_t pageIndex = i / kPageSize;
534 size_t leafIndex = i % kPageSize;
535 Page* p = mPages[pageIndex];
536 MOZ_ASSERT(p)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(p)>::isValid, "invalid assertion condition"); if (
(__builtin_expect(!!(!(!!(p))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("p", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 536); AnnotateMozCrashReason("MOZ_ASSERT" "(" "p" ")"); do {
*((volatile int*)__null) = 536; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
537 return (*p)[leafIndex];
538 }
539
540 void Trace(JSTracer* trc) {
541 for (size_t i = 0; i < ArrayLength(mPages); ++i) {
542 Page* p = mPages[i];
543 if (p) {
544 for (size_t j = 0; j < ArrayLength(*p); ++j) {
545 JS::TraceEdge(trc, &(*p)[j], "protoAndIfaceCache[i]");
546 }
547 }
548 }
549 }
550
551 size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) {
552 size_t n = aMallocSizeOf(this);
553 for (size_t i = 0; i < ArrayLength(mPages); ++i) {
554 n += aMallocSizeOf(mPages[i]);
555 }
556 return n;
557 }
558
559 private:
560 static const size_t kPageSize = 16;
561 typedef Array<JS::Heap<JSObject*>, kPageSize> Page;
562 static const size_t kNPages =
563 kProtoAndIfaceCacheCount / kPageSize +
564 size_t(bool(kProtoAndIfaceCacheCount % kPageSize));
565 Array<Page*, kNPages> mPages;
566 };
567
568 public:
569 enum Kind { WindowLike, NonWindowLike };
570
571 explicit ProtoAndIfaceCache(Kind aKind) : mKind(aKind) {
572 MOZ_COUNT_CTOR(ProtoAndIfaceCache)do { static_assert(std::is_class_v<ProtoAndIfaceCache>,
"Token '" "ProtoAndIfaceCache" "' is not a class type."); static_assert
(!std::is_base_of<nsISupports, ProtoAndIfaceCache>::value
, "nsISupports classes don't need to call MOZ_COUNT_CTOR or "
"MOZ_COUNT_DTOR");; NS_LogCtor((void*)this, "ProtoAndIfaceCache"
, sizeof(*this)); } while (0)
;
573 if (aKind == WindowLike) {
574 mArrayCache = new ArrayCache();
575 } else {
576 mPageTableCache = new PageTableCache();
577 }
578 }
579
580 ~ProtoAndIfaceCache() {
581 if (mKind == WindowLike) {
582 delete mArrayCache;
583 } else {
584 delete mPageTableCache;
585 }
586 MOZ_COUNT_DTOR(ProtoAndIfaceCache)do { static_assert(std::is_class_v<ProtoAndIfaceCache>,
"Token '" "ProtoAndIfaceCache" "' is not a class type."); static_assert
(!std::is_base_of<nsISupports, ProtoAndIfaceCache>::value
, "nsISupports classes don't need to call MOZ_COUNT_CTOR or "
"MOZ_COUNT_DTOR");; NS_LogDtor((void*)this, "ProtoAndIfaceCache"
, sizeof(*this)); } while (0)
;
587 }
588
589#define FORWARD_OPERATION(opName, args) \
590 do { \
591 if (mKind == WindowLike) { \
592 return mArrayCache->opName args; \
593 } else { \
594 return mPageTableCache->opName args; \
595 } \
596 } while (0)
597
598 // Return whether slot i contains an object. This doesn't return the object
599 // itself because in practice consumers just want to know whether it's there
600 // or not, and that doesn't require barriering, which returning the object
601 // pointer does.
602 bool HasEntryInSlot(size_t i) { FORWARD_OPERATION(HasEntryInSlot, (i)); }
603
604 // Return a reference to slot i, creating it if necessary. There
605 // may not be an object in the returned slot.
606 JS::Heap<JSObject*>& EntrySlotOrCreate(size_t i) {
607 FORWARD_OPERATION(EntrySlotOrCreate, (i));
608 }
609
610 // Return a reference to slot i, which is guaranteed to already
611 // exist. There may not be an object in the slot, if prototype and
612 // constructor initialization for one of our bindings failed.
613 JS::Heap<JSObject*>& EntrySlotMustExist(size_t i) {
614 FORWARD_OPERATION(EntrySlotMustExist, (i));
615 }
616
617 void Trace(JSTracer* aTracer) { FORWARD_OPERATION(Trace, (aTracer)); }
618
619 size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) {
620 size_t n = aMallocSizeOf(this);
621 n += (mKind == WindowLike
622 ? mArrayCache->SizeOfIncludingThis(aMallocSizeOf)
623 : mPageTableCache->SizeOfIncludingThis(aMallocSizeOf));
624 return n;
625 }
626#undef FORWARD_OPERATION
627
628 private:
629 union {
630 ArrayCache* mArrayCache;
631 PageTableCache* mPageTableCache;
632 };
633 Kind mKind;
634};
635
636inline void AllocateProtoAndIfaceCache(JSObject* obj,
637 ProtoAndIfaceCache::Kind aKind) {
638 MOZ_ASSERT(JS::GetClass(obj)->flags & JSCLASS_DOM_GLOBAL)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS::GetClass(obj)->flags & JSCLASS_USERBIT1)>
::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(JS::GetClass(obj)->flags & JSCLASS_USERBIT1))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS::GetClass(obj)->flags & JSCLASS_USERBIT1"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 638); AnnotateMozCrashReason("MOZ_ASSERT" "(" "JS::GetClass(obj)->flags & JSCLASS_USERBIT1"
")"); do { *((volatile int*)__null) = 638; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
639 MOZ_ASSERT(JS::GetReservedSlot(obj, DOM_PROTOTYPE_SLOT).isUndefined())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS::GetReservedSlot(obj, JSCLASS_GLOBAL_SLOT_COUNT).
isUndefined())>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(JS::GetReservedSlot(obj, JSCLASS_GLOBAL_SLOT_COUNT
).isUndefined()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("JS::GetReservedSlot(obj, JSCLASS_GLOBAL_SLOT_COUNT).isUndefined()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 639); AnnotateMozCrashReason("MOZ_ASSERT" "(" "JS::GetReservedSlot(obj, JSCLASS_GLOBAL_SLOT_COUNT).isUndefined()"
")"); do { *((volatile int*)__null) = 639; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
640
641 ProtoAndIfaceCache* protoAndIfaceCache = new ProtoAndIfaceCache(aKind);
642
643 JS::SetReservedSlot(obj, DOM_PROTOTYPE_SLOTJSCLASS_GLOBAL_SLOT_COUNT,
644 JS::PrivateValue(protoAndIfaceCache));
645}
646
647#ifdef DEBUG1
648struct VerifyTraceProtoAndIfaceCacheCalledTracer : public JS::CallbackTracer {
649 bool ok;
650
651 explicit VerifyTraceProtoAndIfaceCacheCalledTracer(JSContext* cx)
652 : JS::CallbackTracer(cx, JS::TracerKind::VerifyTraceProtoAndIface),
653 ok(false) {}
654
655 void onChild(JS::GCCellPtr, const char* name) override {
656 // We don't do anything here, we only want to verify that
657 // TraceProtoAndIfaceCache was called.
658 }
659};
660#endif
661
662inline void TraceProtoAndIfaceCache(JSTracer* trc, JSObject* obj) {
663 MOZ_ASSERT(JS::GetClass(obj)->flags & JSCLASS_DOM_GLOBAL)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS::GetClass(obj)->flags & JSCLASS_USERBIT1)>
::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(JS::GetClass(obj)->flags & JSCLASS_USERBIT1))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS::GetClass(obj)->flags & JSCLASS_USERBIT1"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 663); AnnotateMozCrashReason("MOZ_ASSERT" "(" "JS::GetClass(obj)->flags & JSCLASS_USERBIT1"
")"); do { *((volatile int*)__null) = 663; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
664
665#ifdef DEBUG1
666 if (trc->kind() == JS::TracerKind::VerifyTraceProtoAndIface) {
667 // We don't do anything here, we only want to verify that
668 // TraceProtoAndIfaceCache was called.
669 static_cast<VerifyTraceProtoAndIfaceCacheCalledTracer*>(trc)->ok = true;
670 return;
671 }
672#endif
673
674 if (!DOMGlobalHasProtoAndIFaceCache(obj)) return;
675 ProtoAndIfaceCache* protoAndIfaceCache = GetProtoAndIfaceCache(obj);
676 protoAndIfaceCache->Trace(trc);
677}
678
679inline void DestroyProtoAndIfaceCache(JSObject* obj) {
680 MOZ_ASSERT(JS::GetClass(obj)->flags & JSCLASS_DOM_GLOBAL)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS::GetClass(obj)->flags & JSCLASS_USERBIT1)>
::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(JS::GetClass(obj)->flags & JSCLASS_USERBIT1))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS::GetClass(obj)->flags & JSCLASS_USERBIT1"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 680); AnnotateMozCrashReason("MOZ_ASSERT" "(" "JS::GetClass(obj)->flags & JSCLASS_USERBIT1"
")"); do { *((volatile int*)__null) = 680; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
681
682 if (!DOMGlobalHasProtoAndIFaceCache(obj)) {
683 return;
684 }
685
686 ProtoAndIfaceCache* protoAndIfaceCache = GetProtoAndIfaceCache(obj);
687
688 delete protoAndIfaceCache;
689}
690
691/**
692 * Add constants to an object.
693 */
694bool DefineConstants(JSContext* cx, JS::Handle<JSObject*> obj,
695 const ConstantSpec* cs);
696
697struct JSNativeHolder {
698 JSNative mNative;
699 const NativePropertyHooks* mPropertyHooks;
700};
701
702// Struct for holding information for WebIDL interface objects (which are
703// function objects). A pointer to this struct is held in the first reserved
704// slot of the function object.
705struct DOMInterfaceInfo {
706 JSNativeHolder nativeHolder;
707
708 ProtoGetter mGetParentProto;
709
710 const prototypes::ID mPrototypeID; // uint16_t
711 const uint32_t mDepth;
712
713 // Boolean indicating whether this object wants a isInstance property
714 // pointing to InterfaceIsInstance defined on it. Only ever true for
715 // interfaces.
716 bool wantsInterfaceIsInstance;
717};
718
719struct LegacyFactoryFunction {
720 const char* mName;
721 const JSNativeHolder mHolder;
722 unsigned mNargs;
723};
724
725namespace binding_detail {
726
727void CreateInterfaceObjects(
728 JSContext* cx, JS::Handle<JSObject*> global,
729 JS::Handle<JSObject*> protoProto, const DOMIfaceAndProtoJSClass* protoClass,
730 JS::Heap<JSObject*>* protoCache, JS::Handle<JSObject*> interfaceProto,
731 const DOMInterfaceInfo* interfaceInfo, unsigned ctorNargs,
732 bool isConstructorChromeOnly,
733 const Span<const LegacyFactoryFunction>& legacyFactoryFunctions,
734 JS::Heap<JSObject*>* constructorCache, const NativeProperties* properties,
735 const NativeProperties* chromeOnlyProperties, const char* name,
736 bool defineOnGlobal, const char* const* unscopableNames, bool isGlobal,
737 const char* const* legacyWindowAliases);
738
739} // namespace binding_detail
740
741// clang-format off
742/*
743 * Create a DOM interface object (if constructorClass is non-null) and/or a
744 * DOM interface prototype object (if protoClass is non-null).
745 *
746 * global is used as the parent of the interface object and the interface
747 * prototype object
748 * protoProto is the prototype to use for the interface prototype object.
749 * protoClass is the JSClass to use for the interface prototype object.
750 * This is null if we should not create an interface prototype
751 * object.
752 * protoCache a pointer to a JSObject pointer where we should cache the
753 * interface prototype object. This must be null if protoClass is and
754 * vice versa.
755 * interfaceProto is the prototype to use for the interface object. This can be
756 * null if interfaceInfo is null (as in, if we're not creating an
757 * interface object at all).
758 * interfaceInfo is the info to use for the interface object. This can be null
759 * if we're not creating an interface object.
760 * ctorNargs is the length of the constructor function; 0 if no constructor
761 * isConstructorChromeOnly if true, the constructor is ChromeOnly.
762 * legacyFactoryFunctions the legacy factory functions (can be empty)
763 * constructorCache a pointer to a JSObject pointer where we should cache the
764 * interface object. This must be null if both constructorClass
765 * and constructor are null, and non-null otherwise.
766 * properties contains the methods, attributes and constants to be defined on
767 * objects in any compartment.
768 * chromeProperties contains the methods, attributes and constants to be defined
769 * on objects in chrome compartments. This must be null if the
770 * interface doesn't have any ChromeOnly properties or if the
771 * object is being created in non-chrome compartment.
772 * name the name to use for 1) the WebIDL class string, which is the value
773 * that's used for @@toStringTag, 2) the name property for interface
774 * objects and 3) the property on the global object that would be set to
775 * the interface object. In general this is the interface identifier.
776 * LegacyNamespace would expect something different for 1), but we don't
777 * support that. The class string for default iterator objects is not
778 * usable as 2) or 3), but default iterator objects don't have an interface
779 * object.
780 * defineOnGlobal controls whether properties should be defined on the given
781 * global for the interface object (if any) and named
782 * constructors (if any) for this interface. This can be
783 * false in situations where we want the properties to only
784 * appear on privileged Xrays but not on the unprivileged
785 * underlying global.
786 * unscopableNames if not null it points to a null-terminated list of const
787 * char* names of the unscopable properties for this interface.
788 * isGlobal if true, we're creating interface objects for a [Global] interface,
789 * and hence shouldn't define properties on the prototype object.
790 * legacyWindowAliases if not null it points to a null-terminated list of const
791 * char* names of the legacy window aliases for this
792 * interface.
793 *
794 * At least one of protoClass or interfaceInfo should be non-null. If
795 * interfaceInfo is non-null, the resulting interface object will be defined on
796 * the given global with property name |name|, which must also be non-null.
797 */
798// clang-format on
799template <size_t N>
800inline void CreateInterfaceObjects(
801 JSContext* cx, JS::Handle<JSObject*> global,
802 JS::Handle<JSObject*> protoProto, const DOMIfaceAndProtoJSClass* protoClass,
803 JS::Heap<JSObject*>* protoCache, JS::Handle<JSObject*> interfaceProto,
804 const DOMInterfaceInfo* interfaceInfo, unsigned ctorNargs,
805 bool isConstructorChromeOnly,
806 const Span<const LegacyFactoryFunction, N>& legacyFactoryFunctions,
807 JS::Heap<JSObject*>* constructorCache, const NativeProperties* properties,
808 const NativeProperties* chromeOnlyProperties, const char* name,
809 bool defineOnGlobal, const char* const* unscopableNames, bool isGlobal,
810 const char* const* legacyWindowAliases) {
811 // We're using 1 slot for the interface info already, so we only have
812 // INTERFACE_OBJECT_MAX_SLOTS - 1 slots for legacy factory functions.
813 static_assert(N <= INTERFACE_OBJECT_MAX_SLOTS3 -
814 INTERFACE_OBJECT_FIRST_LEGACY_FACTORY_FUNCTION);
815
816 return binding_detail::CreateInterfaceObjects(
817 cx, global, protoProto, protoClass, protoCache, interfaceProto,
818 interfaceInfo, ctorNargs, isConstructorChromeOnly, legacyFactoryFunctions,
819 constructorCache, properties, chromeOnlyProperties, name, defineOnGlobal,
820 unscopableNames, isGlobal, legacyWindowAliases);
821}
822
823/*
824 * Create a namespace object.
825 *
826 * global the global on which to install a property named with name pointing to
827 * the namespace object if defineOnGlobal is true.
828 * namespaceProto is the prototype to use for the namespace object.
829 * namespaceClass is the JSClass to use for the namespace object.
830 * namespaceCache a pointer to a JSObject pointer where we should cache the
831 * namespace object.
832 * properties contains the methods, attributes and constants to be defined on
833 * objects in any compartment.
834 * chromeProperties contains the methods, attributes and constants to be defined
835 * on objects in chrome compartments. This must be null if the
836 * namespace doesn't have any ChromeOnly properties or if the
837 * object is being created in non-chrome compartment.
838 * name the name to use for the WebIDL class string, which is the value
839 * that's used for @@toStringTag, and the name of the property on the
840 * global object that would be set to the namespace object.
841 * defineOnGlobal controls whether properties should be defined on the given
842 * global for the namespace object. This can be false in
843 * situations where we want the properties to only appear on
844 * privileged Xrays but not on the unprivileged underlying
845 * global.
846 */
847void CreateNamespaceObject(JSContext* cx, JS::Handle<JSObject*> global,
848 JS::Handle<JSObject*> namespaceProto,
849 const DOMIfaceAndProtoJSClass& namespaceClass,
850 JS::Heap<JSObject*>* namespaceCache,
851 const NativeProperties* properties,
852 const NativeProperties* chromeOnlyProperties,
853 const char* name, bool defineOnGlobal);
854
855/**
856 * Define the properties (regular and chrome-only) on obj.
857 *
858 * obj the object to install the properties on. This should be the interface
859 * prototype object for regular interfaces and the instance object for
860 * interfaces marked with Global.
861 * properties contains the methods, attributes and constants to be defined on
862 * objects in any compartment.
863 * chromeProperties contains the methods, attributes and constants to be defined
864 * on objects in chrome compartments. This must be null if the
865 * interface doesn't have any ChromeOnly properties or if the
866 * object is being created in non-chrome compartment.
867 */
868bool DefineProperties(JSContext* cx, JS::Handle<JSObject*> obj,
869 const NativeProperties* properties,
870 const NativeProperties* chromeOnlyProperties);
871
872/*
873 * Define the legacy unforgeable methods on an object.
874 */
875bool DefineLegacyUnforgeableMethods(
876 JSContext* cx, JS::Handle<JSObject*> obj,
877 const Prefable<const JSFunctionSpec>* props);
878
879/*
880 * Define the legacy unforgeable attributes on an object.
881 */
882bool DefineLegacyUnforgeableAttributes(
883 JSContext* cx, JS::Handle<JSObject*> obj,
884 const Prefable<const JSPropertySpec>* props);
885
886#define HAS_MEMBER_TYPEDEFS \
887 private: \
888 typedef char yes[1]; \
889 typedef char no[2]
890
891#ifdef _MSC_VER
892# define HAS_MEMBER_CHECK(_name) \
893 template <typename V> \
894 static yes& Check##_name(char(*)[(&V::_name == 0) + 1])
895#else
896# define HAS_MEMBER_CHECK(_name) \
897 template <typename V> \
898 static yes& Check##_name(char(*)[sizeof(&V::_name) + 1])
899#endif
900
901#define HAS_MEMBER(_memberName, _valueName) \
902 private: \
903 HAS_MEMBER_CHECK(_memberName); \
904 template <typename V> \
905 static no& Check##_memberName(...); \
906 \
907 public: \
908 static bool const _valueName = \
909 sizeof(Check##_memberName<T>(nullptr)) == sizeof(yes)
910
911template <class T>
912struct NativeHasMember {
913 HAS_MEMBER_TYPEDEFS;
914
915 HAS_MEMBER(GetParentObject, GetParentObject);
916 HAS_MEMBER(WrapObject, WrapObject);
917};
918
919template <class T>
920struct IsSmartPtr {
921 HAS_MEMBER_TYPEDEFS;
922
923 HAS_MEMBER(get, value);
924};
925
926template <class T>
927struct IsRefcounted {
928 HAS_MEMBER_TYPEDEFS;
929
930 HAS_MEMBER(AddRef, HasAddref);
931 HAS_MEMBER(Release, HasRelease);
932
933 public:
934 static bool const value = HasAddref && HasRelease;
935
936 private:
937 // This struct only works if T is fully declared (not just forward declared).
938 // The std::is_base_of check will ensure that, we don't really need it for any
939 // other reason (the static assert will of course always be true).
940 static_assert(!std::is_base_of<nsISupports, T>::value || IsRefcounted::value,
941 "Classes derived from nsISupports are refcounted!");
942};
943
944#undef HAS_MEMBER
945#undef HAS_MEMBER_CHECK
946#undef HAS_MEMBER_TYPEDEFS
947
948#ifdef DEBUG1
949template <class T, bool isISupports = std::is_base_of<nsISupports, T>::value>
950struct CheckWrapperCacheCast {
951 static bool Check() {
952 return reinterpret_cast<uintptr_t>(
953 static_cast<nsWrapperCache*>(reinterpret_cast<T*>(1))) == 1;
954 }
955};
956template <class T>
957struct CheckWrapperCacheCast<T, true> {
958 static bool Check() { return true; }
959};
960#endif
961
962inline bool TryToOuterize(JS::MutableHandle<JS::Value> rval) {
963#ifdef ENABLE_RECORD_TUPLE
964 if (rval.isExtendedPrimitive()) {
965 return true;
966 }
967#endif
968 MOZ_ASSERT(rval.isObject())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rval.isObject())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rval.isObject()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("rval.isObject()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 968); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rval.isObject()"
")"); do { *((volatile int*)__null) = 968; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
969 if (js::IsWindow(&rval.toObject())) {
970 JSObject* obj = js::ToWindowProxyIfWindow(&rval.toObject());
971 MOZ_ASSERT(obj)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(obj)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(obj))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("obj", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 971); AnnotateMozCrashReason("MOZ_ASSERT" "(" "obj" ")"); do
{ *((volatile int*)__null) = 971; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
972 rval.set(JS::ObjectValue(*obj));
973 }
974
975 return true;
976}
977
978inline bool TryToOuterize(JS::MutableHandle<JSObject*> obj) {
979 if (js::IsWindow(obj)) {
980 JSObject* proxy = js::ToWindowProxyIfWindow(obj);
981 MOZ_ASSERT(proxy)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(proxy)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(proxy))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("proxy", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 981); AnnotateMozCrashReason("MOZ_ASSERT" "(" "proxy" ")");
do { *((volatile int*)__null) = 981; __attribute__((nomerge)
) ::abort(); } while (false); } } while (false)
;
982 obj.set(proxy);
983 }
984
985 return true;
986}
987
988// Make sure to wrap the given string value into the right compartment, as
989// needed.
990MOZ_ALWAYS_INLINEinline
991bool MaybeWrapStringValue(JSContext* cx, JS::MutableHandle<JS::Value> rval) {
992 MOZ_ASSERT(rval.isString())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rval.isString())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rval.isString()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("rval.isString()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 992); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rval.isString()"
")"); do { *((volatile int*)__null) = 992; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
993 JSString* str = rval.toString();
994 if (JS::GetStringZone(str) != js::GetContextZone(cx)) {
995 return JS_WrapValue(cx, rval);
996 }
997 return true;
998}
999
1000// Make sure to wrap the given object value into the right compartment as
1001// needed. This will work correctly, but possibly slowly, on all objects.
1002MOZ_ALWAYS_INLINEinline
1003bool MaybeWrapObjectValue(JSContext* cx, JS::MutableHandle<JS::Value> rval) {
1004 MOZ_ASSERT(rval.hasObjectPayload())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rval.hasObjectPayload())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rval.hasObjectPayload()))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("rval.hasObjectPayload()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1004); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rval.hasObjectPayload()"
")"); do { *((volatile int*)__null) = 1004; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1005
1006 // Cross-compartment always requires wrapping.
1007 JSObject* obj = &rval.getObjectPayload();
1008 if (JS::GetCompartment(obj) != js::GetContextCompartment(cx)) {
1009 return JS_WrapValue(cx, rval);
1010 }
1011
1012 // We're same-compartment, but we might still need to outerize if we
1013 // have a Window.
1014 return TryToOuterize(rval);
1015}
1016
1017// Like MaybeWrapObjectValue, but working with a
1018// JS::MutableHandle<JSObject*> which must be non-null.
1019MOZ_ALWAYS_INLINEinline
1020bool MaybeWrapObject(JSContext* cx, JS::MutableHandle<JSObject*> obj) {
1021 if (JS::GetCompartment(obj) != js::GetContextCompartment(cx)) {
1022 return JS_WrapObject(cx, obj);
1023 }
1024
1025 // We're same-compartment, but we might still need to outerize if we
1026 // have a Window.
1027 return TryToOuterize(obj);
1028}
1029
1030// Like MaybeWrapObjectValue, but also allows null
1031MOZ_ALWAYS_INLINEinline
1032bool MaybeWrapObjectOrNullValue(JSContext* cx,
1033 JS::MutableHandle<JS::Value> rval) {
1034 MOZ_ASSERT(rval.isObjectOrNull())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rval.isObjectOrNull())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rval.isObjectOrNull()))), 0)
)) { do { } while (false); MOZ_ReportAssertionFailure("rval.isObjectOrNull()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1034); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rval.isObjectOrNull()"
")"); do { *((volatile int*)__null) = 1034; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1035 if (rval.isNull()) {
1036 return true;
1037 }
1038 return MaybeWrapObjectValue(cx, rval);
1039}
1040
1041// Wrapping for objects that are known to not be DOM objects
1042MOZ_ALWAYS_INLINEinline
1043bool MaybeWrapNonDOMObjectValue(JSContext* cx,
1044 JS::MutableHandle<JS::Value> rval) {
1045 MOZ_ASSERT(rval.isObject())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rval.isObject())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rval.isObject()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("rval.isObject()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1045); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rval.isObject()"
")"); do { *((volatile int*)__null) = 1045; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1046 // Compared to MaybeWrapObjectValue we just skip the TryToOuterize call. The
1047 // only reason it would be needed is if we have a Window object, which would
1048 // have a DOM class. Assert that we don't have any DOM-class objects coming
1049 // through here.
1050 MOZ_ASSERT(!GetDOMClass(&rval.toObject()))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!GetDOMClass(&rval.toObject()))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!GetDOMClass(&rval.toObject
())))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!GetDOMClass(&rval.toObject())", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1050); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!GetDOMClass(&rval.toObject())"
")"); do { *((volatile int*)__null) = 1050; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1051
1052 JSObject* obj = &rval.toObject();
1053 if (JS::GetCompartment(obj) == js::GetContextCompartment(cx)) {
1054 return true;
1055 }
1056 return JS_WrapValue(cx, rval);
1057}
1058
1059// Like MaybeWrapNonDOMObjectValue but allows null
1060MOZ_ALWAYS_INLINEinline
1061bool MaybeWrapNonDOMObjectOrNullValue(JSContext* cx,
1062 JS::MutableHandle<JS::Value> rval) {
1063 MOZ_ASSERT(rval.isObjectOrNull())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rval.isObjectOrNull())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rval.isObjectOrNull()))), 0)
)) { do { } while (false); MOZ_ReportAssertionFailure("rval.isObjectOrNull()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1063); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rval.isObjectOrNull()"
")"); do { *((volatile int*)__null) = 1063; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1064 if (rval.isNull()) {
1065 return true;
1066 }
1067 return MaybeWrapNonDOMObjectValue(cx, rval);
1068}
1069
1070// If rval is a gcthing and is not in the compartment of cx, wrap rval
1071// into the compartment of cx (typically by replacing it with an Xray or
1072// cross-compartment wrapper around the original object).
1073MOZ_ALWAYS_INLINEinline bool MaybeWrapValue(JSContext* cx,
1074 JS::MutableHandle<JS::Value> rval) {
1075 if (rval.isGCThing()) {
1076 if (rval.isString()) {
1077 return MaybeWrapStringValue(cx, rval);
1078 }
1079 if (rval.hasObjectPayload()) {
1080 return MaybeWrapObjectValue(cx, rval);
1081 }
1082 // This could be optimized by checking the zone first, similar to
1083 // the way strings are handled. At present, this is used primarily
1084 // for structured cloning, so avoiding the overhead of JS_WrapValue
1085 // calls is less important than for other types.
1086 if (rval.isBigInt()) {
1087 return JS_WrapValue(cx, rval);
1088 }
1089 MOZ_ASSERT(rval.isSymbol())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rval.isSymbol())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rval.isSymbol()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("rval.isSymbol()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1089); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rval.isSymbol()"
")"); do { *((volatile int*)__null) = 1089; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1090 JS_MarkCrossZoneId(cx, JS::PropertyKey::Symbol(rval.toSymbol()));
1091 }
1092 return true;
1093}
1094
1095namespace binding_detail {
1096enum GetOrCreateReflectorWrapBehavior {
1097 eWrapIntoContextCompartment,
1098 eDontWrapIntoContextCompartment
1099};
1100
1101template <class T>
1102struct TypeNeedsOuterization {
1103 // We only need to outerize Window objects, so anything inheriting from
1104 // nsGlobalWindow (which inherits from EventTarget itself).
1105 static const bool value = std::is_base_of<nsGlobalWindowInner, T>::value ||
1106 std::is_base_of<nsGlobalWindowOuter, T>::value ||
1107 std::is_same_v<EventTarget, T>;
1108};
1109
1110#ifdef DEBUG1
1111template <typename T, bool isISupports = std::is_base_of<nsISupports, T>::value>
1112struct CheckWrapperCacheTracing {
1113 static inline void Check(T* aObject) {}
1114};
1115
1116template <typename T>
1117struct CheckWrapperCacheTracing<T, true> {
1118 static void Check(T* aObject) {
1119 // Rooting analysis thinks QueryInterface may GC, but we're dealing with
1120 // a subset of QueryInterface, C++ only types here.
1121 JS::AutoSuppressGCAnalysis nogc;
1122
1123 nsWrapperCache* wrapperCacheFromQI = nullptr;
1124 aObject->QueryInterface(NS_GET_IID(nsWrapperCache)(nsWrapperCache::COMTypeInfo<nsWrapperCache, void>::kIID
)
,
1125 reinterpret_cast<void**>(&wrapperCacheFromQI));
1126
1127 MOZ_ASSERT(wrapperCacheFromQI,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(wrapperCacheFromQI)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(wrapperCacheFromQI))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("wrapperCacheFromQI"
" (" "Missing nsWrapperCache from QueryInterface implementation?"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1128); AnnotateMozCrashReason("MOZ_ASSERT" "(" "wrapperCacheFromQI"
") (" "Missing nsWrapperCache from QueryInterface implementation?"
")"); do { *((volatile int*)__null) = 1128; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
1128 "Missing nsWrapperCache from QueryInterface implementation?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(wrapperCacheFromQI)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(wrapperCacheFromQI))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("wrapperCacheFromQI"
" (" "Missing nsWrapperCache from QueryInterface implementation?"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1128); AnnotateMozCrashReason("MOZ_ASSERT" "(" "wrapperCacheFromQI"
") (" "Missing nsWrapperCache from QueryInterface implementation?"
")"); do { *((volatile int*)__null) = 1128; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1129
1130 if (!wrapperCacheFromQI->GetWrapperPreserveColor()) {
1131 // Can't assert that we trace the wrapper, since we don't have any
1132 // wrapper to trace.
1133 return;
1134 }
1135
1136 nsISupports* ccISupports = nullptr;
1137 aObject->QueryInterface(NS_GET_IID(nsCycleCollectionISupports)(nsCycleCollectionISupports::COMTypeInfo<nsCycleCollectionISupports
, void>::kIID)
,
1138 reinterpret_cast<void**>(&ccISupports));
1139 MOZ_ASSERT(ccISupports,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ccISupports)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(ccISupports))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("ccISupports" " ("
"nsWrapperCache object which isn't cycle collectable?" ")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1140); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ccISupports"
") (" "nsWrapperCache object which isn't cycle collectable?"
")"); do { *((volatile int*)__null) = 1140; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
1140 "nsWrapperCache object which isn't cycle collectable?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ccISupports)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(ccISupports))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("ccISupports" " ("
"nsWrapperCache object which isn't cycle collectable?" ")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1140); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ccISupports"
") (" "nsWrapperCache object which isn't cycle collectable?"
")"); do { *((volatile int*)__null) = 1140; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1141
1142 nsXPCOMCycleCollectionParticipant* participant = nullptr;
1143 CallQueryInterface(ccISupports, &participant);
1144 MOZ_ASSERT(participant, "Can't QI to CycleCollectionParticipant?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(participant)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(participant))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("participant" " ("
"Can't QI to CycleCollectionParticipant?" ")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1144); AnnotateMozCrashReason("MOZ_ASSERT" "(" "participant"
") (" "Can't QI to CycleCollectionParticipant?" ")"); do { *
((volatile int*)__null) = 1144; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1145
1146 wrapperCacheFromQI->CheckCCWrapperTraversal(ccISupports, participant);
1147 }
1148};
1149
1150void AssertReflectorHasGivenProto(JSContext* aCx, JSObject* aReflector,
1151 JS::Handle<JSObject*> aGivenProto);
1152#endif // DEBUG
1153
1154template <class T, GetOrCreateReflectorWrapBehavior wrapBehavior>
1155MOZ_ALWAYS_INLINEinline bool DoGetOrCreateDOMReflector(
1156 JSContext* cx, T* value, JS::Handle<JSObject*> givenProto,
1157 JS::MutableHandle<JS::Value> rval) {
1158 MOZ_ASSERT(value)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(value)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(value))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("value", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1158); AnnotateMozCrashReason("MOZ_ASSERT" "(" "value" ")")
; do { *((volatile int*)__null) = 1158; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1159 MOZ_ASSERT_IF(givenProto, js::IsObjectInContextCompartment(givenProto, cx))do { if (givenProto) { do { static_assert( mozilla::detail::AssertionConditionType
<decltype(js::IsObjectInContextCompartment(givenProto, cx)
)>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(js::IsObjectInContextCompartment(givenProto, cx)))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("js::IsObjectInContextCompartment(givenProto, cx)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1159); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(givenProto, cx)"
")"); do { *((volatile int*)__null) = 1159; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false); } } while (
false)
;
1160 JSObject* obj = value->GetWrapper();
1161 if (obj) {
1162#ifdef DEBUG1
1163 AssertReflectorHasGivenProto(cx, obj, givenProto);
1164 // Have to reget obj because AssertReflectorHasGivenProto can
1165 // trigger gc so the pointer may now be invalid.
1166 obj = value->GetWrapper();
1167#endif
1168 } else {
1169 obj = value->WrapObject(cx, givenProto);
1170 if (!obj) {
1171 // At this point, obj is null, so just return false.
1172 // Callers seem to be testing JS_IsExceptionPending(cx) to
1173 // figure out whether WrapObject() threw.
1174 return false;
1175 }
1176
1177#ifdef DEBUG1
1178 if (std::is_base_of<nsWrapperCache, T>::value) {
1179 CheckWrapperCacheTracing<T>::Check(value);
1180 }
1181#endif
1182 }
1183
1184#ifdef DEBUG1
1185 const DOMJSClass* clasp = GetDOMClass(obj);
1186 // clasp can be null if the cache contained a non-DOM object.
1187 if (clasp) {
1188 // Some sanity asserts about our object. Specifically:
1189 // 1) If our class claims we're nsISupports, we better be nsISupports
1190 // XXXbz ideally, we could assert that reinterpret_cast to nsISupports
1191 // does the right thing, but I don't see a way to do it. :(
1192 // 2) If our class doesn't claim we're nsISupports we better be
1193 // reinterpret_castable to nsWrapperCache.
1194 MOZ_ASSERT(clasp, "What happened here?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(clasp)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(clasp))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("clasp" " (" "What happened here?"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1194); AnnotateMozCrashReason("MOZ_ASSERT" "(" "clasp" ") ("
"What happened here?" ")"); do { *((volatile int*)__null) = 1194
; __attribute__((nomerge)) ::abort(); } while (false); } } while
(false)
;
1195 MOZ_ASSERT_IF(clasp->mDOMObjectIsISupports,do { if (clasp->mDOMObjectIsISupports) { do { static_assert
( mozilla::detail::AssertionConditionType<decltype((std::is_base_of
<nsISupports, T>::value))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!((std::is_base_of<nsISupports
, T>::value)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("(std::is_base_of<nsISupports, T>::value)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1196); AnnotateMozCrashReason("MOZ_ASSERT" "(" "(std::is_base_of<nsISupports, T>::value)"
")"); do { *((volatile int*)__null) = 1196; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false); } } while (
false)
1196 (std::is_base_of<nsISupports, T>::value))do { if (clasp->mDOMObjectIsISupports) { do { static_assert
( mozilla::detail::AssertionConditionType<decltype((std::is_base_of
<nsISupports, T>::value))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!((std::is_base_of<nsISupports
, T>::value)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("(std::is_base_of<nsISupports, T>::value)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1196); AnnotateMozCrashReason("MOZ_ASSERT" "(" "(std::is_base_of<nsISupports, T>::value)"
")"); do { *((volatile int*)__null) = 1196; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false); } } while (
false)
;
1197 MOZ_ASSERT(CheckWrapperCacheCast<T>::Check())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(CheckWrapperCacheCast<T>::Check())>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(CheckWrapperCacheCast<T>::Check()))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("CheckWrapperCacheCast<T>::Check()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1197); AnnotateMozCrashReason("MOZ_ASSERT" "(" "CheckWrapperCacheCast<T>::Check()"
")"); do { *((volatile int*)__null) = 1197; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1198 }
1199#endif
1200
1201#ifdef ENABLE_RECORD_TUPLE
1202 MOZ_ASSERT(!js::gc::MaybeForwardedIsExtendedPrimitive(*obj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::gc::MaybeForwardedIsExtendedPrimitive(*obj))>
::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(!js::gc::MaybeForwardedIsExtendedPrimitive(*obj)))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("!js::gc::MaybeForwardedIsExtendedPrimitive(*obj)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1202); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!js::gc::MaybeForwardedIsExtendedPrimitive(*obj)"
")"); do { *((volatile int*)__null) = 1202; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1203#endif
1204 rval.set(JS::ObjectValue(*obj));
1205
1206 if (JS::GetCompartment(obj) == js::GetContextCompartment(cx)) {
1207 return TypeNeedsOuterization<T>::value ? TryToOuterize(rval) : true;
1208 }
1209
1210 if (wrapBehavior == eDontWrapIntoContextCompartment) {
1211 if (TypeNeedsOuterization<T>::value) {
1212 JSAutoRealm ar(cx, obj);
1213 return TryToOuterize(rval);
1214 }
1215
1216 return true;
1217 }
1218
1219 return JS_WrapValue(cx, rval);
1220}
1221
1222} // namespace binding_detail
1223
1224// Create a JSObject wrapping "value", if there isn't one already, and store it
1225// in rval. "value" must be a concrete class that implements a
1226// GetWrapperPreserveColor() which can return its existing wrapper, if any, and
1227// a WrapObject() which will try to create a wrapper. Typically, this is done by
1228// having "value" inherit from nsWrapperCache.
1229//
1230// The value stored in rval will be ready to be exposed to whatever JS
1231// is running on cx right now. In particular, it will be in the
1232// compartment of cx, and outerized as needed.
1233template <class T>
1234MOZ_ALWAYS_INLINEinline bool GetOrCreateDOMReflector(
1235 JSContext* cx, T* value, JS::MutableHandle<JS::Value> rval,
1236 JS::Handle<JSObject*> givenProto = nullptr) {
1237 using namespace binding_detail;
1238 return DoGetOrCreateDOMReflector<T, eWrapIntoContextCompartment>(
1239 cx, value, givenProto, rval);
1240}
1241
1242// Like GetOrCreateDOMReflector but doesn't wrap into the context compartment,
1243// and hence does not actually require cx to be in a compartment.
1244template <class T>
1245MOZ_ALWAYS_INLINEinline bool GetOrCreateDOMReflectorNoWrap(
1246 JSContext* cx, T* value, JS::MutableHandle<JS::Value> rval) {
1247 using namespace binding_detail;
1248 return DoGetOrCreateDOMReflector<T, eDontWrapIntoContextCompartment>(
1249 cx, value, nullptr, rval);
1250}
1251
1252// Helper for different overloadings of WrapNewBindingNonWrapperCachedObject()
1253inline bool FinishWrapping(JSContext* cx, JS::Handle<JSObject*> obj,
1254 JS::MutableHandle<JS::Value> rval) {
1255#ifdef ENABLE_RECORD_TUPLE
1256 // If calling an (object) value's WrapObject() method returned a record/tuple,
1257 // then something is very wrong.
1258 MOZ_ASSERT(!js::gc::MaybeForwardedIsExtendedPrimitive(*obj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::gc::MaybeForwardedIsExtendedPrimitive(*obj))>
::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(!js::gc::MaybeForwardedIsExtendedPrimitive(*obj)))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("!js::gc::MaybeForwardedIsExtendedPrimitive(*obj)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1258); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!js::gc::MaybeForwardedIsExtendedPrimitive(*obj)"
")"); do { *((volatile int*)__null) = 1258; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1259#endif
1260
1261 // We can end up here in all sorts of compartments, per comments in
1262 // WrapNewBindingNonWrapperCachedObject(). Make sure to JS_WrapValue!
1263 rval.set(JS::ObjectValue(*obj));
1264 return MaybeWrapObjectValue(cx, rval);
1265}
1266
1267// Create a JSObject wrapping "value", for cases when "value" is a
1268// non-wrapper-cached object using WebIDL bindings. "value" must implement a
1269// WrapObject() method taking a JSContext and a prototype (possibly null) and
1270// returning the resulting object via a MutableHandle<JSObject*> outparam.
1271template <class T>
1272inline bool WrapNewBindingNonWrapperCachedObject(
1273 JSContext* cx, JS::Handle<JSObject*> scopeArg, T* value,
1274 JS::MutableHandle<JS::Value> rval,
1275 JS::Handle<JSObject*> givenProto = nullptr) {
1276 static_assert(IsRefcounted<T>::value, "Don't pass owned classes in here.");
1277 MOZ_ASSERT(value)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(value)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(value))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("value", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1277); AnnotateMozCrashReason("MOZ_ASSERT" "(" "value" ")")
; do { *((volatile int*)__null) = 1277; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1278 // We try to wrap in the realm of the underlying object of "scope"
1279 JS::Rooted<JSObject*> obj(cx);
1280 {
1281 // scope for the JSAutoRealm so that we restore the realm
1282 // before we call JS_WrapValue.
1283 Maybe<JSAutoRealm> ar;
1284 // Maybe<Handle> doesn't so much work, and in any case, adding
1285 // more Maybe (one for a Rooted and one for a Handle) adds more
1286 // code (and branches!) than just adding a single rooted.
1287 JS::Rooted<JSObject*> scope(cx, scopeArg);
1288 JS::Rooted<JSObject*> proto(cx, givenProto);
1289 if (js::IsWrapper(scope)) {
1290 // We are working in the Realm of cx and will be producing our reflector
1291 // there, so we need to succeed if that realm has access to the scope.
1292 scope =
1293 js::CheckedUnwrapDynamic(scope, cx, /* stopAtWindowProxy = */ false);
1294 if (!scope) return false;
1295 ar.emplace(cx, scope);
1296 if (!JS_WrapObject(cx, &proto)) {
1297 return false;
1298 }
1299 } else {
1300 // cx and scope are same-compartment, but they might still be
1301 // different-Realm. Enter the Realm of scope, since that's
1302 // where we want to create our object.
1303 ar.emplace(cx, scope);
1304 }
1305
1306 MOZ_ASSERT_IF(proto, js::IsObjectInContextCompartment(proto, cx))do { if (proto) { do { static_assert( mozilla::detail::AssertionConditionType
<decltype(js::IsObjectInContextCompartment(proto, cx))>
::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(js::IsObjectInContextCompartment(proto, cx)))), 0)))
{ do { } while (false); MOZ_ReportAssertionFailure("js::IsObjectInContextCompartment(proto, cx)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1306); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(proto, cx)"
")"); do { *((volatile int*)__null) = 1306; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false); } } while (
false)
;
1307 MOZ_ASSERT(js::IsObjectInContextCompartment(scope, cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(js::IsObjectInContextCompartment(scope, cx))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(js::IsObjectInContextCompartment(scope, cx)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("js::IsObjectInContextCompartment(scope, cx)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1307); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(scope, cx)"
")"); do { *((volatile int*)__null) = 1307; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1308 if (!value->WrapObject(cx, proto, &obj)) {
1309 return false;
1310 }
1311 }
1312
1313 return FinishWrapping(cx, obj, rval);
1314}
1315
1316// Create a JSObject wrapping "value", for cases when "value" is a
1317// non-wrapper-cached owned object using WebIDL bindings. "value" must
1318// implement a WrapObject() method taking a taking a JSContext and a prototype
1319// (possibly null) and returning two pieces of information: the resulting object
1320// via a MutableHandle<JSObject*> outparam and a boolean return value that is
1321// true if the JSObject took ownership
1322template <class T>
1323inline bool WrapNewBindingNonWrapperCachedObject(
1324 JSContext* cx, JS::Handle<JSObject*> scopeArg, UniquePtr<T>& value,
1325 JS::MutableHandle<JS::Value> rval,
1326 JS::Handle<JSObject*> givenProto = nullptr) {
1327 static_assert(!IsRefcounted<T>::value, "Only pass owned classes in here.");
1328 // We do a runtime check on value, because otherwise we might in
1329 // fact end up wrapping a null and invoking methods on it later.
1330 if (!value) {
1331 MOZ_CRASH("Don't try to wrap null objects")do { do { } while (false); MOZ_ReportCrash("" "Don't try to wrap null objects"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1331); AnnotateMozCrashReason("MOZ_CRASH(" "Don't try to wrap null objects"
")"); do { *((volatile int*)__null) = 1331; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
1332 }
1333 // We try to wrap in the realm of the underlying object of "scope"
1334 JS::Rooted<JSObject*> obj(cx);
1335 {
1336 // scope for the JSAutoRealm so that we restore the realm
1337 // before we call JS_WrapValue.
1338 Maybe<JSAutoRealm> ar;
1339 // Maybe<Handle> doesn't so much work, and in any case, adding
1340 // more Maybe (one for a Rooted and one for a Handle) adds more
1341 // code (and branches!) than just adding a single rooted.
1342 JS::Rooted<JSObject*> scope(cx, scopeArg);
1343 JS::Rooted<JSObject*> proto(cx, givenProto);
1344 if (js::IsWrapper(scope)) {
1345 // We are working in the Realm of cx and will be producing our reflector
1346 // there, so we need to succeed if that realm has access to the scope.
1347 scope =
1348 js::CheckedUnwrapDynamic(scope, cx, /* stopAtWindowProxy = */ false);
1349 if (!scope) return false;
1350 ar.emplace(cx, scope);
1351 if (!JS_WrapObject(cx, &proto)) {
1352 return false;
1353 }
1354 } else {
1355 // cx and scope are same-compartment, but they might still be
1356 // different-Realm. Enter the Realm of scope, since that's
1357 // where we want to create our object.
1358 ar.emplace(cx, scope);
1359 }
1360
1361 MOZ_ASSERT_IF(proto, js::IsObjectInContextCompartment(proto, cx))do { if (proto) { do { static_assert( mozilla::detail::AssertionConditionType
<decltype(js::IsObjectInContextCompartment(proto, cx))>
::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(js::IsObjectInContextCompartment(proto, cx)))), 0)))
{ do { } while (false); MOZ_ReportAssertionFailure("js::IsObjectInContextCompartment(proto, cx)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1361); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(proto, cx)"
")"); do { *((volatile int*)__null) = 1361; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false); } } while (
false)
;
1362 MOZ_ASSERT(js::IsObjectInContextCompartment(scope, cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(js::IsObjectInContextCompartment(scope, cx))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(js::IsObjectInContextCompartment(scope, cx)))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("js::IsObjectInContextCompartment(scope, cx)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1362); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(scope, cx)"
")"); do { *((volatile int*)__null) = 1362; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1363 if (!value->WrapObject(cx, proto, &obj)) {
1364 return false;
1365 }
1366
1367 // JS object took ownership
1368 Unused << value.release();
1369 }
1370
1371 return FinishWrapping(cx, obj, rval);
1372}
1373
1374// Helper for smart pointers (nsRefPtr/nsCOMPtr).
1375template <template <typename> class SmartPtr, typename T,
1376 typename U = std::enable_if_t<IsRefcounted<T>::value, T>,
1377 typename V = std::enable_if_t<IsSmartPtr<SmartPtr<T>>::value, T>>
1378inline bool WrapNewBindingNonWrapperCachedObject(
1379 JSContext* cx, JS::Handle<JSObject*> scope, const SmartPtr<T>& value,
1380 JS::MutableHandle<JS::Value> rval,
1381 JS::Handle<JSObject*> givenProto = nullptr) {
1382 return WrapNewBindingNonWrapperCachedObject(cx, scope, value.get(), rval,
1383 givenProto);
1384}
1385
1386// Helper for object references (as opposed to pointers).
1387template <typename T, typename U = std::enable_if_t<!IsSmartPtr<T>::value, T>>
1388inline bool WrapNewBindingNonWrapperCachedObject(
1389 JSContext* cx, JS::Handle<JSObject*> scope, T& value,
1390 JS::MutableHandle<JS::Value> rval,
1391 JS::Handle<JSObject*> givenProto = nullptr) {
1392 return WrapNewBindingNonWrapperCachedObject(cx, scope, &value, rval,
1393 givenProto);
1394}
1395
1396template <bool Fatal>
1397inline bool EnumValueNotFound(BindingCallContext& cx, JS::Handle<JSString*> str,
1398 const char* type, const char* sourceDescription);
1399
1400template <>
1401inline bool EnumValueNotFound<false>(BindingCallContext& cx,
1402 JS::Handle<JSString*> str,
1403 const char* type,
1404 const char* sourceDescription) {
1405 // TODO: Log a warning to the console.
1406 return true;
1407}
1408
1409template <>
1410inline bool EnumValueNotFound<true>(BindingCallContext& cx,
1411 JS::Handle<JSString*> str, const char* type,
1412 const char* sourceDescription) {
1413 JS::UniqueChars deflated = JS_EncodeStringToUTF8(cx, str);
1414 if (!deflated) {
1415 return false;
1416 }
1417 return cx.ThrowErrorMessage<MSG_INVALID_ENUM_VALUE>(sourceDescription,
1418 deflated.get(), type);
1419}
1420
1421namespace binding_detail {
1422
1423template <typename CharT>
1424inline int FindEnumStringIndexImpl(const CharT* chars, size_t length,
1425 const Span<const nsLiteralCString>& values) {
1426 for (size_t i = 0; i < values.Length(); ++i) {
1427 const nsLiteralCString& value = values[i];
1428 if (length != value.Length()) {
1429 continue;
1430 }
1431
1432 bool equal = true;
1433 for (size_t j = 0; j != length; ++j) {
1434 if (unsigned(value.CharAt(j)) != unsigned(chars[j])) {
1435 equal = false;
1436 break;
1437 }
1438 }
1439
1440 if (equal) {
1441 return (int)i;
1442 }
1443 }
1444
1445 return -1;
1446}
1447
1448template <bool InvalidValueFatal>
1449inline bool FindEnumStringIndex(BindingCallContext& cx, JS::Handle<JS::Value> v,
1450 const Span<const nsLiteralCString>& values,
1451 const char* type, const char* sourceDescription,
1452 int* index) {
1453 // JS_StringEqualsAscii is slow as molasses, so don't use it here.
1454 JS::Rooted<JSString*> str(cx, JS::ToString(cx, v));
1455 if (!str) {
1456 return false;
1457 }
1458
1459 {
1460 size_t length;
1461 JS::AutoCheckCannotGC nogc;
1462 if (JS::StringHasLatin1Chars(str)) {
1463 const JS::Latin1Char* chars =
1464 JS_GetLatin1StringCharsAndLength(cx, nogc, str, &length);
1465 if (!chars) {
1466 return false;
1467 }
1468 *index = FindEnumStringIndexImpl(chars, length, values);
1469 } else {
1470 const char16_t* chars =
1471 JS_GetTwoByteStringCharsAndLength(cx, nogc, str, &length);
1472 if (!chars) {
1473 return false;
1474 }
1475 *index = FindEnumStringIndexImpl(chars, length, values);
1476 }
1477 if (*index >= 0) {
1478 return true;
1479 }
1480 }
1481
1482 return EnumValueNotFound<InvalidValueFatal>(cx, str, type, sourceDescription);
1483}
1484
1485} // namespace binding_detail
1486
1487template <typename Enum, class StringT>
1488inline Maybe<Enum> StringToEnum(const StringT& aString) {
1489 int index = binding_detail::FindEnumStringIndexImpl(
1490 aString.BeginReading(), aString.Length(),
1491 binding_detail::EnumStrings<Enum>::Values);
1492 return index >= 0 ? Some(static_cast<Enum>(index)) : Nothing();
1493}
1494
1495template <typename Enum>
1496inline const nsCString& GetEnumString(Enum stringId) {
1497 MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType<
decltype(static_cast<size_t>(stringId) < mozilla::ArrayLength
(binding_detail::EnumStrings<Enum>::Values))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(static_cast<size_t>(stringId) < mozilla::ArrayLength
(binding_detail::EnumStrings<Enum>::Values)))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("static_cast<size_t>(stringId) < mozilla::ArrayLength(binding_detail::EnumStrings<Enum>::Values)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1499); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "static_cast<size_t>(stringId) < mozilla::ArrayLength(binding_detail::EnumStrings<Enum>::Values)"
")"); do { *((volatile int*)__null) = 1499; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
1498 static_cast<size_t>(stringId) <do { static_assert( mozilla::detail::AssertionConditionType<
decltype(static_cast<size_t>(stringId) < mozilla::ArrayLength
(binding_detail::EnumStrings<Enum>::Values))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(static_cast<size_t>(stringId) < mozilla::ArrayLength
(binding_detail::EnumStrings<Enum>::Values)))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("static_cast<size_t>(stringId) < mozilla::ArrayLength(binding_detail::EnumStrings<Enum>::Values)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1499); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "static_cast<size_t>(stringId) < mozilla::ArrayLength(binding_detail::EnumStrings<Enum>::Values)"
")"); do { *((volatile int*)__null) = 1499; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
1499 mozilla::ArrayLength(binding_detail::EnumStrings<Enum>::Values))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(static_cast<size_t>(stringId) < mozilla::ArrayLength
(binding_detail::EnumStrings<Enum>::Values))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(static_cast<size_t>(stringId) < mozilla::ArrayLength
(binding_detail::EnumStrings<Enum>::Values)))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("static_cast<size_t>(stringId) < mozilla::ArrayLength(binding_detail::EnumStrings<Enum>::Values)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1499); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "static_cast<size_t>(stringId) < mozilla::ArrayLength(binding_detail::EnumStrings<Enum>::Values)"
")"); do { *((volatile int*)__null) = 1499; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1500 return binding_detail::EnumStrings<Enum>::Values[static_cast<size_t>(
1501 stringId)];
1502}
1503
1504template <typename Enum>
1505constexpr mozilla::detail::EnumeratedRange<Enum> MakeWebIDLEnumeratedRange() {
1506 return MakeInclusiveEnumeratedRange(ContiguousEnumValues<Enum>::min,
1507 ContiguousEnumValues<Enum>::max);
1508}
1509
1510inline nsWrapperCache* GetWrapperCache(const ParentObject& aParentObject) {
1511 return aParentObject.mWrapperCache;
1512}
1513
1514template <class T>
1515inline T* GetParentPointer(T* aObject) {
1516 return aObject;
1517}
1518
1519inline nsISupports* GetParentPointer(const ParentObject& aObject) {
1520 return aObject.mObject;
1521}
1522
1523template <typename T>
1524inline mozilla::dom::ReflectionScope GetReflectionScope(T* aParentObject) {
1525 return mozilla::dom::ReflectionScope::Content;
1526}
1527
1528inline mozilla::dom::ReflectionScope GetReflectionScope(
1529 const ParentObject& aParentObject) {
1530 return aParentObject.mReflectionScope;
1531}
1532
1533template <class T>
1534inline void ClearWrapper(T* p, nsWrapperCache* cache, JSObject* obj) {
1535 MOZ_ASSERT(cache->GetWrapperMaybeDead() == obj ||do { static_assert( mozilla::detail::AssertionConditionType<
decltype(cache->GetWrapperMaybeDead() == obj || (js::RuntimeIsBeingDestroyed
() && !cache->GetWrapperMaybeDead()))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(cache->GetWrapperMaybeDead() == obj || (js::RuntimeIsBeingDestroyed
() && !cache->GetWrapperMaybeDead())))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("cache->GetWrapperMaybeDead() == obj || (js::RuntimeIsBeingDestroyed() && !cache->GetWrapperMaybeDead())"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1536); AnnotateMozCrashReason("MOZ_ASSERT" "(" "cache->GetWrapperMaybeDead() == obj || (js::RuntimeIsBeingDestroyed() && !cache->GetWrapperMaybeDead())"
")"); do { *((volatile int*)__null) = 1536; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
1536 (js::RuntimeIsBeingDestroyed() && !cache->GetWrapperMaybeDead()))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(cache->GetWrapperMaybeDead() == obj || (js::RuntimeIsBeingDestroyed
() && !cache->GetWrapperMaybeDead()))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(cache->GetWrapperMaybeDead() == obj || (js::RuntimeIsBeingDestroyed
() && !cache->GetWrapperMaybeDead())))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("cache->GetWrapperMaybeDead() == obj || (js::RuntimeIsBeingDestroyed() && !cache->GetWrapperMaybeDead())"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1536); AnnotateMozCrashReason("MOZ_ASSERT" "(" "cache->GetWrapperMaybeDead() == obj || (js::RuntimeIsBeingDestroyed() && !cache->GetWrapperMaybeDead())"
")"); do { *((volatile int*)__null) = 1536; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1537 cache->ClearWrapper(obj);
1538}
1539
1540template <class T>
1541inline void ClearWrapper(T* p, void*, JSObject* obj) {
1542 // QueryInterface to nsWrapperCache can't GC, we hope.
1543 JS::AutoSuppressGCAnalysis nogc;
1544
1545 nsWrapperCache* cache;
1546 CallQueryInterface(p, &cache);
1547 ClearWrapper(p, cache, obj);
1548}
1549
1550template <class T>
1551inline void UpdateWrapper(T* p, nsWrapperCache* cache, JSObject* obj,
1552 const JSObject* old) {
1553 JS::AutoAssertGCCallback inCallback;
1554 cache->UpdateWrapper(obj, old);
1555}
1556
1557template <class T>
1558inline void UpdateWrapper(T* p, void*, JSObject* obj, const JSObject* old) {
1559 JS::AutoAssertGCCallback inCallback;
1560 nsWrapperCache* cache;
1561 CallQueryInterface(p, &cache);
1562 UpdateWrapper(p, cache, obj, old);
1563}
1564
1565// Attempt to preserve the wrapper, if any, for a Paris DOM bindings object.
1566// Return true if we successfully preserved the wrapper, or there is no wrapper
1567// to preserve. In the latter case we don't need to preserve the wrapper,
1568// because the object can only be obtained by JS once, or they cannot be
1569// meaningfully owned from the native side.
1570//
1571// This operation will return false only for non-nsISupports cycle-collected
1572// objects, because we cannot determine if they are wrappercached or not.
1573bool TryPreserveWrapper(JS::Handle<JSObject*> obj);
1574
1575bool HasReleasedWrapper(JS::Handle<JSObject*> obj);
1576
1577// Can only be called with a DOM JSClass.
1578bool InstanceClassHasProtoAtDepth(const JSClass* clasp, uint32_t protoID,
1579 uint32_t depth);
1580
1581// Only set allowNativeWrapper to false if you really know you need it; if in
1582// doubt use true. Setting it to false disables security wrappers.
1583bool XPCOMObjectToJsval(JSContext* cx, JS::Handle<JSObject*> scope,
1584 xpcObjectHelper& helper, const nsIID* iid,
1585 bool allowNativeWrapper,
1586 JS::MutableHandle<JS::Value> rval);
1587
1588// Special-cased wrapping for variants
1589bool VariantToJsval(JSContext* aCx, nsIVariant* aVariant,
1590 JS::MutableHandle<JS::Value> aRetval);
1591
1592// Wrap an object "p" which is not using WebIDL bindings yet. This _will_
1593// actually work on WebIDL binding objects that are wrappercached, but will be
1594// much slower than GetOrCreateDOMReflector. "cache" must either be null or be
1595// the nsWrapperCache for "p".
1596template <class T>
1597inline bool WrapObject(JSContext* cx, T* p, nsWrapperCache* cache,
1598 const nsIID* iid, JS::MutableHandle<JS::Value> rval) {
1599 if (xpc_FastGetCachedWrapper(cx, cache, rval)) return true;
1600 xpcObjectHelper helper(ToSupports(p), cache);
1601 JS::Rooted<JSObject*> scope(cx, JS::CurrentGlobalOrNull(cx));
1602 return XPCOMObjectToJsval(cx, scope, helper, iid, true, rval);
1603}
1604
1605// A specialization of the above for nsIVariant, because that needs to
1606// do something different.
1607template <>
1608inline bool WrapObject<nsIVariant>(JSContext* cx, nsIVariant* p,
1609 nsWrapperCache* cache, const nsIID* iid,
1610 JS::MutableHandle<JS::Value> rval) {
1611 MOZ_ASSERT(iid)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(iid)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(iid))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("iid", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1611); AnnotateMozCrashReason("MOZ_ASSERT" "(" "iid" ")"); do
{ *((volatile int*)__null) = 1611; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
1612 MOZ_ASSERT(iid->Equals(NS_GET_IID(nsIVariant)))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(iid->Equals((nsIVariant::COMTypeInfo<nsIVariant
, void>::kIID)))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(iid->Equals((nsIVariant::
COMTypeInfo<nsIVariant, void>::kIID))))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("iid->Equals((nsIVariant::COMTypeInfo<nsIVariant, void>::kIID))"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1612); AnnotateMozCrashReason("MOZ_ASSERT" "(" "iid->Equals((nsIVariant::COMTypeInfo<nsIVariant, void>::kIID))"
")"); do { *((volatile int*)__null) = 1612; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1613 return VariantToJsval(cx, p, rval);
1614}
1615
1616// Wrap an object "p" which is not using WebIDL bindings yet. Just like the
1617// variant that takes an nsWrapperCache above, but will try to auto-derive the
1618// nsWrapperCache* from "p".
1619template <class T>
1620inline bool WrapObject(JSContext* cx, T* p, const nsIID* iid,
1621 JS::MutableHandle<JS::Value> rval) {
1622 return WrapObject(cx, p, GetWrapperCache(p), iid, rval);
1623}
1624
1625// Just like the WrapObject above, but without requiring you to pick which
1626// interface you're wrapping as. This should only be used for objects that have
1627// classinfo, for which it doesn't matter what IID is used to wrap.
1628template <class T>
1629inline bool WrapObject(JSContext* cx, T* p, JS::MutableHandle<JS::Value> rval) {
1630 return WrapObject(cx, p, nullptr, rval);
1631}
1632
1633// Helper to make it possible to wrap directly out of an nsCOMPtr
1634template <class T>
1635inline bool WrapObject(JSContext* cx, const nsCOMPtr<T>& p, const nsIID* iid,
1636 JS::MutableHandle<JS::Value> rval) {
1637 return WrapObject(cx, p.get(), iid, rval);
1638}
1639
1640// Helper to make it possible to wrap directly out of an nsCOMPtr
1641template <class T>
1642inline bool WrapObject(JSContext* cx, const nsCOMPtr<T>& p,
1643 JS::MutableHandle<JS::Value> rval) {
1644 return WrapObject(cx, p, nullptr, rval);
1645}
1646
1647// Helper to make it possible to wrap directly out of an nsRefPtr
1648template <class T>
1649inline bool WrapObject(JSContext* cx, const RefPtr<T>& p, const nsIID* iid,
1650 JS::MutableHandle<JS::Value> rval) {
1651 return WrapObject(cx, p.get(), iid, rval);
1652}
1653
1654// Helper to make it possible to wrap directly out of an nsRefPtr
1655template <class T>
1656inline bool WrapObject(JSContext* cx, const RefPtr<T>& p,
1657 JS::MutableHandle<JS::Value> rval) {
1658 return WrapObject(cx, p, nullptr, rval);
1659}
1660
1661// Specialization to make it easy to use WrapObject in codegen.
1662template <>
1663inline bool WrapObject<JSObject>(JSContext* cx, JSObject* p,
1664 JS::MutableHandle<JS::Value> rval) {
1665 rval.set(JS::ObjectOrNullValue(p));
1666 return true;
1667}
1668
1669inline bool WrapObject(JSContext* cx, JSObject& p,
1670 JS::MutableHandle<JS::Value> rval) {
1671 rval.set(JS::ObjectValue(p));
1672 return true;
1673}
1674
1675bool WrapObject(JSContext* cx, const WindowProxyHolder& p,
1676 JS::MutableHandle<JS::Value> rval);
1677
1678// Given an object "p" that inherits from nsISupports, wrap it and return the
1679// result. Null is returned on wrapping failure. This is somewhat similar to
1680// WrapObject() above, but does NOT allow Xrays around the result, since we
1681// don't want those for our parent object.
1682template <typename T>
1683static inline JSObject* WrapNativeISupports(JSContext* cx, T* p,
1684 nsWrapperCache* cache) {
1685 JS::Rooted<JSObject*> retval(cx);
1686 {
1687 xpcObjectHelper helper(ToSupports(p), cache);
1688 JS::Rooted<JSObject*> scope(cx, JS::CurrentGlobalOrNull(cx));
1689 JS::Rooted<JS::Value> v(cx);
1690 retval = XPCOMObjectToJsval(cx, scope, helper, nullptr, false, &v)
1691 ? v.toObjectOrNull()
1692 : nullptr;
1693 }
1694 return retval;
1695}
1696
1697// Wrapping of our native parent, for cases when it's a WebIDL object.
1698template <typename T, bool hasWrapObject = NativeHasMember<T>::WrapObject>
1699struct WrapNativeHelper {
1700 static inline JSObject* Wrap(JSContext* cx, T* parent,
1701 nsWrapperCache* cache) {
1702 MOZ_ASSERT(cache)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(cache)>::isValid, "invalid assertion condition");
if ((__builtin_expect(!!(!(!!(cache))), 0))) { do { } while (
false); MOZ_ReportAssertionFailure("cache", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1702); AnnotateMozCrashReason("MOZ_ASSERT" "(" "cache" ")")
; do { *((volatile int*)__null) = 1702; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1703
1704 JSObject* obj;
1705 if ((obj = cache->GetWrapper())) {
1706 // GetWrapper always unmarks gray.
1707 JS::AssertObjectIsNotGray(obj);
1708 return obj;
1709 }
1710
1711 // WrapObject never returns a gray thing.
1712 obj = parent->WrapObject(cx, nullptr);
1713 JS::AssertObjectIsNotGray(obj);
1714
1715 return obj;
1716 }
1717};
1718
1719// Wrapping of our native parent, for cases when it's not a WebIDL object. In
1720// this case it must be nsISupports.
1721template <typename T>
1722struct WrapNativeHelper<T, false> {
1723 static inline JSObject* Wrap(JSContext* cx, T* parent,
1724 nsWrapperCache* cache) {
1725 JSObject* obj;
1726 if (cache && (obj = cache->GetWrapper())) {
1727#ifdef DEBUG1
1728 JS::Rooted<JSObject*> rootedObj(cx, obj);
1729 NS_ASSERTION(WrapNativeISupports(cx, parent, cache) == rootedObj,do { if (!(WrapNativeISupports(cx, parent, cache) == rootedObj
)) { NS_DebugBreak(NS_DEBUG_ASSERTION, "Unexpected object in nsWrapperCache"
, "WrapNativeISupports(cx, parent, cache) == rootedObj", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1730); MOZ_PretendNoReturn(); } } while (0)
1730 "Unexpected object in nsWrapperCache")do { if (!(WrapNativeISupports(cx, parent, cache) == rootedObj
)) { NS_DebugBreak(NS_DEBUG_ASSERTION, "Unexpected object in nsWrapperCache"
, "WrapNativeISupports(cx, parent, cache) == rootedObj", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1730); MOZ_PretendNoReturn(); } } while (0)
;
1731 obj = rootedObj;
1732#endif
1733 JS::AssertObjectIsNotGray(obj);
1734 return obj;
1735 }
1736
1737 obj = WrapNativeISupports(cx, parent, cache);
1738 JS::AssertObjectIsNotGray(obj);
1739 return obj;
1740 }
1741};
1742
1743// Finding the associated global for an object.
1744template <typename T>
1745static inline JSObject* FindAssociatedGlobal(
1746 JSContext* cx, T* p, nsWrapperCache* cache,
1747 mozilla::dom::ReflectionScope scope =
1748 mozilla::dom::ReflectionScope::Content) {
1749 if (!p) {
1750 return JS::CurrentGlobalOrNull(cx);
1751 }
1752
1753 JSObject* obj = WrapNativeHelper<T>::Wrap(cx, p, cache);
1754 if (!obj) {
1755 return nullptr;
1756 }
1757 JS::AssertObjectIsNotGray(obj);
1758
1759 // The object is never a CCW but it may not be in the current compartment of
1760 // the JSContext.
1761 obj = JS::GetNonCCWObjectGlobal(obj);
1762
1763 switch (scope) {
1764 case mozilla::dom::ReflectionScope::NAC: {
1765 return xpc::NACScope(obj);
1766 }
1767
1768 case mozilla::dom::ReflectionScope::UAWidget: {
1769 // If scope is set to UAWidgetScope, it means that the canonical reflector
1770 // for this native object should live in the UA widget scope.
1771 if (xpc::IsInUAWidgetScope(obj)) {
1772 return obj;
1773 }
1774 JS::Rooted<JSObject*> rootedObj(cx, obj);
1775 JSObject* uaWidgetScope = xpc::GetUAWidgetScope(cx, rootedObj);
1776 MOZ_ASSERT_IF(uaWidgetScope, JS_IsGlobalObject(uaWidgetScope))do { if (uaWidgetScope) { do { static_assert( mozilla::detail
::AssertionConditionType<decltype(JS_IsGlobalObject(uaWidgetScope
))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(JS_IsGlobalObject(uaWidgetScope)))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("JS_IsGlobalObject(uaWidgetScope)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1776); AnnotateMozCrashReason("MOZ_ASSERT" "(" "JS_IsGlobalObject(uaWidgetScope)"
")"); do { *((volatile int*)__null) = 1776; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false); } } while (
false)
;
1777 JS::AssertObjectIsNotGray(uaWidgetScope);
1778 return uaWidgetScope;
1779 }
1780
1781 case ReflectionScope::Content:
1782 return obj;
1783 }
1784
1785 MOZ_CRASH("Unknown ReflectionScope variant")do { do { } while (false); MOZ_ReportCrash("" "Unknown ReflectionScope variant"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1785); AnnotateMozCrashReason("MOZ_CRASH(" "Unknown ReflectionScope variant"
")"); do { *((volatile int*)__null) = 1785; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
1786
1787 return nullptr;
1788}
1789
1790// Finding of the associated global for an object, when we don't want to
1791// explicitly pass in things like the nsWrapperCache for it.
1792template <typename T>
1793static inline JSObject* FindAssociatedGlobal(JSContext* cx, const T& p) {
1794 return FindAssociatedGlobal(cx, GetParentPointer(p), GetWrapperCache(p),
1795 GetReflectionScope(p));
1796}
1797
1798// Specialization for the case of nsIGlobalObject, since in that case
1799// we can just get the JSObject* directly.
1800template <>
1801inline JSObject* FindAssociatedGlobal(JSContext* cx,
1802 nsIGlobalObject* const& p) {
1803 if (!p) {
1804 return JS::CurrentGlobalOrNull(cx);
1805 }
1806
1807 JSObject* global = p->GetGlobalJSObject();
1808 if (!global) {
1809 // nsIGlobalObject doesn't have a JS object anymore,
1810 // fallback to the current global.
1811 return JS::CurrentGlobalOrNull(cx);
1812 }
1813
1814 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)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1814); AnnotateMozCrashReason("MOZ_ASSERT" "(" "JS_IsGlobalObject(global)"
")"); do { *((volatile int*)__null) = 1814; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1815 JS::AssertObjectIsNotGray(global);
1816 return global;
1817}
1818
1819template <typename T,
1820 bool hasAssociatedGlobal = NativeHasMember<T>::GetParentObject>
1821struct FindAssociatedGlobalForNative {
1822 static JSObject* Get(JSContext* cx, JS::Handle<JSObject*> obj) {
1823 MOZ_ASSERT(js::IsObjectInContextCompartment(obj, cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(js::IsObjectInContextCompartment(obj, cx))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(js::IsObjectInContextCompartment(obj, cx)))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("js::IsObjectInContextCompartment(obj, cx)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1823); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(obj, cx)"
")"); do { *((volatile int*)__null) = 1823; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1824 T* native = UnwrapDOMObject<T>(obj);
1825 return FindAssociatedGlobal(cx, native->GetParentObject());
1826 }
1827};
1828
1829template <typename T>
1830struct FindAssociatedGlobalForNative<T, false> {
1831 static JSObject* Get(JSContext* cx, JS::Handle<JSObject*> obj) {
1832 MOZ_CRASH()do { do { } while (false); MOZ_ReportCrash("" , "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 1832); AnnotateMozCrashReason("MOZ_CRASH(" ")"); do { *((volatile
int*)__null) = 1832; __attribute__((nomerge)) ::abort(); } while
(false); } while (false)
;
1833 return nullptr;
1834 }
1835};
1836
1837// Helper for calling GetOrCreateDOMReflector with smart pointers
1838// (UniquePtr/RefPtr/nsCOMPtr) or references.
1839template <class T, bool isSmartPtr = IsSmartPtr<T>::value>
1840struct GetOrCreateDOMReflectorHelper {
1841 static inline bool GetOrCreate(JSContext* cx, const T& value,
1842 JS::Handle<JSObject*> givenProto,
1843 JS::MutableHandle<JS::Value> rval) {
1844 return GetOrCreateDOMReflector(cx, value.get(), rval, givenProto);
1845 }
1846};
1847
1848template <class T>
1849struct GetOrCreateDOMReflectorHelper<T, false> {
1850 static inline bool GetOrCreate(JSContext* cx, T& value,
1851 JS::Handle<JSObject*> givenProto,
1852 JS::MutableHandle<JS::Value> rval) {
1853 static_assert(IsRefcounted<T>::value, "Don't pass owned classes in here.");
1854 return GetOrCreateDOMReflector(cx, &value, rval, givenProto);
1855 }
1856};
1857
1858template <class T>
1859inline bool GetOrCreateDOMReflector(
1860 JSContext* cx, T& value, JS::MutableHandle<JS::Value> rval,
1861 JS::Handle<JSObject*> givenProto = nullptr) {
1862 return GetOrCreateDOMReflectorHelper<T>::GetOrCreate(cx, value, givenProto,
1863 rval);
1864}
1865
1866// Helper for calling GetOrCreateDOMReflectorNoWrap with smart pointers
1867// (UniquePtr/RefPtr/nsCOMPtr) or references.
1868template <class T, bool isSmartPtr = IsSmartPtr<T>::value>
1869struct GetOrCreateDOMReflectorNoWrapHelper {
1870 static inline bool GetOrCreate(JSContext* cx, const T& value,
1871 JS::MutableHandle<JS::Value> rval) {
1872 return GetOrCreateDOMReflectorNoWrap(cx, value.get(), rval);
1873 }
1874};
1875
1876template <class T>
1877struct GetOrCreateDOMReflectorNoWrapHelper<T, false> {
1878 static inline bool GetOrCreate(JSContext* cx, T& value,
1879 JS::MutableHandle<JS::Value> rval) {
1880 return GetOrCreateDOMReflectorNoWrap(cx, &value, rval);
1881 }
1882};
1883
1884template <class T>
1885inline bool GetOrCreateDOMReflectorNoWrap(JSContext* cx, T& value,
1886 JS::MutableHandle<JS::Value> rval) {
1887 return GetOrCreateDOMReflectorNoWrapHelper<T>::GetOrCreate(cx, value, rval);
1888}
1889
1890template <class T>
1891inline JSObject* GetCallbackFromCallbackObject(JSContext* aCx, T* aObj) {
1892 return aObj->Callback(aCx);
1893}
1894
1895// Helper for getting the callback JSObject* of a smart ptr around a
1896// CallbackObject or a reference to a CallbackObject or something like
1897// that.
1898template <class T, bool isSmartPtr = IsSmartPtr<T>::value>
1899struct GetCallbackFromCallbackObjectHelper {
1900 static inline JSObject* Get(JSContext* aCx, const T& aObj) {
1901 return GetCallbackFromCallbackObject(aCx, aObj.get());
1902 }
1903};
1904
1905template <class T>
1906struct GetCallbackFromCallbackObjectHelper<T, false> {
1907 static inline JSObject* Get(JSContext* aCx, T& aObj) {
1908 return GetCallbackFromCallbackObject(aCx, &aObj);
1909 }
1910};
1911
1912template <class T>
1913inline JSObject* GetCallbackFromCallbackObject(JSContext* aCx, T& aObj) {
1914 return GetCallbackFromCallbackObjectHelper<T>::Get(aCx, aObj);
1915}
1916
1917static inline bool AtomizeAndPinJSString(JSContext* cx, jsid& id,
1918 const char* chars) {
1919 if (JSString* str = ::JS_AtomizeAndPinString(cx, chars)) {
1920 id = JS::PropertyKey::fromPinnedString(str);
1921 return true;
1922 }
1923 return false;
1924}
1925
1926void GetInterfaceImpl(JSContext* aCx, nsIInterfaceRequestor* aRequestor,
1927 nsWrapperCache* aCache, JS::Handle<JS::Value> aIID,
1928 JS::MutableHandle<JS::Value> aRetval,
1929 ErrorResult& aError);
1930
1931template <class T>
1932void GetInterface(JSContext* aCx, T* aThis, JS::Handle<JS::Value> aIID,
1933 JS::MutableHandle<JS::Value> aRetval, ErrorResult& aError) {
1934 GetInterfaceImpl(aCx, aThis, aThis, aIID, aRetval, aError);
1935}
1936
1937bool ThrowingConstructor(JSContext* cx, unsigned argc, JS::Value* vp);
1938
1939bool ThrowConstructorWithoutNew(JSContext* cx, const char* name);
1940
1941// Helper for throwing an "invalid this" exception.
1942bool ThrowInvalidThis(JSContext* aCx, const JS::CallArgs& aArgs,
1943 bool aSecurityError, prototypes::ID aProtoId);
1944
1945bool GetPropertyOnPrototype(JSContext* cx, JS::Handle<JSObject*> proxy,
1946 JS::Handle<JS::Value> receiver, JS::Handle<jsid> id,
1947 bool* found, JS::MutableHandle<JS::Value> vp);
1948
1949//
1950bool HasPropertyOnPrototype(JSContext* cx, JS::Handle<JSObject*> proxy,
1951 JS::Handle<jsid> id, bool* has);
1952
1953// Append the property names in "names" to "props". If
1954// shadowPrototypeProperties is false then skip properties that are also
1955// present on the proto chain of proxy. If shadowPrototypeProperties is true,
1956// then the "proxy" argument is ignored.
1957bool AppendNamedPropertyIds(JSContext* cx, JS::Handle<JSObject*> proxy,
1958 nsTArray<nsString>& names,
1959 bool shadowPrototypeProperties,
1960 JS::MutableHandleVector<jsid> props);
1961
1962enum StringificationBehavior { eStringify, eEmpty, eNull };
1963
1964static inline JSString* ConvertJSValueToJSString(JSContext* cx,
1965 JS::Handle<JS::Value> v) {
1966 if (MOZ_LIKELY(v.isString())(__builtin_expect(!!(v.isString()), 1))) {
1967 return v.toString();
1968 }
1969 return JS::ToString(cx, v);
1970}
1971
1972template <typename T>
1973static inline bool ConvertJSValueToString(
1974 JSContext* cx, JS::Handle<JS::Value> v,
1975 StringificationBehavior nullBehavior,
1976 StringificationBehavior undefinedBehavior, T& result) {
1977 JSString* s;
1978 if (v.isString()) {
1979 s = v.toString();
1980 } else {
1981 StringificationBehavior behavior;
1982 if (v.isNull()) {
1983 behavior = nullBehavior;
1984 } else if (v.isUndefined()) {
1985 behavior = undefinedBehavior;
1986 } else {
1987 behavior = eStringify;
1988 }
1989
1990 if (behavior != eStringify) {
1991 if (behavior == eEmpty) {
1992 result.Truncate();
1993 } else {
1994 result.SetIsVoid(true);
1995 }
1996 return true;
1997 }
1998
1999 s = JS::ToString(cx, v);
2000 if (!s) {
2001 return false;
2002 }
2003 }
2004
2005 return AssignJSString(cx, result, s);
2006}
2007
2008template <typename T>
2009static inline bool ConvertJSValueToString(
2010 JSContext* cx, JS::Handle<JS::Value> v,
2011 const char* /* unused sourceDescription */, T& result) {
2012 return ConvertJSValueToString(cx, v, eStringify, eStringify, result);
2013}
2014
2015[[nodiscard]] bool NormalizeUSVString(nsAString& aString);
2016
2017[[nodiscard]] bool NormalizeUSVString(
2018 binding_detail::FakeString<char16_t>& aString);
2019
2020template <typename T>
2021static inline bool ConvertJSValueToUSVString(
2022 JSContext* cx, JS::Handle<JS::Value> v,
2023 const char* /* unused sourceDescription */, T& result) {
2024 if (!ConvertJSValueToString(cx, v, eStringify, eStringify, result)) {
2025 return false;
2026 }
2027
2028 if (!NormalizeUSVString(result)) {
2029 JS_ReportOutOfMemory(cx);
2030 return false;
2031 }
2032
2033 return true;
2034}
2035
2036template <typename T>
2037inline bool ConvertIdToString(JSContext* cx, JS::Handle<JS::PropertyKey> id,
2038 T& result, bool& isSymbol) {
2039 if (MOZ_LIKELY(id.isString())(__builtin_expect(!!(id.isString()), 1))) {
2040 if (!AssignJSString(cx, result, id.toString())) {
2041 return false;
2042 }
2043 } else if (id.isSymbol()) {
2044 isSymbol = true;
2045 return true;
2046 } else {
2047 JS::Rooted<JS::Value> nameVal(cx, js::IdToValue(id));
2048 if (!ConvertJSValueToString(cx, nameVal, eStringify, eStringify, result)) {
2049 return false;
2050 }
2051 }
2052 isSymbol = false;
2053 return true;
2054}
2055
2056bool ConvertJSValueToByteString(BindingCallContext& cx, JS::Handle<JS::Value> v,
2057 bool nullable, const char* sourceDescription,
2058 nsACString& result);
2059
2060inline bool ConvertJSValueToByteString(BindingCallContext& cx,
2061 JS::Handle<JS::Value> v,
2062 const char* sourceDescription,
2063 nsACString& result) {
2064 return ConvertJSValueToByteString(cx, v, false, sourceDescription, result);
2065}
2066
2067template <typename T>
2068void DoTraceSequence(JSTracer* trc, FallibleTArray<T>& seq);
2069template <typename T>
2070void DoTraceSequence(JSTracer* trc, nsTArray<T>& seq);
2071
2072// Class used to trace sequences, with specializations for various
2073// sequence types.
2074template <typename T, bool isDictionary = is_dom_dictionary<T>,
2075 bool isTypedArray = is_dom_typed_array<T>,
2076 bool isOwningUnion = is_dom_owning_union<T>>
2077class SequenceTracer {
2078 explicit SequenceTracer() = delete; // Should never be instantiated
2079};
2080
2081// sequence<object> or sequence<object?>
2082template <>
2083class SequenceTracer<JSObject*, false, false, false> {
2084 explicit SequenceTracer() = delete; // Should never be instantiated
2085
2086 public:
2087 static void TraceSequence(JSTracer* trc, JSObject** objp, JSObject** end) {
2088 for (; objp != end; ++objp) {
2089 JS::TraceRoot(trc, objp, "sequence<object>");
2090 }
2091 }
2092};
2093
2094// sequence<any>
2095template <>
2096class SequenceTracer<JS::Value, false, false, false> {
2097 explicit SequenceTracer() = delete; // Should never be instantiated
2098
2099 public:
2100 static void TraceSequence(JSTracer* trc, JS::Value* valp, JS::Value* end) {
2101 for (; valp != end; ++valp) {
2102 JS::TraceRoot(trc, valp, "sequence<any>");
2103 }
2104 }
2105};
2106
2107// sequence<sequence<T>>
2108template <typename T>
2109class SequenceTracer<Sequence<T>, false, false, false> {
2110 explicit SequenceTracer() = delete; // Should never be instantiated
2111
2112 public:
2113 static void TraceSequence(JSTracer* trc, Sequence<T>* seqp,
2114 Sequence<T>* end) {
2115 for (; seqp != end; ++seqp) {
2116 DoTraceSequence(trc, *seqp);
2117 }
2118 }
2119};
2120
2121// sequence<sequence<T>> as return value
2122template <typename T>
2123class SequenceTracer<nsTArray<T>, false, false, false> {
2124 explicit SequenceTracer() = delete; // Should never be instantiated
2125
2126 public:
2127 static void TraceSequence(JSTracer* trc, nsTArray<T>* seqp,
2128 nsTArray<T>* end) {
2129 for (; seqp != end; ++seqp) {
2130 DoTraceSequence(trc, *seqp);
2131 }
2132 }
2133};
2134
2135// sequence<someDictionary>
2136template <typename T>
2137class SequenceTracer<T, true, false, false> {
2138 explicit SequenceTracer() = delete; // Should never be instantiated
2139
2140 public:
2141 static void TraceSequence(JSTracer* trc, T* dictp, T* end) {
2142 for (; dictp != end; ++dictp) {
2143 dictp->TraceDictionary(trc);
2144 }
2145 }
2146};
2147
2148// sequence<SomeTypedArray>
2149template <typename T>
2150class SequenceTracer<T, false, true, false> {
2151 explicit SequenceTracer() = delete; // Should never be instantiated
2152
2153 public:
2154 static void TraceSequence(JSTracer* trc, T* arrayp, T* end) {
2155 for (; arrayp != end; ++arrayp) {
2156 arrayp->TraceSelf(trc);
2157 }
2158 }
2159};
2160
2161// sequence<SomeOwningUnion>
2162template <typename T>
2163class SequenceTracer<T, false, false, true> {
2164 explicit SequenceTracer() = delete; // Should never be instantiated
2165
2166 public:
2167 static void TraceSequence(JSTracer* trc, T* arrayp, T* end) {
2168 for (; arrayp != end; ++arrayp) {
2169 arrayp->TraceUnion(trc);
2170 }
2171 }
2172};
2173
2174// sequence<T?> with T? being a Nullable<T>
2175template <typename T>
2176class SequenceTracer<Nullable<T>, false, false, false> {
2177 explicit SequenceTracer() = delete; // Should never be instantiated
2178
2179 public:
2180 static void TraceSequence(JSTracer* trc, Nullable<T>* seqp,
2181 Nullable<T>* end) {
2182 for (; seqp != end; ++seqp) {
2183 if (!seqp->IsNull()) {
2184 // Pretend like we actually have a length-one sequence here so
2185 // we can do template instantiation correctly for T.
2186 T& val = seqp->Value();
2187 T* ptr = &val;
2188 SequenceTracer<T>::TraceSequence(trc, ptr, ptr + 1);
2189 }
2190 }
2191 }
2192};
2193
2194template <typename K, typename V>
2195void TraceRecord(JSTracer* trc, Record<K, V>& record) {
2196 for (auto& entry : record.Entries()) {
2197 // Act like it's a one-element sequence to leverage all that infrastructure.
2198 SequenceTracer<V>::TraceSequence(trc, &entry.mValue, &entry.mValue + 1);
2199 }
2200}
2201
2202// sequence<record>
2203template <typename K, typename V>
2204class SequenceTracer<Record<K, V>, false, false, false> {
2205 explicit SequenceTracer() = delete; // Should never be instantiated
2206
2207 public:
2208 static void TraceSequence(JSTracer* trc, Record<K, V>* seqp,
2209 Record<K, V>* end) {
2210 for (; seqp != end; ++seqp) {
2211 TraceRecord(trc, *seqp);
2212 }
2213 }
2214};
2215
2216template <typename T>
2217void DoTraceSequence(JSTracer* trc, FallibleTArray<T>& seq) {
2218 SequenceTracer<T>::TraceSequence(trc, seq.Elements(),
2219 seq.Elements() + seq.Length());
2220}
2221
2222template <typename T>
2223void DoTraceSequence(JSTracer* trc, nsTArray<T>& seq) {
2224 SequenceTracer<T>::TraceSequence(trc, seq.Elements(),
2225 seq.Elements() + seq.Length());
2226}
2227
2228// Rooter class for sequences; this is what we mostly use in the codegen
2229template <typename T>
2230class MOZ_RAII SequenceRooter final : private JS::CustomAutoRooter {
2231 public:
2232 template <typename CX>
2233 SequenceRooter(const CX& cx, FallibleTArray<T>* aSequence)
2234 : JS::CustomAutoRooter(cx),
2235 mFallibleArray(aSequence),
2236 mSequenceType(eFallibleArray) {}
2237
2238 template <typename CX>
2239 SequenceRooter(const CX& cx, nsTArray<T>* aSequence)
2240 : JS::CustomAutoRooter(cx),
2241 mInfallibleArray(aSequence),
2242 mSequenceType(eInfallibleArray) {}
2243
2244 template <typename CX>
2245 SequenceRooter(const CX& cx, Nullable<nsTArray<T>>* aSequence)
2246 : JS::CustomAutoRooter(cx),
2247 mNullableArray(aSequence),
2248 mSequenceType(eNullableArray) {}
2249
2250 private:
2251 enum SequenceType { eInfallibleArray, eFallibleArray, eNullableArray };
2252
2253 virtual void trace(JSTracer* trc) override {
2254 if (mSequenceType == eFallibleArray) {
2255 DoTraceSequence(trc, *mFallibleArray);
2256 } else if (mSequenceType == eInfallibleArray) {
2257 DoTraceSequence(trc, *mInfallibleArray);
2258 } else {
2259 MOZ_ASSERT(mSequenceType == eNullableArray)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(mSequenceType == eNullableArray)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(mSequenceType == eNullableArray
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"mSequenceType == eNullableArray", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 2259); AnnotateMozCrashReason("MOZ_ASSERT" "(" "mSequenceType == eNullableArray"
")"); do { *((volatile int*)__null) = 2259; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
2260 if (!mNullableArray->IsNull()) {
2261 DoTraceSequence(trc, mNullableArray->Value());
2262 }
2263 }
2264 }
2265
2266 union {
2267 nsTArray<T>* mInfallibleArray;
2268 FallibleTArray<T>* mFallibleArray;
2269 Nullable<nsTArray<T>>* mNullableArray;
2270 };
2271
2272 SequenceType mSequenceType;
2273};
2274
2275// Rooter class for Record; this is what we mostly use in the codegen.
2276template <typename K, typename V>
2277class MOZ_RAII RecordRooter final : private JS::CustomAutoRooter {
2278 public:
2279 template <typename CX>
2280 RecordRooter(const CX& cx, Record<K, V>* aRecord)
2281 : JS::CustomAutoRooter(cx), mRecord(aRecord), mRecordType(eRecord) {}
2282
2283 template <typename CX>
2284 RecordRooter(const CX& cx, Nullable<Record<K, V>>* aRecord)
2285 : JS::CustomAutoRooter(cx),
2286 mNullableRecord(aRecord),
2287 mRecordType(eNullableRecord) {}
2288
2289 private:
2290 enum RecordType { eRecord, eNullableRecord };
2291
2292 virtual void trace(JSTracer* trc) override {
2293 if (mRecordType == eRecord) {
2294 TraceRecord(trc, *mRecord);
2295 } else {
2296 MOZ_ASSERT(mRecordType == eNullableRecord)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(mRecordType == eNullableRecord)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(mRecordType == eNullableRecord
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"mRecordType == eNullableRecord", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 2296); AnnotateMozCrashReason("MOZ_ASSERT" "(" "mRecordType == eNullableRecord"
")"); do { *((volatile int*)__null) = 2296; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
2297 if (!mNullableRecord->IsNull()) {
2298 TraceRecord(trc, mNullableRecord->Value());
2299 }
2300 }
2301 }
2302
2303 union {
2304 Record<K, V>* mRecord;
2305 Nullable<Record<K, V>>* mNullableRecord;
2306 };
2307
2308 RecordType mRecordType;
2309};
2310
2311template <typename T>
2312class MOZ_RAII RootedUnion : public T, private JS::CustomAutoRooter {
2313 public:
2314 template <typename CX>
2315 explicit RootedUnion(const CX& cx) : T(), JS::CustomAutoRooter(cx) {}
2316
2317 virtual void trace(JSTracer* trc) override { this->TraceUnion(trc); }
2318};
2319
2320template <typename T>
2321class MOZ_STACK_CLASS NullableRootedUnion : public Nullable<T>,
2322 private JS::CustomAutoRooter {
2323 public:
2324 template <typename CX>
2325 explicit NullableRootedUnion(const CX& cx)
2326 : Nullable<T>(), JS::CustomAutoRooter(cx) {}
2327
2328 virtual void trace(JSTracer* trc) override {
2329 if (!this->IsNull()) {
2330 this->Value().TraceUnion(trc);
2331 }
2332 }
2333};
2334
2335inline bool AddStringToIDVector(JSContext* cx,
2336 JS::MutableHandleVector<jsid> vector,
2337 const char* name) {
2338 return vector.growBy(1) &&
2339 AtomizeAndPinJSString(cx, *(vector[vector.length() - 1]).address(),
2340 name);
2341}
2342
2343// We use one JSNative to represent all DOM interface objects (so we can easily
2344// detect when we need to wrap them in an Xray wrapper). A pointer to the
2345// relevant DOMInterfaceInfo is stored in the
2346// INTERFACE_OBJECT_INFO_RESERVED_SLOT slot of the JSFunction object for a
2347// specific interface object. We store the real JSNative and the
2348// NativeProperties in a JSNativeHolder, held by the DOMInterfaceInfo.
2349bool InterfaceObjectJSNative(JSContext* cx, unsigned argc, JS::Value* vp);
2350
2351inline bool IsInterfaceObject(JSObject* obj) {
2352 return JS_IsNativeFunction(obj, InterfaceObjectJSNative);
2353}
2354
2355inline const DOMInterfaceInfo* InterfaceInfoFromObject(JSObject* obj) {
2356 MOZ_ASSERT(IsInterfaceObject(obj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsInterfaceObject(obj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsInterfaceObject(obj)))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("IsInterfaceObject(obj)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 2356); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsInterfaceObject(obj)"
")"); do { *((volatile int*)__null) = 2356; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
2357 const JS::Value& v =
2358 js::GetFunctionNativeReserved(obj, INTERFACE_OBJECT_INFO_RESERVED_SLOT);
2359 return static_cast<const DOMInterfaceInfo*>(v.toPrivate());
2360}
2361
2362inline const JSNativeHolder* NativeHolderFromInterfaceObject(JSObject* obj) {
2363 MOZ_ASSERT(IsInterfaceObject(obj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsInterfaceObject(obj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsInterfaceObject(obj)))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("IsInterfaceObject(obj)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 2363); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsInterfaceObject(obj)"
")"); do { *((volatile int*)__null) = 2363; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
2364 return &InterfaceInfoFromObject(obj)->nativeHolder;
2365}
2366
2367// We use one JSNative to represent all legacy factory functions (so we can
2368// easily detect when we need to wrap them in an Xray wrapper). We store the
2369// real JSNative and the NativeProperties in a JSNativeHolder in the
2370// LEGACY_FACTORY_FUNCTION_NATIVE_HOLDER_RESERVED_SLOT slot of the JSFunction
2371// object.
2372bool LegacyFactoryFunctionJSNative(JSContext* cx, unsigned argc, JS::Value* vp);
2373
2374inline bool IsLegacyFactoryFunction(JSObject* obj) {
2375 return JS_IsNativeFunction(obj, LegacyFactoryFunctionJSNative);
2376}
2377
2378inline const JSNativeHolder* NativeHolderFromLegacyFactoryFunction(
2379 JSObject* obj) {
2380 MOZ_ASSERT(IsLegacyFactoryFunction(obj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsLegacyFactoryFunction(obj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsLegacyFactoryFunction(obj)
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"IsLegacyFactoryFunction(obj)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 2380); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsLegacyFactoryFunction(obj)"
")"); do { *((volatile int*)__null) = 2380; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
2381 const JS::Value& v = js::GetFunctionNativeReserved(
2382 obj, LEGACY_FACTORY_FUNCTION_NATIVE_HOLDER_RESERVED_SLOT);
2383 return static_cast<const JSNativeHolder*>(v.toPrivate());
2384}
2385
2386inline const JSNativeHolder* NativeHolderFromObject(JSObject* obj) {
2387 return IsInterfaceObject(obj) ? NativeHolderFromInterfaceObject(obj)
2388 : NativeHolderFromLegacyFactoryFunction(obj);
2389}
2390
2391// Implementation of the bits that XrayWrapper needs
2392
2393/**
2394 * This resolves operations, attributes and constants of the interfaces for obj.
2395 *
2396 * wrapper is the Xray JS object.
2397 * obj is the target object of the Xray, a binding's instance object or a
2398 * interface or interface prototype object.
2399 */
2400bool XrayResolveOwnProperty(
2401 JSContext* cx, JS::Handle<JSObject*> wrapper, JS::Handle<JSObject*> obj,
2402 JS::Handle<jsid> id,
2403 JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>> desc,
2404 bool& cacheOnHolder);
2405
2406/**
2407 * Define a property on obj through an Xray wrapper.
2408 *
2409 * wrapper is the Xray JS object.
2410 * obj is the target object of the Xray, a binding's instance object or a
2411 * interface or interface prototype object.
2412 * id and desc are the parameters for the property to be defined.
2413 * result is the out-parameter indicating success (read it only if
2414 * this returns true and also sets *done to true).
2415 * done will be set to true if a property was set as a result of this call
2416 * or if we want to always avoid setting this property
2417 * (i.e. indexed properties on DOM objects)
2418 */
2419bool XrayDefineProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
2420 JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
2421 JS::Handle<JS::PropertyDescriptor> desc,
2422 JS::ObjectOpResult& result, bool* done);
2423
2424/**
2425 * Add to props the property keys of all indexed or named properties of obj and
2426 * operations, attributes and constants of the interfaces for obj.
2427 *
2428 * wrapper is the Xray JS object.
2429 * obj is the target object of the Xray, a binding's instance object or a
2430 * interface or interface prototype object.
2431 * flags are JSITER_* flags.
2432 */
2433bool XrayOwnPropertyKeys(JSContext* cx, JS::Handle<JSObject*> wrapper,
2434 JS::Handle<JSObject*> obj, unsigned flags,
2435 JS::MutableHandleVector<jsid> props);
2436
2437/**
2438 * Returns the prototype to use for an Xray for a DOM object, wrapped in cx's
2439 * compartment. This always returns the prototype that would be used for a DOM
2440 * object if we ignore any changes that might have been done to the prototype
2441 * chain by JS, the XBL code or plugins.
2442 *
2443 * cx should be in the Xray's compartment.
2444 * obj is the target object of the Xray, a binding's instance object or an
2445 * interface or interface prototype object.
2446 */
2447inline bool XrayGetNativeProto(JSContext* cx, JS::Handle<JSObject*> obj,
2448 JS::MutableHandle<JSObject*> protop) {
2449 JS::Rooted<JSObject*> global(cx, JS::GetNonCCWObjectGlobal(obj));
2450 {
2451 JSAutoRealm ar(cx, global);
2452 const DOMJSClass* domClass = GetDOMClass(obj);
2453 if (domClass) {
2454 ProtoHandleGetter protoGetter = domClass->mGetProto;
2455 if (protoGetter) {
2456 protop.set(protoGetter(cx));
2457 } else {
2458 protop.set(JS::GetRealmObjectPrototype(cx));
2459 }
2460 } else if (JS_ObjectIsFunction(obj)) {
2461 if (IsLegacyFactoryFunction(obj)) {
2462 protop.set(JS::GetRealmFunctionPrototype(cx));
2463 } else {
2464 protop.set(InterfaceInfoFromObject(obj)->mGetParentProto(cx));
2465 }
2466 } else {
2467 const JSClass* clasp = JS::GetClass(obj);
2468 MOZ_ASSERT(IsDOMIfaceAndProtoClass(clasp))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(IsDOMIfaceAndProtoClass(clasp))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(IsDOMIfaceAndProtoClass(clasp
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("IsDOMIfaceAndProtoClass(clasp)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 2468); AnnotateMozCrashReason("MOZ_ASSERT" "(" "IsDOMIfaceAndProtoClass(clasp)"
")"); do { *((volatile int*)__null) = 2468; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
2469 ProtoGetter protoGetter =
2470 DOMIfaceAndProtoJSClass::FromJSClass(clasp)->mGetParentProto;
2471 protop.set(protoGetter(cx));
2472 }
2473 }
2474
2475 return JS_WrapObject(cx, protop);
2476}
2477
2478/**
2479 * Get the Xray expando class to use for the given DOM object.
2480 */
2481const JSClass* XrayGetExpandoClass(JSContext* cx, JS::Handle<JSObject*> obj);
2482
2483/**
2484 * Delete a named property, if any. Return value is false if exception thrown,
2485 * true otherwise. The caller should not do any more work after calling this
2486 * function, because it has no way whether a deletion was performed and hence
2487 * opresult already has state set on it. If callers ever need to change that,
2488 * add a "bool* found" argument and change the generated DeleteNamedProperty to
2489 * use it instead of a local variable.
2490 */
2491bool XrayDeleteNamedProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
2492 JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
2493 JS::ObjectOpResult& opresult);
2494
2495namespace binding_detail {
2496
2497// Default implementations of the NativePropertyHooks' mResolveOwnProperty and
2498// mEnumerateOwnProperties for WebIDL bindings implemented as proxies.
2499bool ResolveOwnProperty(
2500 JSContext* cx, JS::Handle<JSObject*> wrapper, JS::Handle<JSObject*> obj,
2501 JS::Handle<jsid> id,
2502 JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>> desc);
2503bool EnumerateOwnProperties(JSContext* cx, JS::Handle<JSObject*> wrapper,
2504 JS::Handle<JSObject*> obj,
2505 JS::MutableHandleVector<jsid> props);
2506
2507} // namespace binding_detail
2508
2509/**
2510 * Get the object which should be used to cache the return value of a property
2511 * getter in the case of a [Cached] or [StoreInSlot] property. `obj` is the
2512 * `this` value for our property getter that we're working with.
2513 *
2514 * This function can return null on failure to allocate the object, throwing on
2515 * the JSContext in the process.
2516 *
2517 * The isXray outparam will be set to true if obj is an Xray and false
2518 * otherwise.
2519 *
2520 * Note that the Slow version should only be called from
2521 * GetCachedSlotStorageObject.
2522 */
2523JSObject* GetCachedSlotStorageObjectSlow(JSContext* cx,
2524 JS::Handle<JSObject*> obj,
2525 bool* isXray);
2526
2527inline JSObject* GetCachedSlotStorageObject(JSContext* cx,
2528 JS::Handle<JSObject*> obj,
2529 bool* isXray) {
2530 if (IsDOMObject(obj)) {
2531 *isXray = false;
2532 return obj;
2533 }
2534
2535 return GetCachedSlotStorageObjectSlow(cx, obj, isXray);
2536}
2537
2538extern NativePropertyHooks sEmptyNativePropertyHooks;
2539
2540inline bool IsDOMConstructor(JSObject* obj) {
2541 return IsInterfaceObject(obj) || IsLegacyFactoryFunction(obj);
2542}
2543
2544inline bool UseDOMXray(JSObject* obj) {
2545 const JSClass* clasp = JS::GetClass(obj);
2546 return IsDOMClass(clasp) || IsDOMConstructor(obj) ||
2547 IsDOMIfaceAndProtoClass(clasp);
2548}
2549
2550// Helpers for creating a const version of a type.
2551template <typename T>
2552const T& Constify(T& arg) {
2553 return arg;
22
Returning without writing to 'arg.mImpl.mStorage.val.stack'
2554}
2555
2556// Helper for turning (Owning)NonNull<T> into T&
2557template <typename T>
2558T& NonNullHelper(T& aArg) {
2559 return aArg;
2560}
2561
2562template <typename T>
2563T& NonNullHelper(NonNull<T>& aArg) {
2564 return aArg;
2565}
2566
2567template <typename T>
2568const T& NonNullHelper(const NonNull<T>& aArg) {
2569 return aArg;
2570}
2571
2572template <typename T>
2573T& NonNullHelper(OwningNonNull<T>& aArg) {
2574 return aArg;
2575}
2576
2577template <typename T>
2578const T& NonNullHelper(const OwningNonNull<T>& aArg) {
2579 return aArg;
2580}
2581
2582template <typename CharT>
2583inline void NonNullHelper(NonNull<binding_detail::FakeString<CharT>>& aArg) {
2584 // This overload is here to make sure that we never end up applying
2585 // NonNullHelper to a NonNull<binding_detail::FakeString>. If we
2586 // try to, it should fail to compile, since presumably the caller will try to
2587 // use our nonexistent return value.
2588}
2589
2590template <typename CharT>
2591inline void NonNullHelper(
2592 const NonNull<binding_detail::FakeString<CharT>>& aArg) {
2593 // This overload is here to make sure that we never end up applying
2594 // NonNullHelper to a NonNull<binding_detail::FakeString>. If we
2595 // try to, it should fail to compile, since presumably the caller will try to
2596 // use our nonexistent return value.
2597}
2598
2599template <typename CharT>
2600inline void NonNullHelper(binding_detail::FakeString<CharT>& aArg) {
2601 // This overload is here to make sure that we never end up applying
2602 // NonNullHelper to a FakeString before we've constified it. If we
2603 // try to, it should fail to compile, since presumably the caller will try to
2604 // use our nonexistent return value.
2605}
2606
2607template <typename CharT>
2608MOZ_ALWAYS_INLINEinline const nsTSubstring<CharT>& NonNullHelper(
2609 const binding_detail::FakeString<CharT>& aArg) {
2610 return aArg;
2611}
2612
2613// Given a DOM reflector aObj, give its underlying DOM object a reflector in
2614// whatever global that underlying DOM object now thinks it should be in. If
2615// this is in a different compartment from aObj, aObj will become a
2616// cross-compatment wrapper for the new object. Otherwise, aObj will become the
2617// new object (via a brain transplant). If the new global is the same as the
2618// old global, we just keep using the same object.
2619//
2620// On entry to this method, aCx and aObj must be same-compartment.
2621void UpdateReflectorGlobal(JSContext* aCx, JS::Handle<JSObject*> aObj,
2622 ErrorResult& aError);
2623
2624// Helper for lenient getters/setters to report to console. If this
2625// returns false, we couldn't even get a global.
2626bool ReportLenientThisUnwrappingFailure(JSContext* cx, JSObject* obj);
2627
2628// Given a JSObject* that represents the chrome side of a JS-implemented WebIDL
2629// interface, get the nsIGlobalObject corresponding to the content side, if any.
2630// A false return means an exception was thrown.
2631bool GetContentGlobalForJSImplementedObject(BindingCallContext& cx,
2632 JS::Handle<JSObject*> obj,
2633 nsIGlobalObject** global);
2634
2635void ConstructJSImplementation(const char* aContractId,
2636 nsIGlobalObject* aGlobal,
2637 JS::MutableHandle<JSObject*> aObject,
2638 ErrorResult& aRv);
2639
2640// XXX Avoid pulling in the whole ScriptSettings.h, however there should be a
2641// unique declaration of this function somewhere else.
2642JS::RootingContext* RootingCx();
2643
2644template <typename T>
2645already_AddRefed<T> ConstructJSImplementation(const char* aContractId,
2646 nsIGlobalObject* aGlobal,
2647 ErrorResult& aRv) {
2648 JS::RootingContext* cx = RootingCx();
2649 JS::Rooted<JSObject*> jsImplObj(cx);
2650 ConstructJSImplementation(aContractId, aGlobal, &jsImplObj, aRv);
2651 if (aRv.Failed()) {
2652 return nullptr;
2653 }
2654
2655 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplObj))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplObj))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("!js::IsWrapper(jsImplObj)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 2655); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplObj)"
")"); do { *((volatile int*)__null) = 2655; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
2656 JS::Rooted<JSObject*> jsImplGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplObj));
2657 RefPtr<T> newObj = new T(jsImplObj, jsImplGlobal, aGlobal);
2658 return newObj.forget();
2659}
2660
2661template <typename T>
2662already_AddRefed<T> ConstructJSImplementation(const char* aContractId,
2663 const GlobalObject& aGlobal,
2664 ErrorResult& aRv) {
2665 nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
2666 if (!global) {
2667 aRv.Throw(NS_ERROR_FAILURE);
2668 return nullptr;
2669 }
2670
2671 return ConstructJSImplementation<T>(aContractId, global, aRv);
2672}
2673
2674/**
2675 * Convert an nsCString to jsval, returning true on success.
2676 * These functions are intended for ByteString implementations.
2677 * As such, the string is not UTF-8 encoded. Any UTF8 strings passed to these
2678 * methods will be mangled.
2679 */
2680inline bool NonVoidByteStringToJsval(JSContext* cx, const nsACString& str,
2681 JS::MutableHandle<JS::Value> rval) {
2682 return xpc::NonVoidLatin1StringToJsval(cx, str, rval);
2683}
2684inline bool ByteStringToJsval(JSContext* cx, const nsACString& str,
2685 JS::MutableHandle<JS::Value> rval) {
2686 if (str.IsVoid()) {
2687 rval.setNull();
2688 return true;
2689 }
2690 return NonVoidByteStringToJsval(cx, str, rval);
2691}
2692
2693// Convert an utf-8 encoded nsCString to jsval, returning true on success.
2694//
2695// TODO(bug 1606957): This could probably be better.
2696inline bool NonVoidUTF8StringToJsval(JSContext* cx, const nsACString& str,
2697 JS::MutableHandle<JS::Value> rval) {
2698 return xpc::NonVoidUTF8StringToJsval(cx, str, rval);
2699}
2700
2701inline bool UTF8StringToJsval(JSContext* cx, const nsACString& str,
2702 JS::MutableHandle<JS::Value> rval) {
2703 if (str.IsVoid()) {
2704 rval.setNull();
2705 return true;
2706 }
2707 return NonVoidUTF8StringToJsval(cx, str, rval);
2708}
2709
2710template <class T, bool isISupports = std::is_base_of<nsISupports, T>::value>
2711struct PreserveWrapperHelper {
2712 static void PreserveWrapper(T* aObject) {
2713 aObject->PreserveWrapper(aObject, NS_CYCLE_COLLECTION_PARTICIPANT(T)T::cycleCollection::GetParticipant());
2714 }
2715};
2716
2717template <class T>
2718struct PreserveWrapperHelper<T, true> {
2719 static void PreserveWrapper(T* aObject) {
2720 aObject->PreserveWrapper(reinterpret_cast<nsISupports*>(aObject));
2721 }
2722};
2723
2724template <class T>
2725void PreserveWrapper(T* aObject) {
2726 PreserveWrapperHelper<T>::PreserveWrapper(aObject);
2727}
2728
2729template <class T, bool isISupports = std::is_base_of<nsISupports, T>::value>
2730struct CastingAssertions {
2731 static bool ToSupportsIsCorrect(T*) { return true; }
2732 static bool ToSupportsIsOnPrimaryInheritanceChain(T*, nsWrapperCache*) {
2733 return true;
2734 }
2735};
2736
2737template <class T>
2738struct CastingAssertions<T, true> {
2739 static bool ToSupportsIsCorrect(T* aObject) {
2740 return ToSupports(aObject) == reinterpret_cast<nsISupports*>(aObject);
2741 }
2742 static bool ToSupportsIsOnPrimaryInheritanceChain(T* aObject,
2743 nsWrapperCache* aCache) {
2744 return reinterpret_cast<void*>(aObject) != aCache;
2745 }
2746};
2747
2748template <class T>
2749bool ToSupportsIsCorrect(T* aObject) {
2750 return CastingAssertions<T>::ToSupportsIsCorrect(aObject);
2751}
2752
2753template <class T>
2754bool ToSupportsIsOnPrimaryInheritanceChain(T* aObject, nsWrapperCache* aCache) {
2755 return CastingAssertions<T>::ToSupportsIsOnPrimaryInheritanceChain(aObject,
2756 aCache);
2757}
2758
2759// Get the size of allocated memory to associate with a binding JSObject for a
2760// native object. This is supplied to the JS engine to allow it to schedule GC
2761// when necessary.
2762//
2763// This function supplies a default value and is overloaded for specific native
2764// object types.
2765inline size_t BindingJSObjectMallocBytes(void* aNativePtr) { return 0; }
2766
2767// The BindingJSObjectCreator class is supposed to be used by a caller that
2768// wants to create and initialise a binding JSObject. After initialisation has
2769// been successfully completed it should call InitializationSucceeded().
2770// The BindingJSObjectCreator object will root the JSObject until
2771// InitializationSucceeded() is called on it. If the native object for the
2772// binding is refcounted it will also hold a strong reference to it, that
2773// reference is transferred to the JSObject (which holds the native in a slot)
2774// when InitializationSucceeded() is called. If the BindingJSObjectCreator
2775// object is destroyed and InitializationSucceeded() was never called on it then
2776// the JSObject's slot holding the native will be set to undefined, and for a
2777// refcounted native the strong reference will be released.
2778template <class T>
2779class MOZ_STACK_CLASS BindingJSObjectCreator {
2780 public:
2781 explicit BindingJSObjectCreator(JSContext* aCx) : mReflector(aCx) {}
2782
2783 ~BindingJSObjectCreator() {
2784 if (mReflector) {
2785 JS::SetReservedSlot(mReflector, DOM_OBJECT_SLOT0, JS::UndefinedValue());
2786 }
2787 }
2788
2789 void CreateProxyObject(JSContext* aCx, const JSClass* aClass,
2790 const DOMProxyHandler* aHandler,
2791 JS::Handle<JSObject*> aProto, bool aLazyProto,
2792 T* aNative, JS::Handle<JS::Value> aExpandoValue,
2793 JS::MutableHandle<JSObject*> aReflector) {
2794 js::ProxyOptions options;
2795 options.setClass(aClass);
2796 options.setLazyProto(aLazyProto);
2797
2798 aReflector.set(
2799 js::NewProxyObject(aCx, aHandler, aExpandoValue, aProto, options));
2800 if (aReflector) {
2801 js::SetProxyReservedSlot(aReflector, DOM_OBJECT_SLOT0,
2802 JS::PrivateValue(aNative));
2803 mNative = aNative;
2804 mReflector = aReflector;
2805
2806 if (size_t mallocBytes = BindingJSObjectMallocBytes(aNative)) {
2807 JS::AddAssociatedMemory(aReflector, mallocBytes,
2808 JS::MemoryUse::DOMBinding);
2809 }
2810 }
2811 }
2812
2813 void CreateObject(JSContext* aCx, const JSClass* aClass,
2814 JS::Handle<JSObject*> aProto, T* aNative,
2815 JS::MutableHandle<JSObject*> aReflector) {
2816 aReflector.set(JS_NewObjectWithGivenProto(aCx, aClass, aProto));
2817 if (aReflector) {
2818 JS::SetReservedSlot(aReflector, DOM_OBJECT_SLOT0,
2819 JS::PrivateValue(aNative));
2820 mNative = aNative;
2821 mReflector = aReflector;
2822
2823 if (size_t mallocBytes = BindingJSObjectMallocBytes(aNative)) {
2824 JS::AddAssociatedMemory(aReflector, mallocBytes,
2825 JS::MemoryUse::DOMBinding);
2826 }
2827 }
2828 }
2829
2830 void InitializationSucceeded() {
2831 T* pointer;
2832 mNative.forget(&pointer);
2833 mReflector = nullptr;
2834 }
2835
2836 private:
2837 struct OwnedNative {
2838 // Make sure the native objects inherit from NonRefcountedDOMObject so
2839 // that we log their ctor and dtor.
2840 static_assert(std::is_base_of<NonRefcountedDOMObject, T>::value,
2841 "Non-refcounted objects with DOM bindings should inherit "
2842 "from NonRefcountedDOMObject.");
2843
2844 OwnedNative& operator=(T* aNative) {
2845 mNative = aNative;
2846 return *this;
2847 }
2848
2849 // This signature sucks, but it's the only one that will make a nsRefPtr
2850 // just forget about its pointer without warning.
2851 void forget(T** aResult) {
2852 *aResult = mNative;
2853 mNative = nullptr;
2854 }
2855
2856 // Keep track of the pointer for use in InitializationSucceeded().
2857 // The caller (or, after initialization succeeds, the JS object) retains
2858 // ownership of the object.
2859 T* mNative;
2860 };
2861
2862 JS::Rooted<JSObject*> mReflector;
2863 std::conditional_t<IsRefcounted<T>::value, RefPtr<T>, OwnedNative> mNative;
2864};
2865
2866template <class T>
2867struct DeferredFinalizerImpl {
2868 using SmartPtr = std::conditional_t<
2869 std::is_same_v<T, nsISupports>, nsCOMPtr<T>,
2870 std::conditional_t<IsRefcounted<T>::value, RefPtr<T>, UniquePtr<T>>>;
2871 typedef SegmentedVector<SmartPtr> SmartPtrArray;
2872
2873 static_assert(
2874 std::is_same_v<T, nsISupports> || !std::is_base_of<nsISupports, T>::value,
2875 "nsISupports classes should all use the nsISupports instantiation");
2876
2877 static inline void AppendAndTake(
2878 SegmentedVector<nsCOMPtr<nsISupports>>& smartPtrArray, nsISupports* ptr) {
2879 smartPtrArray.InfallibleAppend(dont_AddRef(ptr));
2880 }
2881 template <class U>
2882 static inline void AppendAndTake(SegmentedVector<RefPtr<U>>& smartPtrArray,
2883 U* ptr) {
2884 smartPtrArray.InfallibleAppend(dont_AddRef(ptr));
2885 }
2886 template <class U>
2887 static inline void AppendAndTake(SegmentedVector<UniquePtr<U>>& smartPtrArray,
2888 U* ptr) {
2889 smartPtrArray.InfallibleAppend(ptr);
2890 }
2891
2892 static void* AppendDeferredFinalizePointer(void* aData, void* aObject) {
2893 SmartPtrArray* pointers = static_cast<SmartPtrArray*>(aData);
2894 if (!pointers) {
2895 pointers = new SmartPtrArray();
2896 }
2897 AppendAndTake(*pointers, static_cast<T*>(aObject));
2898 return pointers;
2899 }
2900 static bool DeferredFinalize(uint32_t aSlice, void* aData) {
2901 MOZ_ASSERT(aSlice > 0, "nonsensical/useless call with aSlice == 0")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(aSlice > 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(aSlice > 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("aSlice > 0" " ("
"nonsensical/useless call with aSlice == 0" ")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 2901); AnnotateMozCrashReason("MOZ_ASSERT" "(" "aSlice > 0"
") (" "nonsensical/useless call with aSlice == 0" ")"); do {
*((volatile int*)__null) = 2901; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
2902 SmartPtrArray* pointers = static_cast<SmartPtrArray*>(aData);
2903 uint32_t oldLen = pointers->Length();
2904 if (oldLen < aSlice) {
2905 aSlice = oldLen;
2906 }
2907 uint32_t newLen = oldLen - aSlice;
2908 pointers->PopLastN(aSlice);
2909 if (newLen == 0) {
2910 delete pointers;
2911 return true;
2912 }
2913 return false;
2914 }
2915};
2916
2917template <class T, bool isISupports = std::is_base_of<nsISupports, T>::value>
2918struct DeferredFinalizer {
2919 static void AddForDeferredFinalization(T* aObject) {
2920 typedef DeferredFinalizerImpl<T> Impl;
2921 DeferredFinalize(Impl::AppendDeferredFinalizePointer,
2922 Impl::DeferredFinalize, aObject);
2923 }
2924};
2925
2926template <class T>
2927struct DeferredFinalizer<T, true> {
2928 static void AddForDeferredFinalization(T* aObject) {
2929 DeferredFinalize(reinterpret_cast<nsISupports*>(aObject));
2930 }
2931};
2932
2933template <class T>
2934static void AddForDeferredFinalization(T* aObject) {
2935 DeferredFinalizer<T>::AddForDeferredFinalization(aObject);
2936}
2937
2938// This returns T's CC participant if it participates in CC and does not inherit
2939// from nsISupports. Otherwise, it returns null. QI should be used to get the
2940// participant if T inherits from nsISupports.
2941template <class T, bool isISupports = std::is_base_of<nsISupports, T>::value>
2942class GetCCParticipant {
2943 // Helper for GetCCParticipant for classes that participate in CC.
2944 template <class U>
2945 static constexpr nsCycleCollectionParticipant* GetHelper(
2946 int, typename U::NS_CYCLE_COLLECTION_INNERCLASScycleCollection* dummy = nullptr) {
2947 return T::NS_CYCLE_COLLECTION_INNERCLASScycleCollection::GetParticipant();
2948 }
2949 // Helper for GetCCParticipant for classes that don't participate in CC.
2950 template <class U>
2951 static constexpr nsCycleCollectionParticipant* GetHelper(double) {
2952 return nullptr;
2953 }
2954
2955 public:
2956 static constexpr nsCycleCollectionParticipant* Get() {
2957 // Passing int() here will try to call the GetHelper that takes an int as
2958 // its first argument. If T doesn't participate in CC then substitution for
2959 // the second argument (with a default value) will fail and because of
2960 // SFINAE the next best match (the variant taking a double) will be called.
2961 return GetHelper<T>(int());
2962 }
2963};
2964
2965template <class T>
2966class GetCCParticipant<T, true> {
2967 public:
2968 static constexpr nsCycleCollectionParticipant* Get() { return nullptr; }
2969};
2970
2971void FinalizeGlobal(JS::GCContext* aGcx, JSObject* aObj);
2972
2973bool ResolveGlobal(JSContext* aCx, JS::Handle<JSObject*> aObj,
2974 JS::Handle<jsid> aId, bool* aResolvedp);
2975
2976bool MayResolveGlobal(const JSAtomState& aNames, jsid aId, JSObject* aMaybeObj);
2977
2978bool EnumerateGlobal(JSContext* aCx, JS::Handle<JSObject*> aObj,
2979 JS::MutableHandleVector<jsid> aProperties,
2980 bool aEnumerableOnly);
2981
2982struct CreateGlobalOptionsGeneric {
2983 static void TraceGlobal(JSTracer* aTrc, JSObject* aObj) {
2984 mozilla::dom::TraceProtoAndIfaceCache(aTrc, aObj);
2985 }
2986 static bool PostCreateGlobal(JSContext* aCx, JS::Handle<JSObject*> aGlobal) {
2987 MOZ_ALWAYS_TRUE(TryPreserveWrapper(aGlobal))do { if ((__builtin_expect(!!(TryPreserveWrapper(aGlobal)), 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" " (" "TryPreserveWrapper(aGlobal)"
")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 2987); AnnotateMozCrashReason("MOZ_DIAGNOSTIC_ASSERT" "(" "false"
") (" "TryPreserveWrapper(aGlobal)" ")"); do { *((volatile int
*)__null) = 2987; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false); } } while (false)
;
2988
2989 return true;
2990 }
2991};
2992
2993struct CreateGlobalOptionsWithXPConnect {
2994 static void TraceGlobal(JSTracer* aTrc, JSObject* aObj);
2995 static bool PostCreateGlobal(JSContext* aCx, JS::Handle<JSObject*> aGlobal);
2996};
2997
2998template <class T>
2999using IsGlobalWithXPConnect =
3000 std::integral_constant<bool,
3001 std::is_base_of<nsGlobalWindowInner, T>::value ||
3002 std::is_base_of<MessageManagerGlobal, T>::value>;
3003
3004template <class T>
3005struct CreateGlobalOptions
3006 : std::conditional_t<IsGlobalWithXPConnect<T>::value,
3007 CreateGlobalOptionsWithXPConnect,
3008 CreateGlobalOptionsGeneric> {
3009 static constexpr ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind =
3010 ProtoAndIfaceCache::NonWindowLike;
3011};
3012
3013template <>
3014struct CreateGlobalOptions<nsGlobalWindowInner>
3015 : public CreateGlobalOptionsWithXPConnect {
3016 static constexpr ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind =
3017 ProtoAndIfaceCache::WindowLike;
3018};
3019
3020uint64_t GetWindowID(void* aGlobal);
3021uint64_t GetWindowID(nsGlobalWindowInner* aGlobal);
3022uint64_t GetWindowID(DedicatedWorkerGlobalScope* aGlobal);
3023
3024// The return value is true if we created and successfully performed our part of
3025// the setup for the global, false otherwise.
3026//
3027// Typically this method's caller will want to ensure that
3028// xpc::InitGlobalObjectOptions is called before, and xpc::InitGlobalObject is
3029// called after, this method, to ensure that this global object and its
3030// compartment are consistent with other global objects.
3031template <class T, ProtoHandleGetter GetProto>
3032bool CreateGlobal(JSContext* aCx, T* aNative, nsWrapperCache* aCache,
3033 const JSClass* aClass, JS::RealmOptions& aOptions,
3034 JSPrincipals* aPrincipal,
3035 JS::MutableHandle<JSObject*> aGlobal) {
3036 AUTO_PROFILER_LABEL_RELEVANT_FOR_JS("Create global object", JS)mozilla::AutoProfilerLabel raiiObject3036( "Create global object"
, nullptr, JS::ProfilingCategoryPair::JS, uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
3037 aOptions.creationOptions()
3038 .setTrace(CreateGlobalOptions<T>::TraceGlobal)
3039 .setProfilerRealmID(GetWindowID(aNative));
3040 xpc::SetPrefableRealmOptions(aOptions);
3041
3042 aGlobal.set(JS_NewGlobalObject(aCx, aClass, aPrincipal,
3043 JS::DontFireOnNewGlobalHook, aOptions));
3044 if (!aGlobal) {
3045 NS_WARNING("Failed to create global")NS_DebugBreak(NS_DEBUG_WARNING, "Failed to create global", nullptr
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 3045)
;
3046 return false;
3047 }
3048
3049 JSAutoRealm ar(aCx, aGlobal);
3050
3051 {
3052 JS::SetReservedSlot(aGlobal, DOM_OBJECT_SLOT0, JS::PrivateValue(aNative));
3053 NS_ADDREF(aNative)(aNative)->AddRef();
3054
3055 aCache->SetWrapper(aGlobal);
3056
3057 dom::AllocateProtoAndIfaceCache(
3058 aGlobal, CreateGlobalOptions<T>::ProtoAndIfaceCacheKind);
3059
3060 if (!CreateGlobalOptions<T>::PostCreateGlobal(aCx, aGlobal)) {
3061 return false;
3062 }
3063
3064 // Initializing this at this point for nsGlobalWindowInner makes no sense,
3065 // because GetRTPCallerType doesn't return the correct result before
3066 // the global is completely initialized with a document.
3067 if constexpr (!std::is_base_of_v<nsGlobalWindowInner, T>) {
3068 JS::SetRealmReduceTimerPrecisionCallerType(
3069 js::GetNonCCWObjectRealm(aGlobal),
3070 RTPCallerTypeToToken(aNative->GetRTPCallerType()));
3071 }
3072 }
3073
3074 JS::Handle<JSObject*> proto = GetProto(aCx);
3075 if (!proto || !JS_SetPrototype(aCx, aGlobal, proto)) {
3076 NS_WARNING("Failed to set proto")NS_DebugBreak(NS_DEBUG_WARNING, "Failed to set proto", nullptr
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 3076)
;
3077 return false;
3078 }
3079
3080 bool succeeded;
3081 if (!JS_SetImmutablePrototype(aCx, aGlobal, &succeeded)) {
3082 return false;
3083 }
3084 MOZ_ASSERT(succeeded,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(succeeded)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(succeeded))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("succeeded" " (" "making a fresh global object's [[Prototype]] immutable can "
"internally fail, but it should never be unsuccessful" ")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 3086); AnnotateMozCrashReason("MOZ_ASSERT" "(" "succeeded" ") ("
"making a fresh global object's [[Prototype]] immutable can "
"internally fail, but it should never be unsuccessful" ")");
do { *((volatile int*)__null) = 3086; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
3085 "making a fresh global object's [[Prototype]] immutable can "do { static_assert( mozilla::detail::AssertionConditionType<
decltype(succeeded)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(succeeded))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("succeeded" " (" "making a fresh global object's [[Prototype]] immutable can "
"internally fail, but it should never be unsuccessful" ")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 3086); AnnotateMozCrashReason("MOZ_ASSERT" "(" "succeeded" ") ("
"making a fresh global object's [[Prototype]] immutable can "
"internally fail, but it should never be unsuccessful" ")");
do { *((volatile int*)__null) = 3086; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
3086 "internally fail, but it should never be unsuccessful")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(succeeded)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(succeeded))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("succeeded" " (" "making a fresh global object's [[Prototype]] immutable can "
"internally fail, but it should never be unsuccessful" ")", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 3086); AnnotateMozCrashReason("MOZ_ASSERT" "(" "succeeded" ") ("
"making a fresh global object's [[Prototype]] immutable can "
"internally fail, but it should never be unsuccessful" ")");
do { *((volatile int*)__null) = 3086; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
3087
3088 return true;
3089}
3090
3091namespace binding_detail {
3092/**
3093 * WebIDL getters have a "generic" JSNative that is responsible for the
3094 * following things:
3095 *
3096 * 1) Determining the "this" pointer for the C++ call.
3097 * 2) Extracting the "specialized" getter from the jitinfo on the JSFunction.
3098 * 3) Calling the specialized getter.
3099 * 4) Handling exceptions as needed.
3100 *
3101 * There are several variants of (1) depending on the interface involved and
3102 * there are two variants of (4) depending on whether the return type is a
3103 * Promise. We handle this by templating our generic getter on a
3104 * this-determination policy and an exception handling policy, then explicitly
3105 * instantiating the relevant template specializations.
3106 */
3107template <typename ThisPolicy, typename ExceptionPolicy>
3108bool GenericGetter(JSContext* cx, unsigned argc, JS::Value* vp);
3109
3110/**
3111 * WebIDL setters have a "generic" JSNative that is responsible for the
3112 * following things:
3113 *
3114 * 1) Determining the "this" pointer for the C++ call.
3115 * 2) Extracting the "specialized" setter from the jitinfo on the JSFunction.
3116 * 3) Calling the specialized setter.
3117 *
3118 * There are several variants of (1) depending on the interface
3119 * involved. We handle this by templating our generic setter on a
3120 * this-determination policy, then explicitly instantiating the
3121 * relevant template specializations.
3122 */
3123template <typename ThisPolicy>
3124bool GenericSetter(JSContext* cx, unsigned argc, JS::Value* vp);
3125
3126/**
3127 * WebIDL methods have a "generic" JSNative that is responsible for the
3128 * following things:
3129 *
3130 * 1) Determining the "this" pointer for the C++ call.
3131 * 2) Extracting the "specialized" method from the jitinfo on the JSFunction.
3132 * 3) Calling the specialized methodx.
3133 * 4) Handling exceptions as needed.
3134 *
3135 * There are several variants of (1) depending on the interface involved and
3136 * there are two variants of (4) depending on whether the return type is a
3137 * Promise. We handle this by templating our generic method on a
3138 * this-determination policy and an exception handling policy, then explicitly
3139 * instantiating the relevant template specializations.
3140 */
3141template <typename ThisPolicy, typename ExceptionPolicy>
3142bool GenericMethod(JSContext* cx, unsigned argc, JS::Value* vp);
3143
3144// A this-extraction policy for normal getters/setters/methods.
3145struct NormalThisPolicy;
3146
3147// A this-extraction policy for getters/setters/methods on interfaces
3148// that are on some global's proto chain.
3149struct MaybeGlobalThisPolicy;
3150
3151// A this-extraction policy for lenient getters/setters.
3152struct LenientThisPolicy;
3153
3154// A this-extraction policy for cross-origin getters/setters/methods.
3155struct CrossOriginThisPolicy;
3156
3157// A this-extraction policy for getters/setters/methods that should
3158// not be allowed to be called cross-origin but expect objects that
3159// _can_ be cross-origin.
3160struct MaybeCrossOriginObjectThisPolicy;
3161
3162// A this-extraction policy which is just like
3163// MaybeCrossOriginObjectThisPolicy but has lenient-this behavior.
3164struct MaybeCrossOriginObjectLenientThisPolicy;
3165
3166// An exception-reporting policy for normal getters/setters/methods.
3167struct ThrowExceptions;
3168
3169// An exception-handling policy for Promise-returning getters/methods.
3170struct ConvertExceptionsToPromises;
3171} // namespace binding_detail
3172
3173bool StaticMethodPromiseWrapper(JSContext* cx, unsigned argc, JS::Value* vp);
3174
3175// ConvertExceptionToPromise should only be called when we have an error
3176// condition (e.g. returned false from a JSAPI method). Note that there may be
3177// no exception on cx, in which case this is an uncatchable failure that will
3178// simply be propagated. Otherwise this method will attempt to convert the
3179// exception to a Promise rejected with the exception that it will store in
3180// rval.
3181bool ConvertExceptionToPromise(JSContext* cx,
3182 JS::MutableHandle<JS::Value> rval);
3183
3184#ifdef DEBUG1
3185void AssertReturnTypeMatchesJitinfo(const JSJitInfo* aJitinfo,
3186 JS::Handle<JS::Value> aValue);
3187#endif
3188
3189bool CallerSubsumes(JSObject* aObject);
3190
3191MOZ_ALWAYS_INLINEinline bool CallerSubsumes(JS::Handle<JS::Value> aValue) {
3192 if (!aValue.isObject()) {
3193 return true;
3194 }
3195 return CallerSubsumes(&aValue.toObject());
3196}
3197
3198template <class T, class S>
3199inline RefPtr<T> StrongOrRawPtr(already_AddRefed<S>&& aPtr) {
3200 return std::move(aPtr);
3201}
3202
3203template <class T, class S>
3204inline RefPtr<T> StrongOrRawPtr(RefPtr<S>&& aPtr) {
3205 return std::move(aPtr);
3206}
3207
3208template <class T, typename = std::enable_if_t<IsRefcounted<T>::value>>
3209inline T* StrongOrRawPtr(T* aPtr) {
3210 return aPtr;
3211}
3212
3213template <class T, class S,
3214 typename = std::enable_if_t<!IsRefcounted<S>::value>>
3215inline UniquePtr<T> StrongOrRawPtr(UniquePtr<S>&& aPtr) {
3216 return std::move(aPtr);
3217}
3218
3219template <class T, template <typename> class SmartPtr, class S>
3220inline void StrongOrRawPtr(SmartPtr<S>&& aPtr) = delete;
3221
3222template <class T>
3223using StrongPtrForMember =
3224 std::conditional_t<IsRefcounted<T>::value, RefPtr<T>, UniquePtr<T>>;
3225
3226namespace binding_detail {
3227inline JSObject* GetHackedNamespaceProtoObject(JSContext* aCx) {
3228 return JS_NewPlainObject(aCx);
3229}
3230} // namespace binding_detail
3231
3232// Resolve an id on the given global object that wants to be included in
3233// Exposed=System webidl annotations. False return value means exception
3234// thrown.
3235bool SystemGlobalResolve(JSContext* cx, JS::Handle<JSObject*> obj,
3236 JS::Handle<jsid> id, bool* resolvedp);
3237
3238// Enumerate all ids on the given global object that wants to be included in
3239// Exposed=System webidl annotations. False return value means exception
3240// thrown.
3241bool SystemGlobalEnumerate(JSContext* cx, JS::Handle<JSObject*> obj);
3242
3243// Slot indexes for maplike/setlike forEach functions
3244#define FOREACH_CALLBACK_SLOT0 0
3245#define FOREACH_MAPLIKEORSETLIKEOBJ_SLOT1 1
3246
3247// Backing function for running .forEach() on maplike/setlike interfaces.
3248// Unpacks callback and maplike/setlike object from reserved slots, then runs
3249// callback for each key (and value, for maplikes)
3250bool ForEachHandler(JSContext* aCx, unsigned aArgc, JS::Value* aVp);
3251
3252// Unpacks backing object (ES6 map/set) from the reserved slot of a reflector
3253// for a maplike/setlike interface. If backing object does not exist, creates
3254// backing object in the compartment of the reflector involved, making this safe
3255// to use across compartments/via xrays. Return values of these methods will
3256// always be in the context compartment.
3257bool GetMaplikeBackingObject(JSContext* aCx, JS::Handle<JSObject*> aObj,
3258 size_t aSlotIndex,
3259 JS::MutableHandle<JSObject*> aBackingObj,
3260 bool* aBackingObjCreated);
3261bool GetSetlikeBackingObject(JSContext* aCx, JS::Handle<JSObject*> aObj,
3262 size_t aSlotIndex,
3263 JS::MutableHandle<JSObject*> aBackingObj,
3264 bool* aBackingObjCreated);
3265
3266// Unpacks backing object (ES Proxy exotic object) from the reserved slot of a
3267// reflector for a observableArray attribute. If backing object does not exist,
3268// creates backing object in the compartment of the reflector involved, making
3269// this safe to use across compartments/via xrays. Return values of these
3270// methods will always be in the context compartment.
3271bool GetObservableArrayBackingObject(
3272 JSContext* aCx, JS::Handle<JSObject*> aObj, size_t aSlotIndex,
3273 JS::MutableHandle<JSObject*> aBackingObj, bool* aBackingObjCreated,
3274 const ObservableArrayProxyHandler* aHandler, void* aOwner);
3275
3276// Get the desired prototype object for an object construction from the given
3277// CallArgs. The CallArgs must be for a constructor call. The
3278// aProtoId/aCreator arguments are used to get a default if we don't find a
3279// prototype on the newTarget of the callargs.
3280bool GetDesiredProto(JSContext* aCx, const JS::CallArgs& aCallArgs,
3281 prototypes::id::ID aProtoId,
3282 CreateInterfaceObjectsMethod aCreator,
3283 JS::MutableHandle<JSObject*> aDesiredProto);
3284
3285// This function is expected to be called from the constructor function for an
3286// HTML or XUL element interface; the global/callargs need to be whatever was
3287// passed to that constructor function.
3288already_AddRefed<Element> CreateXULOrHTMLElement(
3289 const GlobalObject& aGlobal, const JS::CallArgs& aCallArgs,
3290 JS::Handle<JSObject*> aGivenProto, ErrorResult& aRv);
3291
3292void SetUseCounter(JSObject* aObject, UseCounter aUseCounter);
3293void SetUseCounter(UseCounterWorker aUseCounter);
3294
3295// Warnings
3296void DeprecationWarning(JSContext* aCx, JSObject* aObject,
3297 DeprecatedOperations aOperation);
3298
3299void DeprecationWarning(const GlobalObject& aGlobal,
3300 DeprecatedOperations aOperation);
3301
3302namespace binding_detail {
3303// Get a JS global object that can be used for some temporary allocations. The
3304// idea is that this should be used for situations when you need to operate in
3305// _some_ compartment but don't care which one. A typical example is when you
3306// have non-JS input, non-JS output, but have to go through some sort of JS
3307// representation in the middle, so need a compartment to allocate things in.
3308//
3309// It's VERY important that any consumers of this function only do things that
3310// are guaranteed to be side-effect-free, even in the face of a script
3311// environment controlled by a hostile adversary. This is because in the worker
3312// case the global is in fact the worker global, so it and its standard objects
3313// are controlled by the worker script. This is why this function is in the
3314// binding_detail namespace. Any use of this function MUST be very carefully
3315// reviewed by someone who is sufficiently devious and has a very good
3316// understanding of all the code that will run while we're using the return
3317// value, including the SpiderMonkey parts.
3318JSObject* UnprivilegedJunkScopeOrWorkerGlobal(const fallible_t&);
3319
3320// Implementation of the [HTMLConstructor] extended attribute.
3321bool HTMLConstructor(JSContext* aCx, unsigned aArgc, JS::Value* aVp,
3322 constructors::id::ID aConstructorId,
3323 prototypes::id::ID aProtoId,
3324 CreateInterfaceObjectsMethod aCreator);
3325
3326// A method to test whether an attribute with the given JSJitGetterOp getter is
3327// enabled in the given set of prefable proeprty specs. For use for toJSON
3328// conversions. aObj is the object that would be used as the "this" value.
3329bool IsGetterEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj,
3330 JSJitGetterOp aGetter,
3331 const Prefable<const JSPropertySpec>* aAttributes);
3332
3333// A class that can be used to examine the chars of a linear string.
3334class StringIdChars {
3335 public:
3336 // Require a non-const ref to an AutoRequireNoGC to prevent callers
3337 // from passing temporaries.
3338 StringIdChars(JS::AutoRequireNoGC& nogc, JSLinearString* str) {
3339 mIsLatin1 = JS::LinearStringHasLatin1Chars(str);
3340 if (mIsLatin1) {
3341 mLatin1Chars = JS::GetLatin1LinearStringChars(nogc, str);
3342 } else {
3343 mTwoByteChars = JS::GetTwoByteLinearStringChars(nogc, str);
3344 }
3345#ifdef DEBUG1
3346 mLength = JS::GetLinearStringLength(str);
3347#endif // DEBUG
3348 }
3349
3350 MOZ_ALWAYS_INLINEinline char16_t operator[](size_t index) {
3351 MOZ_ASSERT(index < mLength)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index < mLength)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index < mLength))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("index < mLength"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h"
, 3351); AnnotateMozCrashReason("MOZ_ASSERT" "(" "index < mLength"
")"); do { *((volatile int*)__null) = 3351; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
3352 if (mIsLatin1) {
3353 return mLatin1Chars[index];
3354 }
3355 return mTwoByteChars[index];
3356 }
3357
3358 private:
3359 bool mIsLatin1;
3360 union {
3361 const JS::Latin1Char* mLatin1Chars;
3362 const char16_t* mTwoByteChars;
3363 };
3364#ifdef DEBUG1
3365 size_t mLength;
3366#endif // DEBUG
3367};
3368
3369already_AddRefed<Promise> CreateRejectedPromiseFromThrownException(
3370 JSContext* aCx, ErrorResult& aError);
3371
3372} // namespace binding_detail
3373
3374} // namespace dom
3375
3376} // namespace mozilla
3377
3378#endif /* mozilla_dom_BindingUtils_h__ */

/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.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
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7#ifndef js_RootingAPI_h
8#define js_RootingAPI_h
9
10#include "mozilla/Attributes.h"
11#include "mozilla/DebugOnly.h"
12#include "mozilla/EnumeratedArray.h"
13#include "mozilla/LinkedList.h"
14#include "mozilla/Maybe.h"
15
16#include <type_traits>
17#include <utility>
18
19#include "jspubtd.h"
20
21#include "js/ComparisonOperators.h" // JS::detail::DefineComparisonOps
22#include "js/GCAnnotations.h"
23#include "js/GCPolicyAPI.h"
24#include "js/GCTypeMacros.h" // JS_FOR_EACH_PUBLIC_{,TAGGED_}GC_POINTER_TYPE
25#include "js/HashTable.h"
26#include "js/HeapAPI.h" // StackKindCount
27#include "js/ProfilingStack.h"
28#include "js/Realm.h"
29#include "js/Stack.h" // JS::NativeStackLimit
30#include "js/TypeDecls.h"
31#include "js/UniquePtr.h"
32
33/*
34 * [SMDOC] Stack Rooting
35 *
36 * Moving GC Stack Rooting
37 *
38 * A moving GC may change the physical location of GC allocated things, even
39 * when they are rooted, updating all pointers to the thing to refer to its new
40 * location. The GC must therefore know about all live pointers to a thing,
41 * not just one of them, in order to behave correctly.
42 *
43 * The |Rooted| and |Handle| classes below are used to root stack locations
44 * whose value may be held live across a call that can trigger GC. For a
45 * code fragment such as:
46 *
47 * JSObject* obj = NewObject(cx);
48 * DoSomething(cx);
49 * ... = obj->lastProperty();
50 *
51 * If |DoSomething()| can trigger a GC, the stack location of |obj| must be
52 * rooted to ensure that the GC does not move the JSObject referred to by
53 * |obj| without updating |obj|'s location itself. This rooting must happen
54 * regardless of whether there are other roots which ensure that the object
55 * itself will not be collected.
56 *
57 * If |DoSomething()| cannot trigger a GC, and the same holds for all other
58 * calls made between |obj|'s definitions and its last uses, then no rooting
59 * is required.
60 *
61 * SpiderMonkey can trigger a GC at almost any time and in ways that are not
62 * always clear. For example, the following innocuous-looking actions can
63 * cause a GC: allocation of any new GC thing; JSObject::hasProperty;
64 * JS_ReportError and friends; and ToNumber, among many others. The following
65 * dangerous-looking actions cannot trigger a GC: js_malloc, cx->malloc_,
66 * rt->malloc_, and friends and JS_ReportOutOfMemory.
67 *
68 * The following family of three classes will exactly root a stack location.
69 * Incorrect usage of these classes will result in a compile error in almost
70 * all cases. Therefore, it is very hard to be incorrectly rooted if you use
71 * these classes exclusively. These classes are all templated on the type T of
72 * the value being rooted.
73 *
74 * - Rooted<T> declares a variable of type T, whose value is always rooted.
75 * Rooted<T> may be automatically coerced to a Handle<T>, below. Rooted<T>
76 * should be used whenever a local variable's value may be held live across a
77 * call which can trigger a GC.
78 *
79 * - Handle<T> is a const reference to a Rooted<T>. Functions which take GC
80 * things or values as arguments and need to root those arguments should
81 * generally use handles for those arguments and avoid any explicit rooting.
82 * This has two benefits. First, when several such functions call each other
83 * then redundant rooting of multiple copies of the GC thing can be avoided.
84 * Second, if the caller does not pass a rooted value a compile error will be
85 * generated, which is quicker and easier to fix than when relying on a
86 * separate rooting analysis.
87 *
88 * - MutableHandle<T> is a non-const reference to Rooted<T>. It is used in the
89 * same way as Handle<T> and includes a |set(const T& v)| method to allow
90 * updating the value of the referenced Rooted<T>. A MutableHandle<T> can be
91 * created with an implicit cast from a Rooted<T>*.
92 *
93 * In some cases the small performance overhead of exact rooting (measured to
94 * be a few nanoseconds on desktop) is too much. In these cases, try the
95 * following:
96 *
97 * - Move all Rooted<T> above inner loops: this allows you to re-use the root
98 * on each iteration of the loop.
99 *
100 * - Pass Handle<T> through your hot call stack to avoid re-rooting costs at
101 * every invocation.
102 *
103 * The following diagram explains the list of supported, implicit type
104 * conversions between classes of this family:
105 *
106 * Rooted<T> ----> Handle<T>
107 * | ^
108 * | |
109 * | |
110 * +---> MutableHandle<T>
111 * (via &)
112 *
113 * All of these types have an implicit conversion to raw pointers.
114 */
115
116namespace js {
117
118class Nursery;
119
120// The defaulted Enable parameter for the following two types is for restricting
121// specializations with std::enable_if.
122template <typename T, typename Enable = void>
123struct BarrierMethods {};
124
125template <typename Element, typename Wrapper, typename Enable = void>
126class WrappedPtrOperations {};
127
128template <typename Element, typename Wrapper>
129class MutableWrappedPtrOperations
130 : public WrappedPtrOperations<Element, Wrapper> {};
131
132template <typename T, typename Wrapper>
133class RootedOperations : public MutableWrappedPtrOperations<T, Wrapper> {};
134
135template <typename T, typename Wrapper>
136class HandleOperations : public WrappedPtrOperations<T, Wrapper> {};
137
138template <typename T, typename Wrapper>
139class MutableHandleOperations : public MutableWrappedPtrOperations<T, Wrapper> {
140};
141
142template <typename T, typename Wrapper>
143class HeapOperations : public MutableWrappedPtrOperations<T, Wrapper> {};
144
145// Cannot use FOR_EACH_HEAP_ABLE_GC_POINTER_TYPE, as this would import too many
146// macros into scope
147
148// Add a 2nd template parameter to allow conditionally enabling partial
149// specializations via std::enable_if.
150template <typename T, typename Enable = void>
151struct IsHeapConstructibleType : public std::false_type {};
152
153#define JS_DECLARE_IS_HEAP_CONSTRUCTIBLE_TYPE(T)template <> struct IsHeapConstructibleType<T> : public
std::true_type {};
\
154 template <> \
155 struct IsHeapConstructibleType<T> : public std::true_type {};
156JS_FOR_EACH_PUBLIC_GC_POINTER_TYPE(JS_DECLARE_IS_HEAP_CONSTRUCTIBLE_TYPE)template <> struct IsHeapConstructibleType<JS::BigInt
*> : public std::true_type {}; template <> struct IsHeapConstructibleType
<JS::Symbol*> : public std::true_type {}; template <
> struct IsHeapConstructibleType<JSAtom*> : public std
::true_type {}; template <> struct IsHeapConstructibleType
<JSFunction*> : public std::true_type {}; template <
> struct IsHeapConstructibleType<JSLinearString*> : public
std::true_type {}; template <> struct IsHeapConstructibleType
<JSObject*> : public std::true_type {}; template <>
struct IsHeapConstructibleType<JSScript*> : public std
::true_type {}; template <> struct IsHeapConstructibleType
<JSString*> : public std::true_type {};
157JS_FOR_EACH_PUBLIC_TAGGED_GC_POINTER_TYPE(JS_DECLARE_IS_HEAP_CONSTRUCTIBLE_TYPE)template <> struct IsHeapConstructibleType<JS::Value
> : public std::true_type {}; template <> struct IsHeapConstructibleType
<JS::PropertyKey> : public std::true_type {};
158// Note that JS_DECLARE_IS_HEAP_CONSTRUCTIBLE_TYPE is left defined, to allow
159// declaring other types (eg from js/public/experimental/TypedData.h) to
160// be used with Heap<>.
161
162namespace gc {
163struct Cell;
164} /* namespace gc */
165
166// Important: Return a reference so passing a Rooted<T>, etc. to
167// something that takes a |const T&| is not a GC hazard.
168#define DECLARE_POINTER_CONSTREF_OPS(T)operator const T&() const { return get(); } const T& operator
->() const { return get(); }
\
169 operator const T&() const { return get(); } \
170 const T& operator->() const { return get(); }
171
172// Assignment operators on a base class are hidden by the implicitly defined
173// operator= on the derived class. Thus, define the operator= directly on the
174// class as we would need to manually pass it through anyway.
175#define DECLARE_POINTER_ASSIGN_OPS(Wrapper, T)Wrapper<T>& operator=(const T& p) { set(p); return
*this; } Wrapper<T>& operator=(T&& p) { set
(std::move(p)); return *this; } Wrapper<T>& operator
=(const Wrapper<T>& other) { set(other.get()); return
*this; }
\
176 Wrapper<T>& operator=(const T& p) { \
177 set(p); \
178 return *this; \
179 } \
180 Wrapper<T>& operator=(T&& p) { \
181 set(std::move(p)); \
182 return *this; \
183 } \
184 Wrapper<T>& operator=(const Wrapper<T>& other) { \
185 set(other.get()); \
186 return *this; \
187 }
188
189#define DELETE_ASSIGNMENT_OPS(Wrapper, T)template <typename S> Wrapper<T>& operator=(S
) = delete; Wrapper<T>& operator=(const Wrapper<
T>&) = delete;
\
190 template <typename S> \
191 Wrapper<T>& operator=(S) = delete; \
192 Wrapper<T>& operator=(const Wrapper<T>&) = delete;
193
194#define DECLARE_NONPOINTER_ACCESSOR_METHODS(ptr)const T* address() const { return &(ptr); } const T& get
() const { return (ptr); }
\
195 const T* address() const { return &(ptr); } \
196 const T& get() const { return (ptr); }
197
198#define DECLARE_NONPOINTER_MUTABLE_ACCESSOR_METHODS(ptr)T* address() { return &(ptr); } T& get() { return (ptr
); }
\
199 T* address() { return &(ptr); } \
200 T& get() { return (ptr); }
201
202} /* namespace js */
203
204namespace JS {
205
206JS_PUBLIC_API void HeapObjectPostWriteBarrier(JSObject** objp, JSObject* prev,
207 JSObject* next);
208JS_PUBLIC_API void HeapObjectWriteBarriers(JSObject** objp, JSObject* prev,
209 JSObject* next);
210JS_PUBLIC_API void HeapStringWriteBarriers(JSString** objp, JSString* prev,
211 JSString* next);
212JS_PUBLIC_API void HeapBigIntWriteBarriers(JS::BigInt** bip, JS::BigInt* prev,
213 JS::BigInt* next);
214JS_PUBLIC_API void HeapScriptWriteBarriers(JSScript** objp, JSScript* prev,
215 JSScript* next);
216
217/**
218 * SafelyInitialized<T>::create() creates a safely-initialized |T|, suitable for
219 * use as a default value in situations requiring a safe but arbitrary |T|
220 * value. Implemented as a static method of a struct to allow partial
221 * specialization for subclasses via the Enable template parameter.
222 */
223template <typename T, typename Enable = void>
224struct SafelyInitialized {
225 static T create() {
226 // This function wants to presume that |T()| -- which value-initializes a
227 // |T| per C++11 [expr.type.conv]p2 -- will produce a safely-initialized,
228 // safely-usable T that it can return.
229
230#if defined(XP_WIN) || defined(XP_DARWIN) || \
231 (defined(XP_UNIX1) && !defined(__clang__1))
232
233 // That presumption holds for pointers, where value initialization produces
234 // a null pointer.
235 constexpr bool IsPointer = std::is_pointer_v<T>;
236
237 // For classes and unions we *assume* that if |T|'s default constructor is
238 // non-trivial it'll initialize correctly. (This is unideal, but C++
239 // doesn't offer a type trait indicating whether a class's constructor is
240 // user-defined, which better approximates our desired semantics.)
241 constexpr bool IsNonTriviallyDefaultConstructibleClassOrUnion =
242 (std::is_class_v<T> || std::is_union_v<T>) &&
243 !std::is_trivially_default_constructible_v<T>;
244
245 static_assert(IsPointer || IsNonTriviallyDefaultConstructibleClassOrUnion,
246 "T() must evaluate to a safely-initialized T");
247
248#endif
249
250 return T();
251 }
252};
253
254#ifdef JS_DEBUG1
255/**
256 * For generational GC, assert that an object is in the tenured generation as
257 * opposed to being in the nursery.
258 */
259extern JS_PUBLIC_API void AssertGCThingMustBeTenured(JSObject* obj);
260extern JS_PUBLIC_API void AssertGCThingIsNotNurseryAllocable(
261 js::gc::Cell* cell);
262#else
263inline void AssertGCThingMustBeTenured(JSObject* obj) {}
264inline void AssertGCThingIsNotNurseryAllocable(js::gc::Cell* cell) {}
265#endif
266
267/**
268 * The Heap<T> class is a heap-stored reference to a JS GC thing for use outside
269 * the JS engine. All members of heap classes that refer to GC things should use
270 * Heap<T> (or possibly TenuredHeap<T>, described below).
271 *
272 * Heap<T> is an abstraction that hides some of the complexity required to
273 * maintain GC invariants for the contained reference. It uses operator
274 * overloading to provide a normal pointer interface, but adds barriers to
275 * notify the GC of changes.
276 *
277 * Heap<T> implements the following barriers:
278 *
279 * - Pre-write barrier (necessary for incremental GC).
280 * - Post-write barrier (necessary for generational GC).
281 * - Read barrier (necessary for cycle collector integration).
282 *
283 * Heap<T> may be moved or destroyed outside of GC finalization and hence may be
284 * used in dynamic storage such as a Vector.
285 *
286 * Heap<T> instances must be traced when their containing object is traced to
287 * keep the pointed-to GC thing alive.
288 *
289 * Heap<T> objects should only be used on the heap. GC references stored on the
290 * C/C++ stack must use Rooted/Handle/MutableHandle instead.
291 *
292 * Type T must be a public GC pointer type.
293 */
294template <typename T>
295class MOZ_NON_MEMMOVABLE Heap : public js::HeapOperations<T, Heap<T>> {
296 static_assert(js::IsHeapConstructibleType<T>::value,
297 "Type T must be a public GC pointer type");
298
299 public:
300 using ElementType = T;
301
302 Heap() : ptr(SafelyInitialized<T>::create()) {
303 // No barriers are required for initialization to the default value.
304 static_assert(sizeof(T) == sizeof(Heap<T>),
305 "Heap<T> must be binary compatible with T.");
306 }
307 explicit Heap(const T& p) : ptr(p) {
308 writeBarriers(SafelyInitialized<T>::create(), ptr);
309 }
310
311 /*
312 * For Heap, move semantics are equivalent to copy semantics. However, we want
313 * the copy constructor to be explicit, and an explicit move constructor
314 * breaks common usage of move semantics, so we need to define both, even
315 * though they are equivalent.
316 */
317 explicit Heap(const Heap<T>& other) : ptr(other.unbarrieredGet()) {
318 writeBarriers(SafelyInitialized<T>::create(), ptr);
319 }
320 Heap(Heap<T>&& other) : ptr(other.unbarrieredGet()) {
321 writeBarriers(SafelyInitialized<T>::create(), ptr);
322 }
323
324 Heap& operator=(Heap<T>&& other) {
325 set(other.unbarrieredGet());
326 other.set(SafelyInitialized<T>::create());
327 return *this;
328 }
329 // Copy constructor defined by DECLARE_POINTER_ASSIGN_OPS.
330
331 ~Heap() { writeBarriers(ptr, SafelyInitialized<T>::create()); }
332
333 DECLARE_POINTER_CONSTREF_OPS(T)operator const T&() const { return get(); } const T& operator
->() const { return get(); }
;
334 DECLARE_POINTER_ASSIGN_OPS(Heap, T)Heap<T>& operator=(const T& p) { set(p); return
*this; } Heap<T>& operator=(T&& p) { set(std
::move(p)); return *this; } Heap<T>& operator=(const
Heap<T>& other) { set(other.get()); return *this; }
;
335
336 void exposeToActiveJS() const { js::BarrierMethods<T>::exposeToJS(ptr); }
337
338 const T& get() const {
339 exposeToActiveJS();
340 return ptr;
341 }
342 const T& unbarrieredGet() const { return ptr; }
343
344 void set(const T& newPtr) {
345 T tmp = ptr;
346 ptr = newPtr;
347 writeBarriers(tmp, ptr);
348 }
349 void unbarrieredSet(const T& newPtr) { ptr = newPtr; }
350
351 T* unsafeAddress() { return &ptr; }
352 const T* unsafeAddress() const { return &ptr; }
353
354 explicit operator bool() const {
355 return bool(js::BarrierMethods<T>::asGCThingOrNull(ptr));
356 }
357
358 private:
359 void writeBarriers(const T& prev, const T& next) {
360 js::BarrierMethods<T>::writeBarriers(&ptr, prev, next);
361 }
362
363 T ptr;
364};
365
366namespace detail {
367
368template <typename T>
369struct DefineComparisonOps<Heap<T>> : std::true_type {
370 static const T& get(const Heap<T>& v) { return v.unbarrieredGet(); }
371};
372
373} // namespace detail
374
375static MOZ_ALWAYS_INLINEinline bool ObjectIsTenured(JSObject* obj) {
376 return !js::gc::IsInsideNursery(reinterpret_cast<js::gc::Cell*>(obj));
377}
378
379static MOZ_ALWAYS_INLINEinline bool ObjectIsTenured(const Heap<JSObject*>& obj) {
380 return ObjectIsTenured(obj.unbarrieredGet());
381}
382
383static MOZ_ALWAYS_INLINEinline bool ObjectIsMarkedGray(JSObject* obj) {
384 auto cell = reinterpret_cast<js::gc::Cell*>(obj);
385 if (js::gc::IsInsideNursery(cell)) {
386 return false;
387 }
388
389 auto tenuredCell = reinterpret_cast<js::gc::TenuredCell*>(cell);
390 return js::gc::detail::CellIsMarkedGrayIfKnown(tenuredCell);
391}
392
393static MOZ_ALWAYS_INLINEinline bool ObjectIsMarkedGray(
394 const JS::Heap<JSObject*>& obj) {
395 return ObjectIsMarkedGray(obj.unbarrieredGet());
396}
397
398// The following *IsNotGray functions take account of the eventual
399// gray marking state at the end of any ongoing incremental GC by
400// delaying the checks if necessary.
401
402#ifdef DEBUG1
403
404inline void AssertCellIsNotGray(const js::gc::Cell* maybeCell) {
405 if (maybeCell) {
406 js::gc::detail::AssertCellIsNotGray(maybeCell);
407 }
408}
409
410inline void AssertObjectIsNotGray(JSObject* maybeObj) {
411 AssertCellIsNotGray(reinterpret_cast<js::gc::Cell*>(maybeObj));
412}
413
414inline void AssertObjectIsNotGray(const JS::Heap<JSObject*>& obj) {
415 AssertObjectIsNotGray(obj.unbarrieredGet());
416}
417
418#else
419
420inline void AssertCellIsNotGray(js::gc::Cell* maybeCell) {}
421inline void AssertObjectIsNotGray(JSObject* maybeObj) {}
422inline void AssertObjectIsNotGray(const JS::Heap<JSObject*>& obj) {}
423
424#endif
425
426/**
427 * The TenuredHeap<T> class is similar to the Heap<T> class above in that it
428 * encapsulates the GC concerns of an on-heap reference to a JS object. However,
429 * it has two important differences:
430 *
431 * 1) Pointers which are statically known to only reference "tenured" objects
432 * can avoid the extra overhead of SpiderMonkey's post write barriers.
433 *
434 * 2) Objects in the "tenured" heap have stronger alignment restrictions than
435 * those in the "nursery", so it is possible to store flags in the lower
436 * bits of pointers known to be tenured. TenuredHeap wraps a normal tagged
437 * pointer with a nice API for accessing the flag bits and adds various
438 * assertions to ensure that it is not mis-used.
439 *
440 * GC things are said to be "tenured" when they are located in the long-lived
441 * heap: e.g. they have gained tenure as an object by surviving past at least
442 * one GC. For performance, SpiderMonkey allocates some things which are known
443 * to normally be long lived directly into the tenured generation; for example,
444 * global objects. Additionally, SpiderMonkey does not visit individual objects
445 * when deleting non-tenured objects, so object with finalizers are also always
446 * tenured; for instance, this includes most DOM objects.
447 *
448 * The considerations to keep in mind when using a TenuredHeap<T> vs a normal
449 * Heap<T> are:
450 *
451 * - It is invalid for a TenuredHeap<T> to refer to a non-tenured thing.
452 * - It is however valid for a Heap<T> to refer to a tenured thing.
453 * - It is not possible to store flag bits in a Heap<T>.
454 */
455template <typename T>
456class TenuredHeap : public js::HeapOperations<T, TenuredHeap<T>> {
457 static_assert(js::IsHeapConstructibleType<T>::value,
458 "Type T must be a public GC pointer type");
459
460 public:
461 using ElementType = T;
462
463 TenuredHeap() : bits(0) {
464 static_assert(sizeof(T) == sizeof(TenuredHeap<T>),
465 "TenuredHeap<T> must be binary compatible with T.");
466 }
467
468 explicit TenuredHeap(T p) : bits(0) { unbarrieredSetPtr(p); }
469 explicit TenuredHeap(const TenuredHeap<T>& p) : bits(0) {
470 unbarrieredSetPtr(p.getPtr());
471 }
472
473 TenuredHeap<T>& operator=(T p) {
474 setPtr(p);
475 return *this;
476 }
477 TenuredHeap<T>& operator=(const TenuredHeap<T>& other) {
478 preWriteBarrier();
479 bits = other.bits;
480 return *this;
481 }
482
483 ~TenuredHeap() { preWriteBarrier(); }
484
485 void setPtr(T newPtr) {
486 preWriteBarrier();
487 unbarrieredSetPtr(newPtr);
488 }
489 void unbarrieredSetPtr(T newPtr) {
490 MOZ_ASSERT((reinterpret_cast<uintptr_t>(newPtr) & flagsMask) == 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype((reinterpret_cast<uintptr_t>(newPtr) & flagsMask
) == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!((reinterpret_cast<uintptr_t>(newPtr) & flagsMask
) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("(reinterpret_cast<uintptr_t>(newPtr) & flagsMask) == 0"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 490); AnnotateMozCrashReason("MOZ_ASSERT" "(" "(reinterpret_cast<uintptr_t>(newPtr) & flagsMask) == 0"
")"); do { *((volatile int*)__null) = 490; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
491 MOZ_ASSERT(js::gc::IsCellPointerValidOrNull(newPtr))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(js::gc::IsCellPointerValidOrNull(newPtr))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(js::gc::IsCellPointerValidOrNull(newPtr)))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("js::gc::IsCellPointerValidOrNull(newPtr)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 491); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::gc::IsCellPointerValidOrNull(newPtr)"
")"); do { *((volatile int*)__null) = 491; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
492 if (newPtr) {
493 AssertGCThingMustBeTenured(newPtr);
494 }
495 bits = (bits & flagsMask) | reinterpret_cast<uintptr_t>(newPtr);
496 }
497
498 void setFlags(uintptr_t flagsToSet) {
499 MOZ_ASSERT((flagsToSet & ~flagsMask) == 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype((flagsToSet & ~flagsMask) == 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!((flagsToSet & ~flagsMask
) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("(flagsToSet & ~flagsMask) == 0", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 499); AnnotateMozCrashReason("MOZ_ASSERT" "(" "(flagsToSet & ~flagsMask) == 0"
")"); do { *((volatile int*)__null) = 499; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
500 bits |= flagsToSet;
501 }
502
503 void unsetFlags(uintptr_t flagsToUnset) {
504 MOZ_ASSERT((flagsToUnset & ~flagsMask) == 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype((flagsToUnset & ~flagsMask) == 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!((flagsToUnset & ~flagsMask
) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("(flagsToUnset & ~flagsMask) == 0", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 504); AnnotateMozCrashReason("MOZ_ASSERT" "(" "(flagsToUnset & ~flagsMask) == 0"
")"); do { *((volatile int*)__null) = 504; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
505 bits &= ~flagsToUnset;
506 }
507
508 bool hasFlag(uintptr_t flag) const {
509 MOZ_ASSERT((flag & ~flagsMask) == 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype((flag & ~flagsMask) == 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!((flag & ~flagsMask) == 0
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"(flag & ~flagsMask) == 0", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 509); AnnotateMozCrashReason("MOZ_ASSERT" "(" "(flag & ~flagsMask) == 0"
")"); do { *((volatile int*)__null) = 509; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
510 return (bits & flag) != 0;
511 }
512
513 T unbarrieredGetPtr() const { return reinterpret_cast<T>(bits & ~flagsMask); }
514 uintptr_t getFlags() const { return bits & flagsMask; }
515
516 void exposeToActiveJS() const {
517 js::BarrierMethods<T>::exposeToJS(unbarrieredGetPtr());
518 }
519 T getPtr() const {
520 exposeToActiveJS();
521 return unbarrieredGetPtr();
522 }
523
524 operator T() const { return getPtr(); }
525 T operator->() const { return getPtr(); }
526
527 explicit operator bool() const {
528 return bool(js::BarrierMethods<T>::asGCThingOrNull(unbarrieredGetPtr()));
529 }
530
531 private:
532 enum {
533 maskBits = 3,
534 flagsMask = (1 << maskBits) - 1,
535 };
536
537 void preWriteBarrier() {
538 if (T prev = unbarrieredGetPtr()) {
539 JS::IncrementalPreWriteBarrier(JS::GCCellPtr(prev));
540 }
541 }
542
543 uintptr_t bits;
544};
545
546namespace detail {
547
548template <typename T>
549struct DefineComparisonOps<TenuredHeap<T>> : std::true_type {
550 static const T get(const TenuredHeap<T>& v) { return v.unbarrieredGetPtr(); }
551};
552
553} // namespace detail
554
555// std::swap uses a stack temporary, which prevents classes like Heap<T>
556// from being declared MOZ_HEAP_CLASS.
557template <typename T>
558void swap(TenuredHeap<T>& aX, TenuredHeap<T>& aY) {
559 T tmp = aX;
560 aX = aY;
561 aY = tmp;
562}
563
564template <typename T>
565void swap(Heap<T>& aX, Heap<T>& aY) {
566 T tmp = aX;
567 aX = aY;
568 aY = tmp;
569}
570
571static MOZ_ALWAYS_INLINEinline bool ObjectIsMarkedGray(
572 const JS::TenuredHeap<JSObject*>& obj) {
573 return ObjectIsMarkedGray(obj.unbarrieredGetPtr());
574}
575
576template <typename T>
577class MutableHandle;
578template <typename T>
579class Rooted;
580template <typename T>
581class PersistentRooted;
582
583/**
584 * Reference to a T that has been rooted elsewhere. This is most useful
585 * as a parameter type, which guarantees that the T lvalue is properly
586 * rooted. See "Move GC Stack Rooting" above.
587 *
588 * If you want to add additional methods to Handle for a specific
589 * specialization, define a HandleOperations<T> specialization containing them.
590 */
591template <typename T>
592class MOZ_NONHEAP_CLASS Handle : public js::HandleOperations<T, Handle<T>> {
593 friend class MutableHandle<T>;
594
595 public:
596 using ElementType = T;
597
598 Handle(const Handle<T>&) = default;
599
600 /* Creates a handle from a handle of a type convertible to T. */
601 template <typename S>
602 MOZ_IMPLICIT Handle(
603 Handle<S> handle,
604 std::enable_if_t<std::is_convertible_v<S, T>, int> dummy = 0) {
605 static_assert(sizeof(Handle<T>) == sizeof(T*),
606 "Handle must be binary compatible with T*.");
607 ptr = reinterpret_cast<const T*>(handle.address());
608 }
609
610 MOZ_IMPLICIT Handle(decltype(nullptr)) {
611 static_assert(std::is_pointer_v<T>,
612 "nullptr_t overload not valid for non-pointer types");
613 static void* const ConstNullValue = nullptr;
614 ptr = reinterpret_cast<const T*>(&ConstNullValue);
615 }
616
617 MOZ_IMPLICIT Handle(MutableHandle<T> handle) { ptr = handle.address(); }
618
619 /*
620 * Take care when calling this method!
621 *
622 * This creates a Handle from the raw location of a T.
623 *
624 * It should be called only if the following conditions hold:
625 *
626 * 1) the location of the T is guaranteed to be marked (for some reason
627 * other than being a Rooted), e.g., if it is guaranteed to be reachable
628 * from an implicit root.
629 *
630 * 2) the contents of the location are immutable, or at least cannot change
631 * for the lifetime of the handle, as its users may not expect its value
632 * to change underneath them.
633 */
634 static constexpr Handle fromMarkedLocation(const T* p) {
635 return Handle(p, DeliberatelyChoosingThisOverload,
636 ImUsingThisOnlyInFromFromMarkedLocation);
637 }
638
639 /*
640 * Construct a handle from an explicitly rooted location. This is the
641 * normal way to create a handle, and normally happens implicitly.
642 */
643 template <typename S>
644 inline MOZ_IMPLICIT Handle(
645 const Rooted<S>& root,
646 std::enable_if_t<std::is_convertible_v<S, T>, int> dummy = 0);
647
648 template <typename S>
649 inline MOZ_IMPLICIT Handle(
650 const PersistentRooted<S>& root,
651 std::enable_if_t<std::is_convertible_v<S, T>, int> dummy = 0);
652
653 /* Construct a read only handle from a mutable handle. */
654 template <typename S>
655 inline MOZ_IMPLICIT Handle(
656 MutableHandle<S>& root,
657 std::enable_if_t<std::is_convertible_v<S, T>, int> dummy = 0);
658
659 DECLARE_POINTER_CONSTREF_OPS(T)operator const T&() const { return get(); } const T& operator
->() const { return get(); }
;
660 DECLARE_NONPOINTER_ACCESSOR_METHODS(*ptr)const T* address() const { return &(*ptr); } const T&
get() const { return (*ptr); }
;
661
662 private:
663 Handle() = default;
664 DELETE_ASSIGNMENT_OPS(Handle, T)template <typename S> Handle<T>& operator=(S)
= delete; Handle<T>& operator=(const Handle<T>
&) = delete;
;
665
666 enum Disambiguator { DeliberatelyChoosingThisOverload = 42 };
667 enum CallerIdentity { ImUsingThisOnlyInFromFromMarkedLocation = 17 };
668 constexpr Handle(const T* p, Disambiguator, CallerIdentity) : ptr(p) {}
669
670 const T* ptr;
671};
672
673namespace detail {
674
675template <typename T>
676struct DefineComparisonOps<Handle<T>> : std::true_type {
677 static const T& get(const Handle<T>& v) { return v.get(); }
678};
679
680} // namespace detail
681
682/**
683 * Similar to a handle, but the underlying storage can be changed. This is
684 * useful for outparams.
685 *
686 * If you want to add additional methods to MutableHandle for a specific
687 * specialization, define a MutableHandleOperations<T> specialization containing
688 * them.
689 */
690template <typename T>
691class MOZ_STACK_CLASS MutableHandle
692 : public js::MutableHandleOperations<T, MutableHandle<T>> {
693 public:
694 using ElementType = T;
695
696 inline MOZ_IMPLICIT MutableHandle(Rooted<T>* root);
697 inline MOZ_IMPLICIT MutableHandle(PersistentRooted<T>* root);
698
699 private:
700 // Disallow nullptr for overloading purposes.
701 MutableHandle(decltype(nullptr)) = delete;
702
703 public:
704 MutableHandle(const MutableHandle<T>&) = default;
705 void set(const T& v) {
706 *ptr = v;
707 MOZ_ASSERT(GCPolicy<T>::isValid(*ptr))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(GCPolicy<T>::isValid(*ptr))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(GCPolicy<T>::isValid(*
ptr)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("GCPolicy<T>::isValid(*ptr)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 707); AnnotateMozCrashReason("MOZ_ASSERT" "(" "GCPolicy<T>::isValid(*ptr)"
")"); do { *((volatile int*)__null) = 707; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
708 }
709 void set(T&& v) {
710 *ptr = std::move(v);
711 MOZ_ASSERT(GCPolicy<T>::isValid(*ptr))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(GCPolicy<T>::isValid(*ptr))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(GCPolicy<T>::isValid(*
ptr)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("GCPolicy<T>::isValid(*ptr)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 711); AnnotateMozCrashReason("MOZ_ASSERT" "(" "GCPolicy<T>::isValid(*ptr)"
")"); do { *((volatile int*)__null) = 711; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
712 }
713
714 /*
715 * This may be called only if the location of the T is guaranteed
716 * to be marked (for some reason other than being a Rooted),
717 * e.g., if it is guaranteed to be reachable from an implicit root.
718 *
719 * Create a MutableHandle from a raw location of a T.
720 */
721 static MutableHandle fromMarkedLocation(T* p) {
722 MutableHandle h;
723 h.ptr = p;
724 return h;
725 }
726
727 DECLARE_POINTER_CONSTREF_OPS(T)operator const T&() const { return get(); } const T& operator
->() const { return get(); }
;
728 DECLARE_NONPOINTER_ACCESSOR_METHODS(*ptr)const T* address() const { return &(*ptr); } const T&
get() const { return (*ptr); }
;
729 DECLARE_NONPOINTER_MUTABLE_ACCESSOR_METHODS(*ptr)T* address() { return &(*ptr); } T& get() { return (*
ptr); }
;
730
731 private:
732 MutableHandle() = default;
733 DELETE_ASSIGNMENT_OPS(MutableHandle, T)template <typename S> MutableHandle<T>& operator
=(S) = delete; MutableHandle<T>& operator=(const MutableHandle
<T>&) = delete;
;
734
735 T* ptr;
736};
737
738namespace detail {
739
740template <typename T>
741struct DefineComparisonOps<MutableHandle<T>> : std::true_type {
742 static const T& get(const MutableHandle<T>& v) { return v.get(); }
743};
744
745} // namespace detail
746
747} /* namespace JS */
748
749namespace js {
750
751namespace detail {
752
753// Default implementations for barrier methods on GC thing pointers.
754template <typename T>
755struct PtrBarrierMethodsBase {
756 static T* initial() { return nullptr; }
757 static gc::Cell* asGCThingOrNull(T* v) {
758 if (!v) {
759 return nullptr;
760 }
761 MOZ_ASSERT(uintptr_t(v) > 32)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(uintptr_t(v) > 32)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(uintptr_t(v) > 32))), 0))
) { do { } while (false); MOZ_ReportAssertionFailure("uintptr_t(v) > 32"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 761); AnnotateMozCrashReason("MOZ_ASSERT" "(" "uintptr_t(v) > 32"
")"); do { *((volatile int*)__null) = 761; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
762 return reinterpret_cast<gc::Cell*>(v);
763 }
764 static void exposeToJS(T* t) {
765 if (t) {
766 js::gc::ExposeGCThingToActiveJS(JS::GCCellPtr(t));
767 }
768 }
769 static void readBarrier(T* t) {
770 if (t) {
771 js::gc::IncrementalReadBarrier(JS::GCCellPtr(t));
772 }
773 }
774};
775
776} // namespace detail
777
778template <typename T>
779struct BarrierMethods<T*> : public detail::PtrBarrierMethodsBase<T> {
780 static void writeBarriers(T** vp, T* prev, T* next) {
781 if (prev) {
782 JS::IncrementalPreWriteBarrier(JS::GCCellPtr(prev));
783 }
784 if (next) {
785 JS::AssertGCThingIsNotNurseryAllocable(
786 reinterpret_cast<js::gc::Cell*>(next));
787 }
788 }
789};
790
791template <>
792struct BarrierMethods<JSObject*>
793 : public detail::PtrBarrierMethodsBase<JSObject> {
794 static void writeBarriers(JSObject** vp, JSObject* prev, JSObject* next) {
795 JS::HeapObjectWriteBarriers(vp, prev, next);
796 }
797 static void postWriteBarrier(JSObject** vp, JSObject* prev, JSObject* next) {
798 JS::HeapObjectPostWriteBarrier(vp, prev, next);
799 }
800 static void exposeToJS(JSObject* obj) {
801 if (obj) {
802 JS::ExposeObjectToActiveJS(obj);
803 }
804 }
805};
806
807template <>
808struct BarrierMethods<JSFunction*>
809 : public detail::PtrBarrierMethodsBase<JSFunction> {
810 static void writeBarriers(JSFunction** vp, JSFunction* prev,
811 JSFunction* next) {
812 JS::HeapObjectWriteBarriers(reinterpret_cast<JSObject**>(vp),
813 reinterpret_cast<JSObject*>(prev),
814 reinterpret_cast<JSObject*>(next));
815 }
816 static void exposeToJS(JSFunction* fun) {
817 if (fun) {
818 JS::ExposeObjectToActiveJS(reinterpret_cast<JSObject*>(fun));
819 }
820 }
821};
822
823template <>
824struct BarrierMethods<JSString*>
825 : public detail::PtrBarrierMethodsBase<JSString> {
826 static void writeBarriers(JSString** vp, JSString* prev, JSString* next) {
827 JS::HeapStringWriteBarriers(vp, prev, next);
828 }
829};
830
831template <>
832struct BarrierMethods<JSScript*>
833 : public detail::PtrBarrierMethodsBase<JSScript> {
834 static void writeBarriers(JSScript** vp, JSScript* prev, JSScript* next) {
835 JS::HeapScriptWriteBarriers(vp, prev, next);
836 }
837};
838
839template <>
840struct BarrierMethods<JS::BigInt*>
841 : public detail::PtrBarrierMethodsBase<JS::BigInt> {
842 static void writeBarriers(JS::BigInt** vp, JS::BigInt* prev,
843 JS::BigInt* next) {
844 JS::HeapBigIntWriteBarriers(vp, prev, next);
845 }
846};
847
848// Provide hash codes for Cell kinds that may be relocated and, thus, not have
849// a stable address to use as the base for a hash code. Instead of the address,
850// this hasher uses Cell::getUniqueId to provide exact matches and as a base
851// for generating hash codes.
852//
853// Note: this hasher, like PointerHasher can "hash" a nullptr. While a nullptr
854// would not likely be a useful key, there are some cases where being able to
855// hash a nullptr is useful, either on purpose or because of bugs:
856// (1) existence checks where the key may happen to be null and (2) some
857// aggregate Lookup kinds embed a JSObject* that is frequently null and do not
858// null test before dispatching to the hasher.
859template <typename T>
860struct JS_PUBLIC_API StableCellHasher {
861 using Key = T;
862 using Lookup = T;
863
864 static bool maybeGetHash(const Lookup& l, mozilla::HashNumber* hashOut);
865 static bool ensureHash(const Lookup& l, HashNumber* hashOut);
866 static HashNumber hash(const Lookup& l);
867 static bool match(const Key& k, const Lookup& l);
868 // The rekey hash policy method is not provided since you dont't need to
869 // rekey any more when using this policy.
870};
871
872template <typename T>
873struct JS_PUBLIC_API StableCellHasher<JS::Heap<T>> {
874 using Key = JS::Heap<T>;
875 using Lookup = T;
876
877 static bool maybeGetHash(const Lookup& l, HashNumber* hashOut) {
878 return StableCellHasher<T>::maybeGetHash(l, hashOut);
879 }
880 static bool ensureHash(const Lookup& l, HashNumber* hashOut) {
881 return StableCellHasher<T>::ensureHash(l, hashOut);
882 }
883 static HashNumber hash(const Lookup& l) {
884 return StableCellHasher<T>::hash(l);
885 }
886 static bool match(const Key& k, const Lookup& l) {
887 return StableCellHasher<T>::match(k.unbarrieredGet(), l);
888 }
889};
890
891} // namespace js
892
893namespace mozilla {
894
895template <typename T>
896struct FallibleHashMethods<js::StableCellHasher<T>> {
897 template <typename Lookup>
898 static bool maybeGetHash(Lookup&& l, HashNumber* hashOut) {
899 return js::StableCellHasher<T>::maybeGetHash(std::forward<Lookup>(l),
900 hashOut);
901 }
902 template <typename Lookup>
903 static bool ensureHash(Lookup&& l, HashNumber* hashOut) {
904 return js::StableCellHasher<T>::ensureHash(std::forward<Lookup>(l),
905 hashOut);
906 }
907};
908
909} // namespace mozilla
910
911namespace js {
912
913struct VirtualTraceable {
914 virtual ~VirtualTraceable() = default;
915 virtual void trace(JSTracer* trc, const char* name) = 0;
916};
917
918class StackRootedBase {
919 public:
920 StackRootedBase* previous() { return prev; }
921
922 protected:
923 StackRootedBase** stack;
924 StackRootedBase* prev;
925
926 template <typename T>
927 auto* derived() {
928 return static_cast<JS::Rooted<T>*>(this);
929 }
930};
931
932class PersistentRootedBase
933 : protected mozilla::LinkedListElement<PersistentRootedBase> {
934 protected:
935 friend class mozilla::LinkedList<PersistentRootedBase>;
936 friend class mozilla::LinkedListElement<PersistentRootedBase>;
937
938 template <typename T>
939 auto* derived() {
940 return static_cast<JS::PersistentRooted<T>*>(this);
941 }
942};
943
944struct StackRootedTraceableBase : public StackRootedBase,
945 public VirtualTraceable {};
946
947class PersistentRootedTraceableBase : public PersistentRootedBase,
948 public VirtualTraceable {};
949
950template <typename Base, typename T>
951class TypedRootedGCThingBase : public Base {
952 public:
953 void trace(JSTracer* trc, const char* name);
954};
955
956template <typename Base, typename T>
957class TypedRootedTraceableBase : public Base {
958 public:
959 void trace(JSTracer* trc, const char* name) override {
960 auto* self = this->template derived<T>();
961 JS::GCPolicy<T>::trace(trc, self->address(), name);
962 }
963};
964
965template <typename T>
966struct RootedTraceableTraits {
967 using StackBase = TypedRootedTraceableBase<StackRootedTraceableBase, T>;
968 using PersistentBase =
969 TypedRootedTraceableBase<PersistentRootedTraceableBase, T>;
970};
971
972template <typename T>
973struct RootedGCThingTraits {
974 using StackBase = TypedRootedGCThingBase<StackRootedBase, T>;
975 using PersistentBase = TypedRootedGCThingBase<PersistentRootedBase, T>;
976};
977
978} /* namespace js */
979
980namespace JS {
981
982class JS_PUBLIC_API AutoGCRooter;
983
984enum class AutoGCRooterKind : uint8_t {
985 WrapperVector, /* js::AutoWrapperVector */
986 Wrapper, /* js::AutoWrapperRooter */
987 Custom, /* js::CustomAutoRooter */
988
989 Limit
990};
991
992using RootedListHeads = mozilla::EnumeratedArray<RootKind, js::StackRootedBase*,
993 size_t(RootKind::Limit)>;
994
995using AutoRooterListHeads =
996 mozilla::EnumeratedArray<AutoGCRooterKind, AutoGCRooter*,
997 size_t(AutoGCRooterKind::Limit)>;
998
999// Superclass of JSContext which can be used for rooting data in use by the
1000// current thread but that does not provide all the functions of a JSContext.
1001class RootingContext {
1002 // Stack GC roots for Rooted GC heap pointers.
1003 RootedListHeads stackRoots_;
1004 template <typename T>
1005 friend class Rooted;
1006
1007 // Stack GC roots for AutoFooRooter classes.
1008 AutoRooterListHeads autoGCRooters_;
1009 friend class AutoGCRooter;
1010
1011 // Gecko profiling metadata.
1012 // This isn't really rooting related. It's only here because we want
1013 // GetContextProfilingStackIfEnabled to be inlineable into non-JS code, and
1014 // we didn't want to add another superclass of JSContext just for this.
1015 js::GeckoProfilerThread geckoProfiler_;
1016
1017 public:
1018 explicit RootingContext(js::Nursery* nursery);
1019
1020 void traceStackRoots(JSTracer* trc);
1021
1022 /* Implemented in gc/RootMarking.cpp. */
1023 void traceAllGCRooters(JSTracer* trc);
1024 void traceWrapperGCRooters(JSTracer* trc);
1025 static void traceGCRooterList(JSTracer* trc, AutoGCRooter* head);
1026
1027 void checkNoGCRooters();
1028
1029 js::GeckoProfilerThread& geckoProfiler() { return geckoProfiler_; }
1030
1031 js::Nursery& nursery() const {
1032 MOZ_ASSERT(nursery_)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(nursery_)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(nursery_))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("nursery_", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1032); AnnotateMozCrashReason("MOZ_ASSERT" "(" "nursery_" ")"
); do { *((volatile int*)__null) = 1032; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1033 return *nursery_;
1034 }
1035
1036 protected:
1037 // The remaining members in this class should only be accessed through
1038 // JSContext pointers. They are unrelated to rooting and are in place so
1039 // that inlined API functions can directly access the data.
1040
1041 /* The nursery. Null for non-main-thread contexts. */
1042 js::Nursery* nursery_;
1043
1044 /* The current zone. */
1045 Zone* zone_;
1046
1047 /* The current realm. */
1048 Realm* realm_;
1049
1050 public:
1051 /* Limit pointer for checking native stack consumption. */
1052 JS::NativeStackLimit nativeStackLimit[StackKindCount];
1053
1054#ifdef __wasi__
1055 // For WASI we can't catch call-stack overflows with stack-pointer checks, so
1056 // we count recursion depth with RAII based AutoCheckRecursionLimit.
1057 uint32_t wasiRecursionDepth = 0u;
1058
1059 static constexpr uint32_t wasiRecursionDepthLimit = 350u;
1060#endif // __wasi__
1061
1062 static const RootingContext* get(const JSContext* cx) {
1063 return reinterpret_cast<const RootingContext*>(cx);
1064 }
1065
1066 static RootingContext* get(JSContext* cx) {
1067 return reinterpret_cast<RootingContext*>(cx);
1068 }
1069
1070 friend JS::Realm* js::GetContextRealm(const JSContext* cx);
1071 friend JS::Zone* js::GetContextZone(const JSContext* cx);
1072};
1073
1074class JS_PUBLIC_API AutoGCRooter {
1075 public:
1076 using Kind = AutoGCRooterKind;
1077
1078 AutoGCRooter(JSContext* cx, Kind kind)
1079 : AutoGCRooter(JS::RootingContext::get(cx), kind) {}
1080 AutoGCRooter(RootingContext* cx, Kind kind)
1081 : down(cx->autoGCRooters_[kind]),
1082 stackTop(&cx->autoGCRooters_[kind]),
1083 kind_(kind) {
1084 MOZ_ASSERT(this != *stackTop)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(this != *stackTop)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(this != *stackTop))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("this != *stackTop"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1084); AnnotateMozCrashReason("MOZ_ASSERT" "(" "this != *stackTop"
")"); do { *((volatile int*)__null) = 1084; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1085 *stackTop = this;
1086 }
1087
1088 ~AutoGCRooter() {
1089 MOZ_ASSERT(this == *stackTop)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(this == *stackTop)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(this == *stackTop))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("this == *stackTop"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1089); AnnotateMozCrashReason("MOZ_ASSERT" "(" "this == *stackTop"
")"); do { *((volatile int*)__null) = 1089; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1090 *stackTop = down;
1091 }
1092
1093 void trace(JSTracer* trc);
1094
1095 private:
1096 friend class RootingContext;
1097
1098 AutoGCRooter* const down;
1099 AutoGCRooter** const stackTop;
1100
1101 /*
1102 * Discriminates actual subclass of this being used. The meaning is
1103 * indicated by the corresponding value in the Kind enum.
1104 */
1105 Kind kind_;
1106
1107 /* No copy or assignment semantics. */
1108 AutoGCRooter(AutoGCRooter& ida) = delete;
1109 void operator=(AutoGCRooter& ida) = delete;
1110} JS_HAZ_ROOTED_BASE;
1111
1112/**
1113 * Custom rooting behavior for internal and external clients.
1114 *
1115 * Deprecated. Where possible, use Rooted<> instead.
1116 */
1117class MOZ_RAII JS_PUBLIC_API CustomAutoRooter : private AutoGCRooter {
1118 public:
1119 template <typename CX>
1120 explicit CustomAutoRooter(const CX& cx)
1121 : AutoGCRooter(cx, AutoGCRooter::Kind::Custom) {}
1122
1123 friend void AutoGCRooter::trace(JSTracer* trc);
1124
1125 protected:
1126 virtual ~CustomAutoRooter() = default;
1127
1128 /** Supplied by derived class to trace roots. */
1129 virtual void trace(JSTracer* trc) = 0;
1130};
1131
1132namespace detail {
1133
1134template <typename T>
1135constexpr bool IsTraceable_v =
1136 MapTypeToRootKind<T>::kind == JS::RootKind::Traceable;
1137
1138template <typename T>
1139using RootedTraits =
1140 std::conditional_t<IsTraceable_v<T>, js::RootedTraceableTraits<T>,
1141 js::RootedGCThingTraits<T>>;
1142
1143} /* namespace detail */
1144
1145/**
1146 * Local variable of type T whose value is always rooted. This is typically
1147 * used for local variables, or for non-rooted values being passed to a
1148 * function that requires a handle, e.g. Foo(Root<T>(cx, x)).
1149 *
1150 * If you want to add additional methods to Rooted for a specific
1151 * specialization, define a RootedOperations<T> specialization containing them.
1152 */
1153template <typename T>
1154class MOZ_RAII Rooted : public detail::RootedTraits<T>::StackBase,
1155 public js::RootedOperations<T, Rooted<T>> {
1156 inline void registerWithRootLists(RootedListHeads& roots) {
1157 this->stack = &roots[JS::MapTypeToRootKind<T>::kind];
1158 this->prev = *this->stack;
1159 *this->stack = this;
1160 }
1161
1162 inline RootedListHeads& rootLists(RootingContext* cx) {
1163 return cx->stackRoots_;
1164 }
1165 inline RootedListHeads& rootLists(JSContext* cx) {
1166 return rootLists(RootingContext::get(cx));
1167 }
1168
1169 public:
1170 using ElementType = T;
1171
1172 // Construct an empty Rooted holding a safely initialized but empty T.
1173 // Requires T to have a copy constructor in order to copy the safely
1174 // initialized value.
1175 //
1176 // Note that for SFINAE to reject this method, the 2nd template parameter must
1177 // depend on RootingContext somehow even though we really only care about T.
1178 template <typename RootingContext,
1179 typename = std::enable_if_t<std::is_copy_constructible_v<T>,
1180 RootingContext>>
1181 explicit Rooted(const RootingContext& cx)
1182 : ptr(SafelyInitialized<T>::create()) {
1183 registerWithRootLists(rootLists(cx));
1184 }
1185
1186 // Provide an initial value. Requires T to be constructible from the given
1187 // argument.
1188 template <typename RootingContext, typename S>
1189 Rooted(const RootingContext& cx, S&& initial)
1190 : ptr(std::forward<S>(initial)) {
1191 MOZ_ASSERT(GCPolicy<T>::isValid(ptr))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(GCPolicy<T>::isValid(ptr))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(GCPolicy<T>::isValid(ptr
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("GCPolicy<T>::isValid(ptr)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1191); AnnotateMozCrashReason("MOZ_ASSERT" "(" "GCPolicy<T>::isValid(ptr)"
")"); do { *((volatile int*)__null) = 1191; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1192 registerWithRootLists(rootLists(cx));
1193 }
1194
1195 // (Traceables only) Construct the contained value from the given arguments.
1196 // Constructs in-place, so T does not need to be copyable or movable.
1197 //
1198 // Note that a copyable Traceable passed only a RootingContext will
1199 // choose the above SafelyInitialized<T> constructor, because otherwise
1200 // identical functions with parameter packs are considered less specialized.
1201 //
1202 // The SFINAE type must again depend on an inferred template parameter.
1203 template <
1204 typename RootingContext, typename... CtorArgs,
1205 typename = std::enable_if_t<detail::IsTraceable_v<T>, RootingContext>>
1206 explicit Rooted(const RootingContext& cx, CtorArgs... args)
1207 : ptr(std::forward<CtorArgs>(args)...) {
1208 MOZ_ASSERT(GCPolicy<T>::isValid(ptr))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(GCPolicy<T>::isValid(ptr))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(GCPolicy<T>::isValid(ptr
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("GCPolicy<T>::isValid(ptr)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1208); AnnotateMozCrashReason("MOZ_ASSERT" "(" "GCPolicy<T>::isValid(ptr)"
")"); do { *((volatile int*)__null) = 1208; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1209 registerWithRootLists(rootLists(cx));
1210 }
1211
1212 ~Rooted() {
1213 MOZ_ASSERT(*this->stack == this)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(*this->stack == this)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(*this->stack == this))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("*this->stack == this"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1213); AnnotateMozCrashReason("MOZ_ASSERT" "(" "*this->stack == this"
")"); do { *((volatile int*)__null) = 1213; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
35
Dereference of null pointer (loaded from field 'stack')
1214 *this->stack = this->prev;
1215 }
1216
1217 /*
1218 * This method is public for Rooted so that Codegen.py can use a Rooted
1219 * interchangeably with a MutableHandleValue.
1220 */
1221 void set(const T& value) {
1222 ptr = value;
1223 MOZ_ASSERT(GCPolicy<T>::isValid(ptr))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(GCPolicy<T>::isValid(ptr))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(GCPolicy<T>::isValid(ptr
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("GCPolicy<T>::isValid(ptr)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1223); AnnotateMozCrashReason("MOZ_ASSERT" "(" "GCPolicy<T>::isValid(ptr)"
")"); do { *((volatile int*)__null) = 1223; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1224 }
1225 void set(T&& value) {
1226 ptr = std::move(value);
1227 MOZ_ASSERT(GCPolicy<T>::isValid(ptr))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(GCPolicy<T>::isValid(ptr))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(GCPolicy<T>::isValid(ptr
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("GCPolicy<T>::isValid(ptr)", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1227); AnnotateMozCrashReason("MOZ_ASSERT" "(" "GCPolicy<T>::isValid(ptr)"
")"); do { *((volatile int*)__null) = 1227; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1228 }
1229
1230 DECLARE_POINTER_CONSTREF_OPS(T)operator const T&() const { return get(); } const T& operator
->() const { return get(); }
;
1231 DECLARE_POINTER_ASSIGN_OPS(Rooted, T)Rooted<T>& operator=(const T& p) { set(p); return
*this; } Rooted<T>& operator=(T&& p) { set
(std::move(p)); return *this; } Rooted<T>& operator
=(const Rooted<T>& other) { set(other.get()); return
*this; }
;
1232
1233 T& get() { return ptr; }
1234 const T& get() const { return ptr; }
1235
1236 T* address() { return &ptr; }
1237 const T* address() const { return &ptr; }
1238
1239 private:
1240 T ptr;
1241
1242 Rooted(const Rooted&) = delete;
1243} JS_HAZ_ROOTED;
1244
1245namespace detail {
1246
1247template <typename T>
1248struct DefineComparisonOps<Rooted<T>> : std::true_type {
1249 static const T& get(const Rooted<T>& v) { return v.get(); }
1250};
1251
1252} // namespace detail
1253
1254} /* namespace JS */
1255
1256namespace js {
1257
1258/*
1259 * Inlinable accessors for JSContext.
1260 *
1261 * - These must not be available on the more restricted superclasses of
1262 * JSContext, so we can't simply define them on RootingContext.
1263 *
1264 * - They're perfectly ordinary JSContext functionality, so ought to be
1265 * usable without resorting to jsfriendapi.h, and when JSContext is an
1266 * incomplete type.
1267 */
1268inline JS::Realm* GetContextRealm(const JSContext* cx) {
1269 return JS::RootingContext::get(cx)->realm_;
1270}
1271
1272inline JS::Compartment* GetContextCompartment(const JSContext* cx) {
1273 if (JS::Realm* realm = GetContextRealm(cx)) {
1274 return GetCompartmentForRealm(realm);
1275 }
1276 return nullptr;
1277}
1278
1279inline JS::Zone* GetContextZone(const JSContext* cx) {
1280 return JS::RootingContext::get(cx)->zone_;
1281}
1282
1283inline ProfilingStack* GetContextProfilingStackIfEnabled(JSContext* cx) {
1284 return JS::RootingContext::get(cx)
1285 ->geckoProfiler()
1286 .getProfilingStackIfEnabled();
1287}
1288
1289/**
1290 * Augment the generic Rooted<T> interface when T = JSObject* with
1291 * class-querying and downcasting operations.
1292 *
1293 * Given a Rooted<JSObject*> obj, one can view
1294 * Handle<StringObject*> h = obj.as<StringObject*>();
1295 * as an optimization of
1296 * Rooted<StringObject*> rooted(cx, &obj->as<StringObject*>());
1297 * Handle<StringObject*> h = rooted;
1298 */
1299template <typename Container>
1300class RootedOperations<JSObject*, Container>
1301 : public MutableWrappedPtrOperations<JSObject*, Container> {
1302 public:
1303 template <class U>
1304 JS::Handle<U*> as() const;
1305};
1306
1307/**
1308 * Augment the generic Handle<T> interface when T = JSObject* with
1309 * downcasting operations.
1310 *
1311 * Given a Handle<JSObject*> obj, one can view
1312 * Handle<StringObject*> h = obj.as<StringObject*>();
1313 * as an optimization of
1314 * Rooted<StringObject*> rooted(cx, &obj->as<StringObject*>());
1315 * Handle<StringObject*> h = rooted;
1316 */
1317template <typename Container>
1318class HandleOperations<JSObject*, Container>
1319 : public WrappedPtrOperations<JSObject*, Container> {
1320 public:
1321 template <class U>
1322 JS::Handle<U*> as() const;
1323};
1324
1325} /* namespace js */
1326
1327namespace JS {
1328
1329template <typename T>
1330template <typename S>
1331inline Handle<T>::Handle(
1332 const Rooted<S>& root,
1333 std::enable_if_t<std::is_convertible_v<S, T>, int> dummy) {
1334 ptr = reinterpret_cast<const T*>(root.address());
1335}
1336
1337template <typename T>
1338template <typename S>
1339inline Handle<T>::Handle(
1340 const PersistentRooted<S>& root,
1341 std::enable_if_t<std::is_convertible_v<S, T>, int> dummy) {
1342 ptr = reinterpret_cast<const T*>(root.address());
1343}
1344
1345template <typename T>
1346template <typename S>
1347inline Handle<T>::Handle(
1348 MutableHandle<S>& root,
1349 std::enable_if_t<std::is_convertible_v<S, T>, int> dummy) {
1350 ptr = reinterpret_cast<const T*>(root.address());
1351}
1352
1353template <typename T>
1354inline MutableHandle<T>::MutableHandle(Rooted<T>* root) {
1355 static_assert(sizeof(MutableHandle<T>) == sizeof(T*),
1356 "MutableHandle must be binary compatible with T*.");
1357 ptr = root->address();
1358}
1359
1360template <typename T>
1361inline MutableHandle<T>::MutableHandle(PersistentRooted<T>* root) {
1362 static_assert(sizeof(MutableHandle<T>) == sizeof(T*),
1363 "MutableHandle must be binary compatible with T*.");
1364 ptr = root->address();
1365}
1366
1367JS_PUBLIC_API void AddPersistentRoot(RootingContext* cx, RootKind kind,
1368 js::PersistentRootedBase* root);
1369
1370JS_PUBLIC_API void AddPersistentRoot(JSRuntime* rt, RootKind kind,
1371 js::PersistentRootedBase* root);
1372
1373/**
1374 * A copyable, assignable global GC root type with arbitrary lifetime, an
1375 * infallible constructor, and automatic unrooting on destruction.
1376 *
1377 * These roots can be used in heap-allocated data structures, so they are not
1378 * associated with any particular JSContext or stack. They are registered with
1379 * the JSRuntime itself, without locking. Initialization may take place on
1380 * construction, or in two phases if the no-argument constructor is called
1381 * followed by init().
1382 *
1383 * Note that you must not use an PersistentRooted in an object owned by a JS
1384 * object:
1385 *
1386 * Whenever one object whose lifetime is decided by the GC refers to another
1387 * such object, that edge must be traced only if the owning JS object is traced.
1388 * This applies not only to JS objects (which obviously are managed by the GC)
1389 * but also to C++ objects owned by JS objects.
1390 *
1391 * If you put a PersistentRooted in such a C++ object, that is almost certainly
1392 * a leak. When a GC begins, the referent of the PersistentRooted is treated as
1393 * live, unconditionally (because a PersistentRooted is a *root*), even if the
1394 * JS object that owns it is unreachable. If there is any path from that
1395 * referent back to the JS object, then the C++ object containing the
1396 * PersistentRooted will not be destructed, and the whole blob of objects will
1397 * not be freed, even if there are no references to them from the outside.
1398 *
1399 * In the context of Firefox, this is a severe restriction: almost everything in
1400 * Firefox is owned by some JS object or another, so using PersistentRooted in
1401 * such objects would introduce leaks. For these kinds of edges, Heap<T> or
1402 * TenuredHeap<T> would be better types. It's up to the implementor of the type
1403 * containing Heap<T> or TenuredHeap<T> members to make sure their referents get
1404 * marked when the object itself is marked.
1405 */
1406template <typename T>
1407class PersistentRooted : public detail::RootedTraits<T>::PersistentBase,
1408 public js::RootedOperations<T, PersistentRooted<T>> {
1409 void registerWithRootLists(RootingContext* cx) {
1410 MOZ_ASSERT(!initialized())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!initialized())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!initialized()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("!initialized()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1410); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!initialized()"
")"); do { *((volatile int*)__null) = 1410; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1411 JS::RootKind kind = JS::MapTypeToRootKind<T>::kind;
1412 AddPersistentRoot(cx, kind, this);
1413 }
1414
1415 void registerWithRootLists(JSRuntime* rt) {
1416 MOZ_ASSERT(!initialized())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!initialized())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!initialized()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("!initialized()"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1416); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!initialized()"
")"); do { *((volatile int*)__null) = 1416; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1417 JS::RootKind kind = JS::MapTypeToRootKind<T>::kind;
1418 AddPersistentRoot(rt, kind, this);
1419 }
1420
1421 // Used when JSContext type is incomplete and so it is not known to inherit
1422 // from RootingContext.
1423 void registerWithRootLists(JSContext* cx) {
1424 registerWithRootLists(RootingContext::get(cx));
1425 }
1426
1427 public:
1428 using ElementType = T;
1429
1430 PersistentRooted() : ptr(SafelyInitialized<T>::create()) {}
1431
1432 template <
1433 typename RootHolder,
1434 typename = std::enable_if_t<std::is_copy_constructible_v<T>, RootHolder>>
1435 explicit PersistentRooted(const RootHolder& cx)
1436 : ptr(SafelyInitialized<T>::create()) {
1437 registerWithRootLists(cx);
1438 }
1439
1440 template <
1441 typename RootHolder, typename U,
1442 typename = std::enable_if_t<std::is_constructible_v<T, U>, RootHolder>>
1443 PersistentRooted(const RootHolder& cx, U&& initial)
1444 : ptr(std::forward<U>(initial)) {
1445 registerWithRootLists(cx);
1446 }
1447
1448 template <typename RootHolder, typename... CtorArgs,
1449 typename = std::enable_if_t<detail::IsTraceable_v<T>, RootHolder>>
1450 explicit PersistentRooted(const RootHolder& cx, CtorArgs... args)
1451 : ptr(std::forward<CtorArgs>(args)...) {
1452 registerWithRootLists(cx);
1453 }
1454
1455 PersistentRooted(const PersistentRooted& rhs) : ptr(rhs.ptr) {
1456 /*
1457 * Copy construction takes advantage of the fact that the original
1458 * is already inserted, and simply adds itself to whatever list the
1459 * original was on - no JSRuntime pointer needed.
1460 *
1461 * This requires mutating rhs's links, but those should be 'mutable'
1462 * anyway. C++ doesn't let us declare mutable base classes.
1463 */
1464 const_cast<PersistentRooted&>(rhs).setNext(this);
1465 }
1466
1467 bool initialized() const { return this->isInList(); }
1468
1469 void init(RootingContext* cx) { init(cx, SafelyInitialized<T>::create()); }
1470 void init(JSContext* cx) { init(RootingContext::get(cx)); }
1471
1472 template <typename U>
1473 void init(RootingContext* cx, U&& initial) {
1474 ptr = std::forward<U>(initial);
1475 registerWithRootLists(cx);
1476 }
1477 template <typename U>
1478 void init(JSContext* cx, U&& initial) {
1479 ptr = std::forward<U>(initial);
1480 registerWithRootLists(RootingContext::get(cx));
1481 }
1482
1483 void reset() {
1484 if (initialized()) {
1485 set(SafelyInitialized<T>::create());
1486 this->remove();
1487 }
1488 }
1489
1490 DECLARE_POINTER_CONSTREF_OPS(T)operator const T&() const { return get(); } const T& operator
->() const { return get(); }
;
1491 DECLARE_POINTER_ASSIGN_OPS(PersistentRooted, T)PersistentRooted<T>& operator=(const T& p) { set
(p); return *this; } PersistentRooted<T>& operator=
(T&& p) { set(std::move(p)); return *this; } PersistentRooted
<T>& operator=(const PersistentRooted<T>&
other) { set(other.get()); return *this; }
;
1492
1493 T& get() { return ptr; }
1494 const T& get() const { return ptr; }
1495
1496 T* address() {
1497 MOZ_ASSERT(initialized())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(initialized())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(initialized()))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("initialized()",
"/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1497); AnnotateMozCrashReason("MOZ_ASSERT" "(" "initialized()"
")"); do { *((volatile int*)__null) = 1497; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1498 return &ptr;
1499 }
1500 const T* address() const { return &ptr; }
1501
1502 template <typename U>
1503 void set(U&& value) {
1504 MOZ_ASSERT(initialized())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(initialized())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(initialized()))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("initialized()",
"/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1504); AnnotateMozCrashReason("MOZ_ASSERT" "(" "initialized()"
")"); do { *((volatile int*)__null) = 1504; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1505 ptr = std::forward<U>(value);
1506 }
1507
1508 private:
1509 T ptr;
1510} JS_HAZ_ROOTED;
1511
1512namespace detail {
1513
1514template <typename T>
1515struct DefineComparisonOps<PersistentRooted<T>> : std::true_type {
1516 static const T& get(const PersistentRooted<T>& v) { return v.get(); }
1517};
1518
1519} // namespace detail
1520
1521} /* namespace JS */
1522
1523namespace js {
1524
1525template <typename T, typename D, typename Container>
1526class WrappedPtrOperations<UniquePtr<T, D>, Container> {
1527 const UniquePtr<T, D>& uniquePtr() const {
1528 return static_cast<const Container*>(this)->get();
1529 }
1530
1531 public:
1532 explicit operator bool() const { return !!uniquePtr(); }
1533 T* get() const { return uniquePtr().get(); }
1534 T* operator->() const { return get(); }
1535 T& operator*() const { return *uniquePtr(); }
1536};
1537
1538template <typename T, typename D, typename Container>
1539class MutableWrappedPtrOperations<UniquePtr<T, D>, Container>
1540 : public WrappedPtrOperations<UniquePtr<T, D>, Container> {
1541 UniquePtr<T, D>& uniquePtr() { return static_cast<Container*>(this)->get(); }
1542
1543 public:
1544 [[nodiscard]] typename UniquePtr<T, D>::Pointer release() {
1545 return uniquePtr().release();
1546 }
1547 void reset(T* ptr = T()) { uniquePtr().reset(ptr); }
1548};
1549
1550template <typename T, typename Container>
1551class WrappedPtrOperations<mozilla::Maybe<T>, Container> {
1552 const mozilla::Maybe<T>& maybe() const {
1553 return static_cast<const Container*>(this)->get();
1554 }
1555
1556 public:
1557 // This only supports a subset of Maybe's interface.
1558 bool isSome() const { return maybe().isSome(); }
1559 bool isNothing() const { return maybe().isNothing(); }
1560 const T value() const { return maybe().value(); }
1561 const T* operator->() const { return maybe().ptr(); }
1562 const T& operator*() const { return maybe().ref(); }
1563};
1564
1565template <typename T, typename Container>
1566class MutableWrappedPtrOperations<mozilla::Maybe<T>, Container>
1567 : public WrappedPtrOperations<mozilla::Maybe<T>, Container> {
1568 mozilla::Maybe<T>& maybe() { return static_cast<Container*>(this)->get(); }
1569
1570 public:
1571 // This only supports a subset of Maybe's interface.
1572 T* operator->() { return maybe().ptr(); }
1573 T& operator*() { return maybe().ref(); }
1574 void reset() { return maybe().reset(); }
1575};
1576
1577namespace gc {
1578
1579template <typename T, typename TraceCallbacks>
1580void CallTraceCallbackOnNonHeap(T* v, const TraceCallbacks& aCallbacks,
1581 const char* aName, void* aClosure) {
1582 static_assert(sizeof(T) == sizeof(JS::Heap<T>),
1583 "T and Heap<T> must be compatible.");
1584 MOZ_ASSERT(v)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(v)>::isValid, "invalid assertion condition"); if (
(__builtin_expect(!!(!(!!(v))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("v", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1584); AnnotateMozCrashReason("MOZ_ASSERT" "(" "v" ")"); do
{ *((volatile int*)__null) = 1584; __attribute__((nomerge)) ::
abort(); } while (false); } } while (false)
;
1585 mozilla::DebugOnly<Cell*> cell = BarrierMethods<T>::asGCThingOrNull(*v);
1586 MOZ_ASSERT(cell)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(cell)>::isValid, "invalid assertion condition"); if
((__builtin_expect(!!(!(!!(cell))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("cell", "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1586); AnnotateMozCrashReason("MOZ_ASSERT" "(" "cell" ")");
do { *((volatile int*)__null) = 1586; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1587 MOZ_ASSERT(!IsInsideNursery(cell))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!IsInsideNursery(cell))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!IsInsideNursery(cell)))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("!IsInsideNursery(cell)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/js/RootingAPI.h"
, 1587); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!IsInsideNursery(cell)"
")"); do { *((volatile int*)__null) = 1587; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
1588 JS::Heap<T>* asHeapT = reinterpret_cast<JS::Heap<T>*>(v);
1589 aCallbacks.Trace(asHeapT, aName, aClosure);
1590}
1591
1592} /* namespace gc */
1593
1594template <typename Wrapper, typename T1, typename T2>
1595class WrappedPtrOperations<std::pair<T1, T2>, Wrapper> {
1596 const std::pair<T1, T2>& pair() const {
1597 return static_cast<const Wrapper*>(this)->get();
1598 }
1599
1600 public:
1601 const T1& first() const { return pair().first; }
1602 const T2& second() const { return pair().second; }
1603};
1604
1605template <typename Wrapper, typename T1, typename T2>
1606class MutableWrappedPtrOperations<std::pair<T1, T2>, Wrapper>
1607 : public WrappedPtrOperations<std::pair<T1, T2>, Wrapper> {
1608 std::pair<T1, T2>& pair() { return static_cast<Wrapper*>(this)->get(); }
1609
1610 public:
1611 T1& first() { return pair().first; }
1612 T2& second() { return pair().second; }
1613};
1614
1615} /* namespace js */
1616
1617#endif /* js_RootingAPI_h */