summaryrefslogtreecommitdiffstats
path: root/dom/bindings/test/TestBindingHeader.h
blob: 4a7ea91ee8e788626d8489db738f35579c7e4bfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#ifndef TestBindingHeader_h
#define TestBindingHeader_h

#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/Record.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/ErrorResult.h"
#include "nsCOMPtr.h"
#include "nsGenericHTMLElement.h"
#include "nsWrapperCache.h"
#include "js/Object.h"  // JS::GetClass

// Forward declare this before we include TestCodeGenBinding.h, because that
// header relies on including this one for it, for ParentDict. Hopefully it
// won't begin to rely on it in more fundamental ways.
namespace mozilla {
namespace dom {
class DocGroup;
class TestExternalInterface;
class TestUnionArguments;
class Promise;
}  // namespace dom
}  // namespace mozilla

// We don't export TestCodeGenBinding.h, but it's right in our parent dir.
#include "../TestCodeGenBinding.h"

extern bool TestFuncControlledMember(JSContext*, JSObject*);

namespace mozilla {
namespace dom {

// IID for nsRenamedInterface
#define NS_RENAMED_INTERFACE_IID                     \
  {                                                  \
    0xd4b19ef3, 0xe68b, 0x4e3f, {                    \
      0x94, 0xbc, 0xc9, 0xde, 0x3a, 0x69, 0xb0, 0xe8 \
    }                                                \
  }

class nsRenamedInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_RENAMED_INTERFACE_IID)
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();
};

NS_DEFINE_STATIC_IID_ACCESSOR(nsRenamedInterface, NS_RENAMED_INTERFACE_IID)

// IID for the TestExternalInterface
#define NS_TEST_EXTERNAL_INTERFACE_IID               \
  {                                                  \
    0xd5ba0c99, 0x9b1d, 0x4e71, {                    \
      0x8a, 0x94, 0x56, 0x38, 0x6c, 0xa3, 0xda, 0x3d \
    }                                                \
  }
class TestExternalInterface : public nsISupports {
 public:
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEST_EXTERNAL_INTERFACE_IID)
  NS_DECL_ISUPPORTS
};

NS_DEFINE_STATIC_IID_ACCESSOR(TestExternalInterface,
                              NS_TEST_EXTERNAL_INTERFACE_IID)

class TestNonWrapperCacheInterface : public nsISupports {
 public:
  NS_DECL_ISUPPORTS

  bool WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto,
                  JS::MutableHandle<JSObject*> aReflector);
};

class OnlyForUseInConstructor : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();
};

class TestInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject and GetDocGroup to make binding codegen happy
  virtual nsISupports* GetParentObject();
  DocGroup* GetDocGroup() const;

  // And now our actual WebIDL API
  // Constructors
  static already_AddRefed<TestInterface> Constructor(const GlobalObject&);
  static already_AddRefed<TestInterface> Constructor(const GlobalObject&,
                                                     const nsAString&);
  static already_AddRefed<TestInterface> Constructor(const GlobalObject&,
                                                     uint32_t,
                                                     const Nullable<bool>&);
  static already_AddRefed<TestInterface> Constructor(const GlobalObject&,
                                                     TestInterface*);
  static already_AddRefed<TestInterface> Constructor(const GlobalObject&,
                                                     uint32_t, TestInterface&);

  static already_AddRefed<TestInterface> Constructor(const GlobalObject&,
                                                     const ArrayBuffer&);
  static already_AddRefed<TestInterface> Constructor(const GlobalObject&,
                                                     const Uint8Array&);
  /*  static
  already_AddRefed<TestInterface>
    Constructor(const GlobalObject&, uint32_t, uint32_t,
                const TestInterfaceOrOnlyForUseInConstructor&);
  */

  static already_AddRefed<TestInterface> Test(const GlobalObject&,
                                              ErrorResult&);
  static already_AddRefed<TestInterface> Test(const GlobalObject&,
                                              const nsAString&, ErrorResult&);
  static already_AddRefed<TestInterface> Test(const GlobalObject&,
                                              const nsACString&, ErrorResult&);

  static already_AddRefed<TestInterface> Test2(
      const GlobalObject&, const DictForConstructor&, JS::Handle<JS::Value>,
      JS::Handle<JSObject*>, JS::Handle<JSObject*>, const Sequence<Dict>&,
      JS::Handle<JS::Value>, const Optional<JS::Handle<JSObject*>>&,
      const Optional<JS::Handle<JSObject*>>&, ErrorResult&);

  static already_AddRefed<TestInterface> Test3(const GlobalObject&,
                                               const LongOrStringAnyRecord&,
                                               ErrorResult&);

  static already_AddRefed<TestInterface> Test4(
      const GlobalObject&, const Record<nsString, Record<nsString, JS::Value>>&,
      ErrorResult&);

  static already_AddRefed<TestInterface> Test5(
      const GlobalObject&,
      const Record<
          nsString,
          Sequence<Record<nsString,
                          Record<nsString, Sequence<Sequence<JS::Value>>>>>>&,
      ErrorResult&);

  static already_AddRefed<TestInterface> Test6(
      const GlobalObject&,
      const Sequence<Record<
          nsCString,
          Sequence<Sequence<Record<nsCString, Record<nsString, JS::Value>>>>>>&,
      ErrorResult&);

  // Integer types
  int8_t ReadonlyByte();
  int8_t WritableByte();
  void SetWritableByte(int8_t);
  void PassByte(int8_t);
  int8_t ReceiveByte();
  void PassOptionalByte(const Optional<int8_t>&);
  void PassOptionalByteBeforeRequired(const Optional<int8_t>&, int8_t);
  void PassOptionalByteWithDefault(int8_t);
  void PassOptionalByteWithDefaultBeforeRequired(int8_t, int8_t);
  void PassNullableByte(const Nullable<int8_t>&);
  void PassOptionalNullableByte(const Optional<Nullable<int8_t>>&);
  void PassVariadicByte(const Sequence<int8_t>&);
  int8_t CachedByte();
  int8_t CachedConstantByte();
  int8_t CachedWritableByte();
  void SetCachedWritableByte(int8_t);
  int8_t SideEffectFreeByte();
  void SetSideEffectFreeByte(int8_t);
  int8_t DomDependentByte();
  void SetDomDependentByte(int8_t);
  int8_t ConstantByte();
  int8_t DeviceStateDependentByte();
  int8_t ReturnByteSideEffectFree();
  int8_t ReturnDOMDependentByte();
  int8_t ReturnConstantByte();
  int8_t ReturnDeviceStateDependentByte();

  void UnsafePrerenderMethod();
  int32_t UnsafePrerenderWritable();
  void SetUnsafePrerenderWritable(int32_t);
  int32_t UnsafePrerenderReadonly();
  int16_t ReadonlyShort();
  int16_t WritableShort();
  void SetWritableShort(int16_t);
  void PassShort(int16_t);
  int16_t ReceiveShort();
  void PassOptionalShort(const Optional<int16_t>&);
  void PassOptionalShortWithDefault(int16_t);

  int32_t ReadonlyLong();
  int32_t WritableLong();
  void SetWritableLong(int32_t);
  void PassLong(int32_t);
  int16_t ReceiveLong();
  void PassOptionalLong(const Optional<int32_t>&);
  void PassOptionalLongWithDefault(int32_t);

  int64_t ReadonlyLongLong();
  int64_t WritableLongLong();
  void SetWritableLongLong(int64_t);
  void PassLongLong(int64_t);
  int64_t ReceiveLongLong();
  void PassOptionalLongLong(const Optional<int64_t>&);
  void PassOptionalLongLongWithDefault(int64_t);

  uint8_t ReadonlyOctet();
  uint8_t WritableOctet();
  void SetWritableOctet(uint8_t);
  void PassOctet(uint8_t);
  uint8_t ReceiveOctet();
  void PassOptionalOctet(const Optional<uint8_t>&);
  void PassOptionalOctetWithDefault(uint8_t);

  uint16_t ReadonlyUnsignedShort();
  uint16_t WritableUnsignedShort();
  void SetWritableUnsignedShort(uint16_t);
  void PassUnsignedShort(uint16_t);
  uint16_t ReceiveUnsignedShort();
  void PassOptionalUnsignedShort(const Optional<uint16_t>&);
  void PassOptionalUnsignedShortWithDefault(uint16_t);

  uint32_t ReadonlyUnsignedLong();
  uint32_t WritableUnsignedLong();
  void SetWritableUnsignedLong(uint32_t);
  void PassUnsignedLong(uint32_t);
  uint32_t ReceiveUnsignedLong();
  void PassOptionalUnsignedLong(const Optional<uint32_t>&);
  void PassOptionalUnsignedLongWithDefault(uint32_t);

  uint64_t ReadonlyUnsignedLongLong();
  uint64_t WritableUnsignedLongLong();
  void SetWritableUnsignedLongLong(uint64_t);
  void PassUnsignedLongLong(uint64_t);
  uint64_t ReceiveUnsignedLongLong();
  void PassOptionalUnsignedLongLong(const Optional<uint64_t>&);
  void PassOptionalUnsignedLongLongWithDefault(uint64_t);

  float WritableFloat() const;
  void SetWritableFloat(float);
  float WritableUnrestrictedFloat() const;
  void SetWritableUnrestrictedFloat(float);
  Nullable<float> GetWritableNullableFloat() const;
  void SetWritableNullableFloat(const Nullable<float>&);
  Nullable<float> GetWritableNullableUnrestrictedFloat() const;
  void SetWritableNullableUnrestrictedFloat(const Nullable<float>&);
  double WritableDouble() const;
  void SetWritableDouble(double);
  double WritableUnrestrictedDouble() const;
  void SetWritableUnrestrictedDouble(double);
  Nullable<double> GetWritableNullableDouble() const;
  void SetWritableNullableDouble(const Nullable<double>&);
  Nullable<double> GetWritableNullableUnrestrictedDouble() const;
  void SetWritableNullableUnrestrictedDouble(const Nullable<double>&);
  void PassFloat(float, float, const Nullable<float>&, const Nullable<float>&,
                 double, double, const Nullable<double>&,
                 const Nullable<double>&, const Sequence<float>&,
                 const Sequence<float>&, const Sequence<Nullable<float>>&,
                 const Sequence<Nullable<float>>&, const Sequence<double>&,
                 const Sequence<double>&, const Sequence<Nullable<double>>&,
                 const Sequence<Nullable<double>>&);
  void PassLenientFloat(float, float, const Nullable<float>&,
                        const Nullable<float>&, double, double,
                        const Nullable<double>&, const Nullable<double>&,
                        const Sequence<float>&, const Sequence<float>&,
                        const Sequence<Nullable<float>>&,
                        const Sequence<Nullable<float>>&,
                        const Sequence<double>&, const Sequence<double>&,
                        const Sequence<Nullable<double>>&,
                        const Sequence<Nullable<double>>&);
  float LenientFloatAttr() const;
  void SetLenientFloatAttr(float);
  double LenientDoubleAttr() const;
  void SetLenientDoubleAttr(double);

  void PassUnrestricted(float arg1, float arg2, float arg3, float arg4,
                        double arg5, double arg6, double arg7, double arg8);

  // Interface types
  already_AddRefed<TestInterface> ReceiveSelf();
  already_AddRefed<TestInterface> ReceiveNullableSelf();
  TestInterface* ReceiveWeakSelf();
  TestInterface* ReceiveWeakNullableSelf();
  void PassSelf(TestInterface&);
  void PassNullableSelf(TestInterface*);
  already_AddRefed<TestInterface> NonNullSelf();
  void SetNonNullSelf(TestInterface&);
  already_AddRefed<TestInterface> GetNullableSelf();
  already_AddRefed<TestInterface> CachedSelf();
  void SetNullableSelf(TestInterface*);
  void PassOptionalSelf(const Optional<TestInterface*>&);
  void PassOptionalNonNullSelf(const Optional<NonNull<TestInterface>>&);
  void PassOptionalSelfWithDefault(TestInterface*);

  already_AddRefed<TestNonWrapperCacheInterface>
  ReceiveNonWrapperCacheInterface();
  already_AddRefed<TestNonWrapperCacheInterface>
  ReceiveNullableNonWrapperCacheInterface();
  void ReceiveNonWrapperCacheInterfaceSequence(
      nsTArray<RefPtr<TestNonWrapperCacheInterface>>&);
  void ReceiveNullableNonWrapperCacheInterfaceSequence(
      nsTArray<RefPtr<TestNonWrapperCacheInterface>>&);
  void ReceiveNonWrapperCacheInterfaceNullableSequence(
      Nullable<nsTArray<RefPtr<TestNonWrapperCacheInterface>>>&);
  void ReceiveNullableNonWrapperCacheInterfaceNullableSequence(
      Nullable<nsTArray<RefPtr<TestNonWrapperCacheInterface>>>&);

  already_AddRefed<TestExternalInterface> ReceiveExternal();
  already_AddRefed<TestExternalInterface> ReceiveNullableExternal();
  TestExternalInterface* ReceiveWeakExternal();
  TestExternalInterface* ReceiveWeakNullableExternal();
  void PassExternal(TestExternalInterface*);
  void PassNullableExternal(TestExternalInterface*);
  already_AddRefed<TestExternalInterface> NonNullExternal();
  void SetNonNullExternal(TestExternalInterface*);
  already_AddRefed<TestExternalInterface> GetNullableExternal();
  void SetNullableExternal(TestExternalInterface*);
  void PassOptionalExternal(const Optional<TestExternalInterface*>&);
  void PassOptionalNonNullExternal(const Optional<TestExternalInterface*>&);
  void PassOptionalExternalWithDefault(TestExternalInterface*);

  already_AddRefed<TestCallbackInterface> ReceiveCallbackInterface();
  already_AddRefed<TestCallbackInterface> ReceiveNullableCallbackInterface();
  TestCallbackInterface* ReceiveWeakCallbackInterface();
  TestCallbackInterface* ReceiveWeakNullableCallbackInterface();
  void PassCallbackInterface(TestCallbackInterface&);
  void PassNullableCallbackInterface(TestCallbackInterface*);
  already_AddRefed<TestCallbackInterface> NonNullCallbackInterface();
  void SetNonNullCallbackInterface(TestCallbackInterface&);
  already_AddRefed<TestCallbackInterface> GetNullableCallbackInterface();
  void SetNullableCallbackInterface(TestCallbackInterface*);
  void PassOptionalCallbackInterface(
      const Optional<RefPtr<TestCallbackInterface>>&);
  void PassOptionalNonNullCallbackInterface(
      const Optional<OwningNonNull<TestCallbackInterface>>&);
  void PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface*);

  // Sequence types
  void GetReadonlySequence(nsTArray<int32_t>&);
  void GetReadonlySequenceOfDictionaries(JSContext*, nsTArray<Dict>&);
  void GetReadonlyNullableSequenceOfDictionaries(JSContext*,
                                                 Nullable<nsTArray<Dict>>&);
  void GetReadonlyFrozenSequence(JSContext*, nsTArray<Dict>&);
  void GetReadonlyFrozenNullableSequence(JSContext*, Nullable<nsTArray<Dict>>&);
  void ReceiveSequence(nsTArray<int32_t>&);
  void ReceiveNullableSequence(Nullable<nsTArray<int32_t>>&);
  void ReceiveSequenceOfNullableInts(nsTArray<Nullable<int32_t>>&);
  void ReceiveNullableSequenceOfNullableInts(
      Nullable<nsTArray<Nullable<int32_t>>>&);
  void PassSequence(const Sequence<int32_t>&);
  void PassNullableSequence(const Nullable<Sequence<int32_t>>&);
  void PassSequenceOfNullableInts(const Sequence<Nullable<int32_t>>&);
  void PassOptionalSequenceOfNullableInts(
      const Optional<Sequence<Nullable<int32_t>>>&);
  void PassOptionalNullableSequenceOfNullableInts(
      const Optional<Nullable<Sequence<Nullable<int32_t>>>>&);
  void ReceiveCastableObjectSequence(nsTArray<RefPtr<TestInterface>>&);
  void ReceiveCallbackObjectSequence(nsTArray<RefPtr<TestCallbackInterface>>&);
  void ReceiveNullableCastableObjectSequence(nsTArray<RefPtr<TestInterface>>&);
  void ReceiveNullableCallbackObjectSequence(
      nsTArray<RefPtr<TestCallbackInterface>>&);
  void ReceiveCastableObjectNullableSequence(
      Nullable<nsTArray<RefPtr<TestInterface>>>&);
  void ReceiveNullableCastableObjectNullableSequence(
      Nullable<nsTArray<RefPtr<TestInterface>>>&);
  void ReceiveWeakCastableObjectSequence(nsTArray<RefPtr<TestInterface>>&);
  void ReceiveWeakNullableCastableObjectSequence(
      nsTArray<RefPtr<TestInterface>>&);
  void ReceiveWeakCastableObjectNullableSequence(
      Nullable<nsTArray<RefPtr<TestInterface>>>&);
  void ReceiveWeakNullableCastableObjectNullableSequence(
      Nullable<nsTArray<RefPtr<TestInterface>>>&);
  void PassCastableObjectSequence(
      const Sequence<OwningNonNull<TestInterface>>&);
  void PassNullableCastableObjectSequence(
      const Sequence<RefPtr<TestInterface>>&);
  void PassCastableObjectNullableSequence(
      const Nullable<Sequence<OwningNonNull<TestInterface>>>&);
  void PassNullableCastableObjectNullableSequence(
      const Nullable<Sequence<RefPtr<TestInterface>>>&);
  void PassOptionalSequence(const Optional<Sequence<int32_t>>&);
  void PassOptionalSequenceWithDefaultValue(const Sequence<int32_t>&);
  void PassOptionalNullableSequence(
      const Optional<Nullable<Sequence<int32_t>>>&);
  void PassOptionalNullableSequenceWithDefaultValue(
      const Nullable<Sequence<int32_t>>&);
  void PassOptionalNullableSequenceWithDefaultValue2(
      const Nullable<Sequence<int32_t>>&);
  void PassOptionalObjectSequence(
      const Optional<Sequence<OwningNonNull<TestInterface>>>&);
  void PassExternalInterfaceSequence(
      const Sequence<RefPtr<TestExternalInterface>>&);
  void PassNullableExternalInterfaceSequence(
      const Sequence<RefPtr<TestExternalInterface>>&);

  void ReceiveStringSequence(nsTArray<nsString>&);
  void PassStringSequence(const Sequence<nsString>&);

  void ReceiveByteStringSequence(nsTArray<nsCString>&);
  void PassByteStringSequence(const Sequence<nsCString>&);

  void ReceiveUTF8StringSequence(nsTArray<nsCString>&);
  void PassUTF8StringSequence(const Sequence<nsCString>&);

  void ReceiveAnySequence(JSContext*, nsTArray<JS::Value>&);
  void ReceiveNullableAnySequence(JSContext*, Nullable<nsTArray<JS::Value>>&);
  void ReceiveAnySequenceSequence(JSContext*, nsTArray<nsTArray<JS::Value>>&);

  void ReceiveObjectSequence(JSContext*, nsTArray<JSObject*>&);
  void ReceiveNullableObjectSequence(JSContext*, nsTArray<JSObject*>&);

  void PassSequenceOfSequences(const Sequence<Sequence<int32_t>>&);
  void PassSequenceOfSequencesOfSequences(
      const Sequence<Sequence<Sequence<int32_t>>>&);
  void ReceiveSequenceOfSequences(nsTArray<nsTArray<int32_t>>&);
  void ReceiveSequenceOfSequencesOfSequences(
      nsTArray<nsTArray<nsTArray<int32_t>>>&);

  // Record types
  void PassRecord(const Record<nsString, int32_t>&);
  void PassNullableRecord(const Nullable<Record<nsString, int32_t>>&);
  void PassRecordOfNullableInts(const Record<nsString, Nullable<int32_t>>&);
  void PassOptionalRecordOfNullableInts(
      const Optional<Record<nsString, Nullable<int32_t>>>&);
  void PassOptionalNullableRecordOfNullableInts(
      const Optional<Nullable<Record<nsString, Nullable<int32_t>>>>&);
  void PassCastableObjectRecord(
      const Record<nsString, OwningNonNull<TestInterface>>&);
  void PassNullableCastableObjectRecord(
      const Record<nsString, RefPtr<TestInterface>>&);
  void PassCastableObjectNullableRecord(
      const Nullable<Record<nsString, OwningNonNull<TestInterface>>>&);
  void PassNullableCastableObjectNullableRecord(
      const Nullable<Record<nsString, RefPtr<TestInterface>>>&);
  void PassOptionalRecord(const Optional<Record<nsString, int32_t>>&);
  void PassOptionalNullableRecord(
      const Optional<Nullable<Record<nsString, int32_t>>>&);
  void PassOptionalNullableRecordWithDefaultValue(
      const Nullable<Record<nsString, int32_t>>&);
  void PassOptionalObjectRecord(
      const Optional<Record<nsString, OwningNonNull<TestInterface>>>&);
  void PassExternalInterfaceRecord(
      const Record<nsString, RefPtr<TestExternalInterface>>&);
  void PassNullableExternalInterfaceRecord(
      const Record<nsString, RefPtr<TestExternalInterface>>&);
  void PassStringRecord(const Record<nsString, nsString>&);
  void PassByteStringRecord(const Record<nsString, nsCString>&);
  void PassUTF8StringRecord(const Record<nsString, nsCString>&);
  void PassRecordOfRecords(const Record<nsString, Record<nsString, int32_t>>&);
  void ReceiveRecord(Record<nsString, int32_t>&);
  void ReceiveNullableRecord(Nullable<Record<nsString, int32_t>>&);
  void ReceiveRecordOfNullableInts(Record<nsString, Nullable<int32_t>>&);
  void ReceiveNullableRecordOfNullableInts(
      Nullable<Record<nsString, Nullable<int32_t>>>&);
  void ReceiveRecordOfRecords(Record<nsString, Record<nsString, int32_t>>&);
  void ReceiveAnyRecord(JSContext*, Record<nsString, JS::Value>&);

  // Typed array types
  void PassArrayBuffer(const ArrayBuffer&);
  void PassNullableArrayBuffer(const Nullable<ArrayBuffer>&);
  void PassOptionalArrayBuffer(const Optional<ArrayBuffer>&);
  void PassOptionalNullableArrayBuffer(const Optional<Nullable<ArrayBuffer>>&);
  void PassOptionalNullableArrayBufferWithDefaultValue(
      const Nullable<ArrayBuffer>&);
  void PassArrayBufferView(const ArrayBufferView&);
  void PassInt8Array(const Int8Array&);
  void PassInt16Array(const Int16Array&);
  void PassInt32Array(const Int32Array&);
  void PassUint8Array(const Uint8Array&);
  void PassUint16Array(const Uint16Array&);
  void PassUint32Array(const Uint32Array&);
  void PassUint8ClampedArray(const Uint8ClampedArray&);
  void PassFloat32Array(const Float32Array&);
  void PassFloat64Array(const Float64Array&);
  void PassSequenceOfArrayBuffers(const Sequence<ArrayBuffer>&);
  void PassSequenceOfNullableArrayBuffers(
      const Sequence<Nullable<ArrayBuffer>>&);
  void PassRecordOfArrayBuffers(const Record<nsString, ArrayBuffer>&);
  void PassRecordOfNullableArrayBuffers(
      const Record<nsString, Nullable<ArrayBuffer>>&);
  void PassVariadicTypedArray(const Sequence<Float32Array>&);
  void PassVariadicNullableTypedArray(const Sequence<Nullable<Float32Array>>&);
  void ReceiveUint8Array(JSContext*, JS::MutableHandle<JSObject*>);
  void SetUint8ArrayAttr(const Uint8Array&);
  void GetUint8ArrayAttr(JSContext*, JS::MutableHandle<JSObject*>);

  // DOMString types
  void PassString(const nsAString&);
  void PassNullableString(const nsAString&);
  void PassOptionalString(const Optional<nsAString>&);
  void PassOptionalStringWithDefaultValue(const nsAString&);
  void PassOptionalNullableString(const Optional<nsAString>&);
  void PassOptionalNullableStringWithDefaultValue(const nsAString&);
  void PassVariadicString(const Sequence<nsString>&);
  void ReceiveString(DOMString&);

  // ByteString types
  void PassByteString(const nsCString&);
  void PassNullableByteString(const nsCString&);
  void PassOptionalByteString(const Optional<nsCString>&);
  void PassOptionalByteStringWithDefaultValue(const nsCString&);
  void PassOptionalNullableByteString(const Optional<nsCString>&);
  void PassOptionalNullableByteStringWithDefaultValue(const nsCString&);
  void PassVariadicByteString(const Sequence<nsCString>&);
  void PassOptionalUnionByteString(const Optional<ByteStringOrLong>&);
  void PassOptionalUnionByteStringWithDefaultValue(const ByteStringOrLong&);

  // UTF8String types
  void PassUTF8String(const nsACString&);
  void PassNullableUTF8String(const nsACString&);
  void PassOptionalUTF8String(const Optional<nsACString>&);
  void PassOptionalUTF8StringWithDefaultValue(const nsACString&);
  void PassOptionalNullableUTF8String(const Optional<nsACString>&);
  void PassOptionalNullableUTF8StringWithDefaultValue(const nsACString&);
  void PassVariadicUTF8String(const Sequence<nsCString>&);
  void PassOptionalUnionUTF8String(const Optional<UTF8StringOrLong>&);
  void PassOptionalUnionUTF8StringWithDefaultValue(const UTF8StringOrLong&);

  // USVString types
  void PassUSVS(const nsAString&);
  void PassNullableUSVS(const nsAString&);
  void PassOptionalUSVS(const Optional<nsAString>&);
  void PassOptionalUSVSWithDefaultValue(const nsAString&);
  void PassOptionalNullableUSVS(const Optional<nsAString>&);
  void PassOptionalNullableUSVSWithDefaultValue(const nsAString&);
  void PassVariadicUSVS(const Sequence<nsString>&);
  void ReceiveUSVS(DOMString&);

  // JSString types
  void PassJSString(JSContext*, JS::Handle<JSString*>);
  void PassOptionalJSStringWithDefaultValue(JSContext*, JS::Handle<JSString*>);
  void ReceiveJSString(JSContext*, JS::MutableHandle<JSString*>);
  void GetReadonlyJSStringAttr(JSContext*, JS::MutableHandle<JSString*>);
  void GetJsStringAttr(JSContext*, JS::MutableHandle<JSString*>);
  void SetJsStringAttr(JSContext*, JS::Handle<JSString*>);

  // Enumerated types
  void PassEnum(TestEnum);
  void PassNullableEnum(const Nullable<TestEnum>&);
  void PassOptionalEnum(const Optional<TestEnum>&);
  void PassEnumWithDefault(TestEnum);
  void PassOptionalNullableEnum(const Optional<Nullable<TestEnum>>&);
  void PassOptionalNullableEnumWithDefaultValue(const Nullable<TestEnum>&);
  void PassOptionalNullableEnumWithDefaultValue2(const Nullable<TestEnum>&);
  TestEnum ReceiveEnum();
  Nullable<TestEnum> ReceiveNullableEnum();
  TestEnum EnumAttribute();
  TestEnum ReadonlyEnumAttribute();
  void SetEnumAttribute(TestEnum);

  // Callback types
  void PassCallback(TestCallback&);
  void PassNullableCallback(TestCallback*);
  void PassOptionalCallback(const Optional<OwningNonNull<TestCallback>>&);
  void PassOptionalNullableCallback(const Optional<RefPtr<TestCallback>>&);
  void PassOptionalNullableCallbackWithDefaultValue(TestCallback*);
  already_AddRefed<TestCallback> ReceiveCallback();
  already_AddRefed<TestCallback> ReceiveNullableCallback();
  void PassNullableTreatAsNullCallback(TestTreatAsNullCallback*);
  void PassOptionalNullableTreatAsNullCallback(
      const Optional<RefPtr<TestTreatAsNullCallback>>&);
  void PassOptionalNullableTreatAsNullCallbackWithDefaultValue(
      TestTreatAsNullCallback*);
  void SetTreatAsNullCallback(TestTreatAsNullCallback&);
  already_AddRefed<TestTreatAsNullCallback> TreatAsNullCallback();
  void SetNullableTreatAsNullCallback(TestTreatAsNullCallback*);
  already_AddRefed<TestTreatAsNullCallback> GetNullableTreatAsNullCallback();

  void ForceCallbackGeneration(
      TestIntegerReturn&, TestNullableIntegerReturn&, TestBooleanReturn&,
      TestFloatReturn&, TestStringReturn&, TestEnumReturn&,
      TestInterfaceReturn&, TestNullableInterfaceReturn&,
      TestExternalInterfaceReturn&, TestNullableExternalInterfaceReturn&,
      TestCallbackInterfaceReturn&, TestNullableCallbackInterfaceReturn&,
      TestCallbackReturn&, TestNullableCallbackReturn&, TestObjectReturn&,
      TestNullableObjectReturn&, TestTypedArrayReturn&,
      TestNullableTypedArrayReturn&, TestSequenceReturn&,
      TestNullableSequenceReturn&, TestIntegerArguments&,
      TestInterfaceArguments&, TestStringEnumArguments&, TestObjectArguments&,
      TestOptionalArguments&, TestUnionArguments&, TestUndefinedConstruction&,
      TestIntegerConstruction&, TestBooleanConstruction&,
      TestFloatConstruction&, TestStringConstruction&, TestEnumConstruction&,
      TestInterfaceConstruction&, TestExternalInterfaceConstruction&,
      TestCallbackInterfaceConstruction&, TestCallbackConstruction&,
      TestObjectConstruction&, TestTypedArrayConstruction&,
      TestSequenceConstruction&);

  // Any types
  void PassAny(JSContext*, JS::Handle<JS::Value>);
  void PassVariadicAny(JSContext*, const Sequence<JS::Value>&);
  void PassOptionalAny(JSContext*, JS::Handle<JS::Value>);
  void PassAnyDefaultNull(JSContext*, JS::Handle<JS::Value>);
  void PassSequenceOfAny(JSContext*, const Sequence<JS::Value>&);
  void PassNullableSequenceOfAny(JSContext*,
                                 const Nullable<Sequence<JS::Value>>&);
  void PassOptionalSequenceOfAny(JSContext*,
                                 const Optional<Sequence<JS::Value>>&);
  void PassOptionalNullableSequenceOfAny(
      JSContext*, const Optional<Nullable<Sequence<JS::Value>>>&);
  void PassOptionalSequenceOfAnyWithDefaultValue(
      JSContext*, const Nullable<Sequence<JS::Value>>&);
  void PassSequenceOfSequenceOfAny(JSContext*,
                                   const Sequence<Sequence<JS::Value>>&);
  void PassSequenceOfNullableSequenceOfAny(
      JSContext*, const Sequence<Nullable<Sequence<JS::Value>>>&);
  void PassNullableSequenceOfNullableSequenceOfAny(
      JSContext*, const Nullable<Sequence<Nullable<Sequence<JS::Value>>>>&);
  void PassOptionalNullableSequenceOfNullableSequenceOfAny(
      JSContext*,
      const Optional<Nullable<Sequence<Nullable<Sequence<JS::Value>>>>>&);
  void PassRecordOfAny(JSContext*, const Record<nsString, JS::Value>&);
  void PassNullableRecordOfAny(JSContext*,
                               const Nullable<Record<nsString, JS::Value>>&);
  void PassOptionalRecordOfAny(JSContext*,
                               const Optional<Record<nsString, JS::Value>>&);
  void PassOptionalNullableRecordOfAny(
      JSContext*, const Optional<Nullable<Record<nsString, JS::Value>>>&);
  void PassOptionalRecordOfAnyWithDefaultValue(
      JSContext*, const Nullable<Record<nsString, JS::Value>>&);
  void PassRecordOfRecordOfAny(
      JSContext*, const Record<nsString, Record<nsString, JS::Value>>&);
  void PassRecordOfNullableRecordOfAny(
      JSContext*,
      const Record<nsString, Nullable<Record<nsString, JS::Value>>>&);
  void PassNullableRecordOfNullableRecordOfAny(
      JSContext*,
      const Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>>&);
  void PassOptionalNullableRecordOfNullableRecordOfAny(
      JSContext*,
      const Optional<
          Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>>>&);
  void PassOptionalNullableRecordOfNullableSequenceOfAny(
      JSContext*,
      const Optional<
          Nullable<Record<nsString, Nullable<Sequence<JS::Value>>>>>&);
  void PassOptionalNullableSequenceOfNullableRecordOfAny(
      JSContext*,
      const Optional<
          Nullable<Sequence<Nullable<Record<nsString, JS::Value>>>>>&);
  void ReceiveAny(JSContext*, JS::MutableHandle<JS::Value>);

  // object types
  void PassObject(JSContext*, JS::Handle<JSObject*>);
  void PassVariadicObject(JSContext*, const Sequence<JSObject*>&);
  void PassNullableObject(JSContext*, JS::Handle<JSObject*>);
  void PassVariadicNullableObject(JSContext*, const Sequence<JSObject*>&);
  void PassOptionalObject(JSContext*, const Optional<JS::Handle<JSObject*>>&);
  void PassOptionalNullableObject(JSContext*,
                                  const Optional<JS::Handle<JSObject*>>&);
  void PassOptionalNullableObjectWithDefaultValue(JSContext*,
                                                  JS::Handle<JSObject*>);
  void PassSequenceOfObject(JSContext*, const Sequence<JSObject*>&);
  void PassSequenceOfNullableObject(JSContext*, const Sequence<JSObject*>&);
  void PassNullableSequenceOfObject(JSContext*,
                                    const Nullable<Sequence<JSObject*>>&);
  void PassOptionalNullableSequenceOfNullableSequenceOfObject(
      JSContext*,
      const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>>&);
  void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(
      JSContext*,
      const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>>&);
  void PassRecordOfObject(JSContext*, const Record<nsString, JSObject*>&);
  void ReceiveObject(JSContext*, JS::MutableHandle<JSObject*>);
  void ReceiveNullableObject(JSContext*, JS::MutableHandle<JSObject*>);

  // Union types
  void PassUnion(JSContext*, const ObjectOrLong& arg);
  void PassUnionWithNullable(JSContext* cx, const ObjectOrNullOrLong& arg) {
    OwningObjectOrLong returnValue;
    if (arg.IsNull()) {
    } else if (arg.IsObject()) {
      JS::Rooted<JSObject*> obj(cx, arg.GetAsObject());
      JS::GetClass(obj);
      returnValue.SetAsObject() = obj;
    } else {
      int32_t i = arg.GetAsLong();
      i += 1;
      returnValue.SetAsLong() = i;
    }
  }
#ifdef DEBUG
  void PassUnion2(const LongOrBoolean& arg);
  void PassUnion3(JSContext*, const ObjectOrLongOrBoolean& arg);
  void PassUnion4(const NodeOrLongOrBoolean& arg);
  void PassUnion5(JSContext*, const ObjectOrBoolean& arg);
  void PassUnion6(JSContext*, const ObjectOrString& arg);
  void PassUnion7(JSContext*, const ObjectOrStringOrLong& arg);
  void PassUnion8(JSContext*, const ObjectOrStringOrBoolean& arg);
  void PassUnion9(JSContext*, const ObjectOrStringOrLongOrBoolean& arg);
  void PassUnion10(const EventInitOrLong& arg);
  void PassUnion11(JSContext*, const CustomEventInitOrLong& arg);
  void PassUnion12(const EventInitOrLong& arg);
  void PassUnion13(JSContext*, const ObjectOrLongOrNull& arg);
  void PassUnion14(JSContext*, const ObjectOrLongOrNull& arg);
  void PassUnion15(const LongSequenceOrLong&);
  void PassUnion16(const Optional<LongSequenceOrLong>&);
  void PassUnion17(const LongSequenceOrNullOrLong&);
  void PassUnion18(JSContext*, const ObjectSequenceOrLong&);
  void PassUnion19(JSContext*, const Optional<ObjectSequenceOrLong>&);
  void PassUnion20(JSContext*, const ObjectSequenceOrLong&);
  void PassUnion21(const StringLongRecordOrLong&);
  void PassUnion22(JSContext*, const StringObjectRecordOrLong&);
  void PassUnion23(const ImageDataSequenceOrLong&);
  void PassUnion24(const ImageDataOrNullSequenceOrLong&);
  void PassUnion25(const ImageDataSequenceSequenceOrLong&);
  void PassUnion26(const ImageDataOrNullSequenceSequenceOrLong&);
  void PassUnion27(const StringSequenceOrEventInit&);
  void PassUnion28(const EventInitOrStringSequence&);
  void PassUnionWithCallback(const EventHandlerNonNullOrNullOrLong& arg);
  void PassUnionWithByteString(const ByteStringOrLong&);
  void PassUnionWithUTF8String(const UTF8StringOrLong&);
  void PassUnionWithRecord(const StringStringRecordOrString&);
  void PassUnionWithRecordAndSequence(
      const StringStringRecordOrStringSequence&);
  void PassUnionWithSequenceAndRecord(
      const StringSequenceOrStringStringRecord&);
  void PassUnionWithUSVS(const USVStringOrLong&);
#endif
  void PassNullableUnion(JSContext*, const Nullable<ObjectOrLong>&);
  void PassOptionalUnion(JSContext*, const Optional<ObjectOrLong>&);
  void PassOptionalNullableUnion(JSContext*,
                                 const Optional<Nullable<ObjectOrLong>>&);
  void PassOptionalNullableUnionWithDefaultValue(JSContext*,
                                                 const Nullable<ObjectOrLong>&);
  // void PassUnionWithInterfaces(const TestInterfaceOrTestExternalInterface&
  // arg); void PassUnionWithInterfacesAndNullable(const
  // TestInterfaceOrNullOrTestExternalInterface& arg);
  void PassUnionWithArrayBuffer(const UTF8StringOrArrayBuffer& aArg) {
    auto processor = [](const Span<uint8_t>& aData) -> int { return -1; };
    static_assert(
        std::is_same_v<decltype(ProcessTypedArraysFixed(aArg, processor)),
                       Maybe<int>>,
        "If the union can contain non-typedarray members we need to signal "
        "that with a Maybe<…> rv.");
  }
  void PassUnionWithArrayBufferOrNull(
      const UTF8StringOrArrayBufferOrNull& aArg) {
    auto processor = [](const Span<uint8_t>& aData) -> int { return -1; };
    static_assert(
        std::is_same_v<decltype(ProcessTypedArraysFixed(aArg, processor)),
                       Maybe<int>>,
        "If the union can contain non-typedarray members or null we need to "
        "signal that with a Maybe<…> rv.");
  }
  void PassUnionWithTypedArrays(const ArrayBufferViewOrArrayBuffer& aArg) {
    auto processor = [](const Span<uint8_t>& aData) -> int { return -1; };
    static_assert(
        std::is_same_v<decltype(ProcessTypedArraysFixed(aArg, processor)), int>,
        "If the union can't contain non-typedarray members or null we can just "
        "return the result of calling the lambda.");
  }
  void PassUnionWithTypedArraysOrNull(
      const ArrayBufferViewOrArrayBufferOrNull& aArg) {
    auto processor = [](const Span<uint8_t>& aData) -> int { return -1; };
    static_assert(
        std::is_same_v<decltype(ProcessTypedArraysFixed(aArg, processor)),
                       Maybe<int>>,
        "If the union can contain non-typedarray members or null we need to "
        "signal that with a Maybe<…> rv.");
  }
  void PassUnionWithString(JSContext*, const StringOrObject&);
  void PassUnionWithEnum(JSContext*, const SupportedTypeOrObject&);
  // void PassUnionWithCallback(JSContext*, const TestCallbackOrLong&);
  void PassUnionWithObject(JSContext*, const ObjectOrLong&);

  void PassUnionWithDefaultValue1(const DoubleOrString& arg);
  void PassUnionWithDefaultValue2(const DoubleOrString& arg);
  void PassUnionWithDefaultValue3(const DoubleOrString& arg);
  void PassUnionWithDefaultValue4(const FloatOrString& arg);
  void PassUnionWithDefaultValue5(const FloatOrString& arg);
  void PassUnionWithDefaultValue6(const FloatOrString& arg);
  void PassUnionWithDefaultValue7(const UnrestrictedDoubleOrString& arg);
  void PassUnionWithDefaultValue8(const UnrestrictedDoubleOrString& arg);
  void PassUnionWithDefaultValue9(const UnrestrictedDoubleOrString& arg);
  void PassUnionWithDefaultValue10(const UnrestrictedDoubleOrString& arg);
  void PassUnionWithDefaultValue11(const UnrestrictedFloatOrString& arg);
  void PassUnionWithDefaultValue12(const UnrestrictedFloatOrString& arg);
  void PassUnionWithDefaultValue13(const UnrestrictedFloatOrString& arg);
  void PassUnionWithDefaultValue14(const DoubleOrByteString& arg);
  void PassUnionWithDefaultValue15(const DoubleOrByteString& arg);
  void PassUnionWithDefaultValue16(const DoubleOrByteString& arg);
  void PassUnionWithDefaultValue17(const DoubleOrSupportedType& arg);
  void PassUnionWithDefaultValue18(const DoubleOrSupportedType& arg);
  void PassUnionWithDefaultValue19(const DoubleOrSupportedType& arg);
  void PassUnionWithDefaultValue20(const DoubleOrUSVString& arg);
  void PassUnionWithDefaultValue21(const DoubleOrUSVString& arg);
  void PassUnionWithDefaultValue22(const DoubleOrUSVString& arg);
  void PassUnionWithDefaultValue23(const DoubleOrUTF8String& arg);
  void PassUnionWithDefaultValue24(const DoubleOrUTF8String& arg);
  void PassUnionWithDefaultValue25(const DoubleOrUTF8String& arg);

  void PassNullableUnionWithDefaultValue1(const Nullable<DoubleOrString>& arg);
  void PassNullableUnionWithDefaultValue2(const Nullable<DoubleOrString>& arg);
  void PassNullableUnionWithDefaultValue3(const Nullable<DoubleOrString>& arg);
  void PassNullableUnionWithDefaultValue4(const Nullable<FloatOrString>& arg);
  void PassNullableUnionWithDefaultValue5(const Nullable<FloatOrString>& arg);
  void PassNullableUnionWithDefaultValue6(const Nullable<FloatOrString>& arg);
  void PassNullableUnionWithDefaultValue7(
      const Nullable<UnrestrictedDoubleOrString>& arg);
  void PassNullableUnionWithDefaultValue8(
      const Nullable<UnrestrictedDoubleOrString>& arg);
  void PassNullableUnionWithDefaultValue9(
      const Nullable<UnrestrictedDoubleOrString>& arg);
  void PassNullableUnionWithDefaultValue10(
      const Nullable<UnrestrictedFloatOrString>& arg);
  void PassNullableUnionWithDefaultValue11(
      const Nullable<UnrestrictedFloatOrString>& arg);
  void PassNullableUnionWithDefaultValue12(
      const Nullable<UnrestrictedFloatOrString>& arg);
  void PassNullableUnionWithDefaultValue13(
      const Nullable<DoubleOrByteString>& arg);
  void PassNullableUnionWithDefaultValue14(
      const Nullable<DoubleOrByteString>& arg);
  void PassNullableUnionWithDefaultValue15(
      const Nullable<DoubleOrByteString>& arg);
  void PassNullableUnionWithDefaultValue16(
      const Nullable<DoubleOrByteString>& arg);
  void PassNullableUnionWithDefaultValue17(
      const Nullable<DoubleOrSupportedType>& arg);
  void PassNullableUnionWithDefaultValue18(
      const Nullable<DoubleOrSupportedType>& arg);
  void PassNullableUnionWithDefaultValue19(
      const Nullable<DoubleOrSupportedType>& arg);
  void PassNullableUnionWithDefaultValue20(
      const Nullable<DoubleOrSupportedType>& arg);
  void PassNullableUnionWithDefaultValue21(
      const Nullable<DoubleOrUSVString>& arg);
  void PassNullableUnionWithDefaultValue22(
      const Nullable<DoubleOrUSVString>& arg);
  void PassNullableUnionWithDefaultValue23(
      const Nullable<DoubleOrUSVString>& arg);
  void PassNullableUnionWithDefaultValue24(
      const Nullable<DoubleOrUSVString>& arg);
  void PassNullableUnionWithDefaultValue25(
      const Nullable<DoubleOrUTF8String>& arg);
  void PassNullableUnionWithDefaultValue26(
      const Nullable<DoubleOrUTF8String>& arg);
  void PassNullableUnionWithDefaultValue27(
      const Nullable<DoubleOrUTF8String>& arg);
  void PassNullableUnionWithDefaultValue28(
      const Nullable<DoubleOrUTF8String>& arg);

  void PassSequenceOfUnions(
      const Sequence<OwningCanvasPatternOrCanvasGradient>&);
  void PassSequenceOfUnions2(JSContext*, const Sequence<OwningObjectOrLong>&);
  void PassVariadicUnion(const Sequence<OwningCanvasPatternOrCanvasGradient>&);

  void PassSequenceOfNullableUnions(
      const Sequence<Nullable<OwningCanvasPatternOrCanvasGradient>>&);
  void PassVariadicNullableUnion(
      const Sequence<Nullable<OwningCanvasPatternOrCanvasGradient>>&);
  void PassRecordOfUnions(
      const Record<nsString, OwningCanvasPatternOrCanvasGradient>&);
  void PassRecordOfUnions2(JSContext*,
                           const Record<nsString, OwningObjectOrLong>&);

  void PassUnionWithSequenceOfUnions(
      const StringOrOnlyForUseInInnerUnionOrCanvasPatternSequence& arg);
  void PassUnionWithRecordOfUnions(
      const LongSequenceOrStringOnlyForUseInInnerUnionOrLongSequenceRecord&
          arg);

  void ReceiveUnion(OwningCanvasPatternOrCanvasGradient&);
  void ReceiveUnion2(JSContext*, OwningObjectOrLong&);
  void ReceiveUnionContainingNull(OwningCanvasPatternOrNullOrCanvasGradient&);
  void ReceiveNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>&);
  void ReceiveNullableUnion2(JSContext*, Nullable<OwningObjectOrLong>&);
  void ReceiveUnionWithUndefined(OwningUndefinedOrCanvasPattern&);
  void ReceiveUnionWithNullableUndefined(OwningUndefinedOrNullOrCanvasPattern&);
  void ReceiveUnionWithUndefinedAndNullable(
      OwningUndefinedOrCanvasPatternOrNull&);
  void ReceiveNullableUnionWithUndefined(
      Nullable<OwningUndefinedOrCanvasPattern>&);

  void GetWritableUnion(OwningCanvasPatternOrCanvasGradient&);
  void SetWritableUnion(const CanvasPatternOrCanvasGradient&);
  void GetWritableUnionContainingNull(
      OwningCanvasPatternOrNullOrCanvasGradient&);
  void SetWritableUnionContainingNull(
      const CanvasPatternOrNullOrCanvasGradient&);
  void GetWritableNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>&);
  void SetWritableNullableUnion(const Nullable<CanvasPatternOrCanvasGradient>&);
  void GetWritableUnionWithUndefined(OwningUndefinedOrCanvasPattern&);
  void SetWritableUnionWithUndefined(const UndefinedOrCanvasPattern&);
  void GetWritableUnionWithNullableUndefined(
      OwningUndefinedOrNullOrCanvasPattern&);
  void SetWritableUnionWithNullableUndefined(
      const UndefinedOrNullOrCanvasPattern&);
  void GetWritableUnionWithUndefinedAndNullable(
      OwningUndefinedOrCanvasPatternOrNull&);
  void SetWritableUnionWithUndefinedAndNullable(
      const UndefinedOrCanvasPatternOrNull&);
  void GetWritableNullableUnionWithUndefined(
      Nullable<OwningUndefinedOrCanvasPattern>&);
  void SetWritableNullableUnionWithUndefined(
      const Nullable<UndefinedOrCanvasPattern>&);

  // Promise types
  void PassPromise(Promise&);
  void PassOptionalPromise(const Optional<OwningNonNull<Promise>>&);
  void PassPromiseSequence(const Sequence<OwningNonNull<Promise>>&);
  void PassPromiseRecord(const Record<nsString, RefPtr<Promise>>&);
  Promise* ReceivePromise();
  already_AddRefed<Promise> ReceiveAddrefedPromise();

  // ObservableArray types
  void OnDeleteBooleanObservableArray(bool, uint32_t, ErrorResult&);
  void OnSetBooleanObservableArray(bool, uint32_t, ErrorResult&);
  void OnDeleteObjectObservableArray(JSContext*, JS::Handle<JSObject*>,
                                     uint32_t, ErrorResult&);
  void OnSetObjectObservableArray(JSContext*, JS::Handle<JSObject*>, uint32_t,
                                  ErrorResult&);
  void OnDeleteAnyObservableArray(JSContext*, JS::Handle<JS::Value>, uint32_t,
                                  ErrorResult&);
  void OnSetAnyObservableArray(JSContext*, JS::Handle<JS::Value>, uint32_t,
                               ErrorResult&);
  void OnDeleteInterfaceObservableArray(TestInterface*, uint32_t, ErrorResult&);
  void OnSetInterfaceObservableArray(TestInterface*, uint32_t, ErrorResult&);
  void OnDeleteNullableObservableArray(const Nullable<int>&, uint32_t,
                                       ErrorResult&);
  void OnSetNullableObservableArray(const Nullable<int>&, uint32_t,
                                    ErrorResult&);

  // binaryNames tests
  void MethodRenamedTo();
  void MethodRenamedTo(int8_t);
  int8_t AttributeGetterRenamedTo();
  int8_t AttributeRenamedTo();
  void SetAttributeRenamedTo(int8_t);

  // Dictionary tests
  void PassDictionary(JSContext*, const Dict&);
  void PassDictionary2(JSContext*, const Dict&);
  void GetReadonlyDictionary(JSContext*, Dict&);
  void GetReadonlyNullableDictionary(JSContext*, Nullable<Dict>&);
  void GetWritableDictionary(JSContext*, Dict&);
  void SetWritableDictionary(JSContext*, const Dict&);
  void GetReadonlyFrozenDictionary(JSContext*, Dict&);
  void GetReadonlyFrozenNullableDictionary(JSContext*, Nullable<Dict>&);
  void GetWritableFrozenDictionary(JSContext*, Dict&);
  void SetWritableFrozenDictionary(JSContext*, const Dict&);
  void ReceiveDictionary(JSContext*, Dict&);
  void ReceiveNullableDictionary(JSContext*, Nullable<Dict>&);
  void PassOtherDictionary(const GrandparentDict&);
  void PassSequenceOfDictionaries(JSContext*, const Sequence<Dict>&);
  void PassRecordOfDictionaries(const Record<nsString, GrandparentDict>&);
  void PassDictionaryOrLong(JSContext*, const Dict&);
  void PassDictionaryOrLong(int32_t);
  void PassDictContainingDict(JSContext*, const DictContainingDict&);
  void PassDictContainingSequence(JSContext*, const DictContainingSequence&);
  void ReceiveDictContainingSequence(JSContext*, DictContainingSequence&);
  void PassVariadicDictionary(JSContext*, const Sequence<Dict>&);

  // Typedefs
  void ExerciseTypedefInterfaces1(TestInterface&);
  already_AddRefed<TestInterface> ExerciseTypedefInterfaces2(TestInterface*);
  void ExerciseTypedefInterfaces3(TestInterface&);

  // Deprecated methods and attributes
  int8_t DeprecatedAttribute();
  void SetDeprecatedAttribute(int8_t);
  int8_t DeprecatedMethod();
  int8_t DeprecatedMethodWithContext(JSContext*, const JS::Value&);

  // Static methods and attributes
  static void StaticMethod(const GlobalObject&, bool);
  static void StaticMethodWithContext(const GlobalObject&, const JS::Value&);
  static bool StaticAttribute(const GlobalObject&);
  static void SetStaticAttribute(const GlobalObject&, bool);
  static void Assert(const GlobalObject&, bool);

  // Deprecated static methods and attributes
  static int8_t StaticDeprecatedAttribute(const GlobalObject&);
  static void SetStaticDeprecatedAttribute(const GlobalObject&, int8_t);
  static void StaticDeprecatedMethod(const GlobalObject&);
  static void StaticDeprecatedMethodWithContext(const GlobalObject&,
                                                const JS::Value&);

  // Overload resolution tests
  bool Overload1(TestInterface&);
  TestInterface* Overload1(const nsAString&, TestInterface&);
  void Overload2(TestInterface&);
  void Overload2(JSContext*, const Dict&);
  void Overload2(bool);
  void Overload2(const nsAString&);
  void Overload3(TestInterface&);
  void Overload3(const TestCallback&);
  void Overload3(bool);
  void Overload4(TestInterface&);
  void Overload4(TestCallbackInterface&);
  void Overload4(const nsAString&);
  void Overload5(int32_t);
  void Overload5(TestEnum);
  void Overload6(int32_t);
  void Overload6(bool);
  void Overload7(int32_t);
  void Overload7(bool);
  void Overload7(const nsCString&);
  void Overload8(int32_t);
  void Overload8(TestInterface&);
  void Overload9(const Nullable<int32_t>&);
  void Overload9(const nsAString&);
  void Overload10(const Nullable<int32_t>&);
  void Overload10(JSContext*, JS::Handle<JSObject*>);
  void Overload11(int32_t);
  void Overload11(const nsAString&);
  void Overload12(int32_t);
  void Overload12(const Nullable<bool>&);
  void Overload13(const Nullable<int32_t>&);
  void Overload13(bool);
  void Overload14(const Optional<int32_t>&);
  void Overload14(TestInterface&);
  void Overload15(int32_t);
  void Overload15(const Optional<NonNull<TestInterface>>&);
  void Overload16(int32_t);
  void Overload16(const Optional<TestInterface*>&);
  void Overload17(const Sequence<int32_t>&);
  void Overload17(const Record<nsString, int32_t>&);
  void Overload18(const Record<nsString, nsString>&);
  void Overload18(const Sequence<nsString>&);
  void Overload19(const Sequence<int32_t>&);
  void Overload19(JSContext*, const Dict&);
  void Overload20(JSContext*, const Dict&);
  void Overload20(const Sequence<int32_t>&);

  // Variadic handling
  void PassVariadicThirdArg(const nsAString&, int32_t,
                            const Sequence<OwningNonNull<TestInterface>>&);

  // Conditionally exposed methods/attributes
  bool Prefable1();
  bool Prefable2();
  bool Prefable3();
  bool Prefable4();
  bool Prefable5();
  bool Prefable6();
  bool Prefable7();
  bool Prefable8();
  bool Prefable9();
  void Prefable10();
  void Prefable11();
  bool Prefable12();
  void Prefable13();
  bool Prefable14();
  bool Prefable15();
  bool Prefable16();
  void Prefable17();
  void Prefable18();
  void Prefable19();
  void Prefable20();
  void Prefable21();
  void Prefable22();
  void Prefable23();
  void Prefable24();

  // Conditionally exposed methods/attributes involving [SecureContext]
  bool ConditionalOnSecureContext1();
  bool ConditionalOnSecureContext2();
  bool ConditionalOnSecureContext3();
  bool ConditionalOnSecureContext4();
  void ConditionalOnSecureContext5();
  void ConditionalOnSecureContext6();
  void ConditionalOnSecureContext7();
  void ConditionalOnSecureContext8();

  bool ConditionalOnSecureContext9();
  void ConditionalOnSecureContext10();

  // Miscellania
  int32_t AttrWithLenientThis();
  void SetAttrWithLenientThis(int32_t);
  uint32_t UnforgeableAttr();
  uint32_t UnforgeableAttr2();
  uint32_t UnforgeableMethod();
  uint32_t UnforgeableMethod2();
  void Stringify(nsString&);
  void PassRenamedInterface(nsRenamedInterface&);
  TestInterface* PutForwardsAttr();
  TestInterface* PutForwardsAttr2();
  TestInterface* PutForwardsAttr3();
  void GetToJSONShouldSkipThis(JSContext*, JS::MutableHandle<JS::Value>);
  void SetToJSONShouldSkipThis(JSContext*, JS::Rooted<JS::Value>&);
  TestParentInterface* ToJSONShouldSkipThis2();
  void SetToJSONShouldSkipThis2(TestParentInterface&);
  TestCallbackInterface* ToJSONShouldSkipThis3();
  void SetToJSONShouldSkipThis3(TestCallbackInterface&);
  void ThrowingMethod(ErrorResult& aRv);
  bool GetThrowingAttr(ErrorResult& aRv) const;
  void SetThrowingAttr(bool arg, ErrorResult& aRv);
  bool GetThrowingGetterAttr(ErrorResult& aRv) const;
  void SetThrowingGetterAttr(bool arg);
  bool ThrowingSetterAttr() const;
  void SetThrowingSetterAttr(bool arg, ErrorResult& aRv);
  void CanOOMMethod(OOMReporter& aRv);
  bool GetCanOOMAttr(OOMReporter& aRv) const;
  void SetCanOOMAttr(bool arg, OOMReporter& aRv);
  bool GetCanOOMGetterAttr(OOMReporter& aRv) const;
  void SetCanOOMGetterAttr(bool arg);
  bool CanOOMSetterAttr() const;
  void SetCanOOMSetterAttr(bool arg, OOMReporter& aRv);
  void NeedsSubjectPrincipalMethod(nsIPrincipal&);
  bool NeedsSubjectPrincipalAttr(nsIPrincipal&);
  void SetNeedsSubjectPrincipalAttr(bool, nsIPrincipal&);
  void NeedsCallerTypeMethod(CallerType);
  bool NeedsCallerTypeAttr(CallerType);
  void SetNeedsCallerTypeAttr(bool, CallerType);
  void NeedsNonSystemSubjectPrincipalMethod(nsIPrincipal*);
  bool NeedsNonSystemSubjectPrincipalAttr(nsIPrincipal*);
  void SetNeedsNonSystemSubjectPrincipalAttr(bool, nsIPrincipal*);
  void CeReactionsMethod();
  void CeReactionsMethodOverload();
  void CeReactionsMethodOverload(const nsAString&);
  bool CeReactionsAttr() const;
  void SetCeReactionsAttr(bool);
  int16_t LegacyCall(const JS::Value&, uint32_t, TestInterface&);
  void PassArgsWithDefaults(JSContext*, const Optional<int32_t>&,
                            TestInterface*, const Dict&, double,
                            const Optional<float>&);

  void SetDashed_attribute(int8_t);
  int8_t Dashed_attribute();
  void Dashed_method();

  bool NonEnumerableAttr() const;
  void SetNonEnumerableAttr(bool);
  void NonEnumerableMethod();

  // Methods and properties imported via "includes"
  bool MixedInProperty();
  void SetMixedInProperty(bool);
  void MixedInMethod();

  // Test EnforceRange/Clamp
  void DontEnforceRangeOrClamp(int8_t);
  void DoEnforceRange(int8_t);
  void DoEnforceRangeNullable(const Nullable<int8_t>&);
  void DoClamp(int8_t);
  void DoClampNullable(const Nullable<int8_t>&);
  void SetEnforcedByte(int8_t);
  int8_t EnforcedByte();
  void SetEnforcedNullableByte(const Nullable<int8_t>&);
  Nullable<int8_t> GetEnforcedNullableByte() const;
  void SetClampedNullableByte(const Nullable<int8_t>&);
  Nullable<int8_t> GetClampedNullableByte() const;
  void SetClampedByte(int8_t);
  int8_t ClampedByte();

  // Test AllowShared
  void SetAllowSharedArrayBufferViewTypedef(const ArrayBufferView&);
  void GetAllowSharedArrayBufferViewTypedef(JSContext*,
                                            JS::MutableHandle<JSObject*>);
  void SetAllowSharedArrayBufferView(const ArrayBufferView&);
  void GetAllowSharedArrayBufferView(JSContext*, JS::MutableHandle<JSObject*>);
  void SetAllowSharedNullableArrayBufferView(const Nullable<ArrayBufferView>&);
  void GetAllowSharedNullableArrayBufferView(JSContext*,
                                             JS::MutableHandle<JSObject*>);
  void SetAllowSharedArrayBuffer(const ArrayBuffer&);
  void GetAllowSharedArrayBuffer(JSContext*, JS::MutableHandle<JSObject*>);
  void SetAllowSharedNullableArrayBuffer(const Nullable<ArrayBuffer>&);
  void GetAllowSharedNullableArrayBuffer(JSContext*,
                                         JS::MutableHandle<JSObject*>);

  void PassAllowSharedArrayBufferViewTypedef(const ArrayBufferView&);
  void PassAllowSharedArrayBufferView(const ArrayBufferView&);
  void PassAllowSharedNullableArrayBufferView(const Nullable<ArrayBufferView>&);
  void PassAllowSharedArrayBuffer(const ArrayBuffer&);
  void PassAllowSharedNullableArrayBuffer(const Nullable<ArrayBuffer>&);
  void PassUnionArrayBuffer(const StringOrArrayBuffer& foo);
  void PassUnionAllowSharedArrayBuffer(
      const StringOrMaybeSharedArrayBuffer& foo);

 private:
  // We add signatures here that _could_ start matching if the codegen
  // got data types wrong.  That way if it ever does we'll have a call
  // to these private deleted methods and compilation will fail.
  void SetReadonlyByte(int8_t) = delete;
  template <typename T>
  void SetWritableByte(T) = delete;
  template <typename T>
  void PassByte(T) = delete;
  void PassNullableByte(Nullable<int8_t>&) = delete;
  template <typename T>
  void PassOptionalByte(const Optional<T>&) = delete;
  template <typename T>
  void PassOptionalByteWithDefault(T) = delete;
  void PassVariadicByte(Sequence<int8_t>&) = delete;

  void SetReadonlyShort(int16_t) = delete;
  template <typename T>
  void SetWritableShort(T) = delete;
  template <typename T>
  void PassShort(T) = delete;
  template <typename T>
  void PassOptionalShort(const Optional<T>&) = delete;
  template <typename T>
  void PassOptionalShortWithDefault(T) = delete;

  void SetReadonlyLong(int32_t) = delete;
  template <typename T>
  void SetWritableLong(T) = delete;
  template <typename T>
  void PassLong(T) = delete;
  template <typename T>
  void PassOptionalLong(const Optional<T>&) = delete;
  template <typename T>
  void PassOptionalLongWithDefault(T) = delete;

  void SetReadonlyLongLong(int64_t) = delete;
  template <typename T>
  void SetWritableLongLong(T) = delete;
  template <typename T>
  void PassLongLong(T) = delete;
  template <typename T>
  void PassOptionalLongLong(const Optional<T>&) = delete;
  template <typename T>
  void PassOptionalLongLongWithDefault(T) = delete;

  void SetReadonlyOctet(uint8_t) = delete;
  template <typename T>
  void SetWritableOctet(T) = delete;
  template <typename T>
  void PassOctet(T) = delete;
  template <typename T>
  void PassOptionalOctet(const Optional<T>&) = delete;
  template <typename T>
  void PassOptionalOctetWithDefault(T) = delete;

  void SetReadonlyUnsignedShort(uint16_t) = delete;
  template <typename T>
  void SetWritableUnsignedShort(T) = delete;
  template <typename T>
  void PassUnsignedShort(T) = delete;
  template <typename T>
  void PassOptionalUnsignedShort(const Optional<T>&) = delete;
  template <typename T>
  void PassOptionalUnsignedShortWithDefault(T) = delete;

  void SetReadonlyUnsignedLong(uint32_t) = delete;
  template <typename T>
  void SetWritableUnsignedLong(T) = delete;
  template <typename T>
  void PassUnsignedLong(T) = delete;
  template <typename T>
  void PassOptionalUnsignedLong(const Optional<T>&) = delete;
  template <typename T>
  void PassOptionalUnsignedLongWithDefault(T) = delete;

  void SetReadonlyUnsignedLongLong(uint64_t) = delete;
  template <typename T>
  void SetWritableUnsignedLongLong(T) = delete;
  template <typename T>
  void PassUnsignedLongLong(T) = delete;
  template <typename T>
  void PassOptionalUnsignedLongLong(const Optional<T>&) = delete;
  template <typename T>
  void PassOptionalUnsignedLongLongWithDefault(T) = delete;

  // Enforce that only const things are passed for sequences
  void PassSequence(Sequence<int32_t>&) = delete;
  void PassNullableSequence(Nullable<Sequence<int32_t>>&) = delete;
  void PassOptionalNullableSequenceWithDefaultValue(
      Nullable<Sequence<int32_t>>&) = delete;
  void PassSequenceOfAny(JSContext*, Sequence<JS::Value>&) = delete;
  void PassNullableSequenceOfAny(JSContext*,
                                 Nullable<Sequence<JS::Value>>&) = delete;
  void PassOptionalSequenceOfAny(JSContext*,
                                 Optional<Sequence<JS::Value>>&) = delete;
  void PassOptionalNullableSequenceOfAny(
      JSContext*, Optional<Nullable<Sequence<JS::Value>>>&) = delete;
  void PassOptionalSequenceOfAnyWithDefaultValue(
      JSContext*, Nullable<Sequence<JS::Value>>&) = delete;
  void PassSequenceOfSequenceOfAny(JSContext*,
                                   Sequence<Sequence<JS::Value>>&) = delete;
  void PassSequenceOfNullableSequenceOfAny(
      JSContext*, Sequence<Nullable<Sequence<JS::Value>>>&) = delete;
  void PassNullableSequenceOfNullableSequenceOfAny(
      JSContext*, Nullable<Sequence<Nullable<Sequence<JS::Value>>>>&) = delete;
  void PassOptionalNullableSequenceOfNullableSequenceOfAny(
      JSContext*,
      Optional<Nullable<Sequence<Nullable<Sequence<JS::Value>>>>>&) = delete;
  void PassSequenceOfObject(JSContext*, Sequence<JSObject*>&) = delete;
  void PassSequenceOfNullableObject(JSContext*, Sequence<JSObject*>&) = delete;
  void PassOptionalNullableSequenceOfNullableSequenceOfObject(
      JSContext*,
      Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>>&) = delete;
  void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(
      JSContext*,
      Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>>&) = delete;

  // Enforce that only const things are passed for optional
  void PassOptionalByte(Optional<int8_t>&) = delete;
  void PassOptionalNullableByte(Optional<Nullable<int8_t>>&) = delete;
  void PassOptionalShort(Optional<int16_t>&) = delete;
  void PassOptionalLong(Optional<int32_t>&) = delete;
  void PassOptionalLongLong(Optional<int64_t>&) = delete;
  void PassOptionalOctet(Optional<uint8_t>&) = delete;
  void PassOptionalUnsignedShort(Optional<uint16_t>&) = delete;
  void PassOptionalUnsignedLong(Optional<uint32_t>&) = delete;
  void PassOptionalUnsignedLongLong(Optional<uint64_t>&) = delete;
  void PassOptionalSelf(Optional<TestInterface*>&) = delete;
  void PassOptionalNonNullSelf(Optional<NonNull<TestInterface>>&) = delete;
  void PassOptionalExternal(Optional<TestExternalInterface*>&) = delete;
  void PassOptionalNonNullExternal(Optional<TestExternalInterface*>&) = delete;
  void PassOptionalSequence(Optional<Sequence<int32_t>>&) = delete;
  void PassOptionalNullableSequence(Optional<Nullable<Sequence<int32_t>>>&) =
      delete;
  void PassOptionalObjectSequence(
      Optional<Sequence<OwningNonNull<TestInterface>>>&) = delete;
  void PassOptionalArrayBuffer(Optional<ArrayBuffer>&) = delete;
  void PassOptionalNullableArrayBuffer(Optional<ArrayBuffer*>&) = delete;
  void PassOptionalEnum(Optional<TestEnum>&) = delete;
  void PassOptionalCallback(JSContext*,
                            Optional<OwningNonNull<TestCallback>>&) = delete;
  void PassOptionalNullableCallback(JSContext*,
                                    Optional<RefPtr<TestCallback>>&) = delete;
  void PassOptionalAny(Optional<JS::Handle<JS::Value>>&) = delete;

  // And test that string stuff is always const
  void PassString(nsAString&) = delete;
  void PassNullableString(nsAString&) = delete;
  void PassOptionalString(Optional<nsAString>&) = delete;
  void PassOptionalStringWithDefaultValue(nsAString&) = delete;
  void PassOptionalNullableString(Optional<nsAString>&) = delete;
  void PassOptionalNullableStringWithDefaultValue(nsAString&) = delete;
  void PassVariadicString(Sequence<nsString>&) = delete;

  // cstrings should be const as well
  void PassByteString(nsCString&) = delete;
  void PassNullableByteString(nsCString&) = delete;
  void PassOptionalByteString(Optional<nsCString>&) = delete;
  void PassOptionalByteStringWithDefaultValue(nsCString&) = delete;
  void PassOptionalNullableByteString(Optional<nsCString>&) = delete;
  void PassOptionalNullableByteStringWithDefaultValue(nsCString&) = delete;
  void PassVariadicByteString(Sequence<nsCString>&) = delete;

  // cstrings should be const as well
  void PassUTF8String(nsACString&) = delete;
  void PassNullableUTF8String(nsACString&) = delete;
  void PassOptionalUTF8String(Optional<nsACString>&) = delete;
  void PassOptionalUTF8StringWithDefaultValue(nsACString&) = delete;
  void PassOptionalNullableUTF8String(Optional<nsACString>&) = delete;
  void PassOptionalNullableUTF8StringWithDefaultValue(nsACString&) = delete;
  void PassVariadicUTF8String(Sequence<nsCString>&) = delete;

  // Make sure dictionary arguments are always const
  void PassDictionary(JSContext*, Dict&) = delete;
  void PassOtherDictionary(GrandparentDict&) = delete;
  void PassSequenceOfDictionaries(JSContext*, Sequence<Dict>&) = delete;
  void PassDictionaryOrLong(JSContext*, Dict&) = delete;
  void PassDictContainingDict(JSContext*, DictContainingDict&) = delete;
  void PassDictContainingSequence(DictContainingSequence&) = delete;

  // Make sure various nullable things are always const
  void PassNullableEnum(Nullable<TestEnum>&) = delete;

  // Make sure unions are always const
  void PassUnion(JSContext*, ObjectOrLong& arg) = delete;
  void PassUnionWithNullable(JSContext*, ObjectOrNullOrLong& arg) = delete;
  void PassNullableUnion(JSContext*, Nullable<ObjectOrLong>&) = delete;
  void PassOptionalUnion(JSContext*, Optional<ObjectOrLong>&) = delete;
  void PassOptionalNullableUnion(JSContext*,
                                 Optional<Nullable<ObjectOrLong>>&) = delete;
  void PassOptionalNullableUnionWithDefaultValue(
      JSContext*, Nullable<ObjectOrLong>&) = delete;

  // Make sure variadics are const as needed
  void PassVariadicAny(JSContext*, Sequence<JS::Value>&) = delete;
  void PassVariadicObject(JSContext*, Sequence<JSObject*>&) = delete;
  void PassVariadicNullableObject(JSContext*, Sequence<JSObject*>&) = delete;

  // Ensure NonNull does not leak in
  void PassSelf(NonNull<TestInterface>&) = delete;
  void PassSelf(OwningNonNull<TestInterface>&) = delete;
  void PassSelf(const NonNull<TestInterface>&) = delete;
  void PassSelf(const OwningNonNull<TestInterface>&) = delete;
  void PassCallbackInterface(OwningNonNull<TestCallbackInterface>&) = delete;
  void PassCallbackInterface(const OwningNonNull<TestCallbackInterface>&) =
      delete;
  void PassCallbackInterface(NonNull<TestCallbackInterface>&) = delete;
  void PassCallbackInterface(const NonNull<TestCallbackInterface>&) = delete;
  void PassCallback(OwningNonNull<TestCallback>&) = delete;
  void PassCallback(const OwningNonNull<TestCallback>&) = delete;
  void PassCallback(NonNull<TestCallback>&) = delete;
  void PassCallback(const NonNull<TestCallback>&) = delete;
  void PassString(const NonNull<nsAString>&) = delete;
  void PassString(NonNull<nsAString>&) = delete;
  void PassString(const OwningNonNull<nsAString>&) = delete;
  void PassString(OwningNonNull<nsAString>&) = delete;
};

class TestIndexedGetterInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  uint32_t IndexedGetter(uint32_t, bool&);
  uint32_t IndexedGetter(uint32_t&) = delete;
  uint32_t Item(uint32_t&);
  uint32_t Item(uint32_t, bool&) = delete;
  uint32_t Length();
  void LegacyCall(JS::Handle<JS::Value>);
  int32_t CachedAttr();
  int32_t StoreInSlotAttr();
};

class TestNamedGetterInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  void NamedGetter(const nsAString&, bool&, nsAString&);
  void GetSupportedNames(nsTArray<nsString>&);
};

class TestIndexedGetterAndSetterAndNamedGetterInterface
    : public nsISupports,
      public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  void NamedGetter(const nsAString&, bool&, nsAString&);
  void GetSupportedNames(nsTArray<nsString>&);
  int32_t IndexedGetter(uint32_t, bool&);
  void IndexedSetter(uint32_t, int32_t);
  uint32_t Length();
};

class TestIndexedAndNamedGetterInterface : public nsISupports,
                                           public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  uint32_t IndexedGetter(uint32_t, bool&);
  void NamedGetter(const nsAString&, bool&, nsAString&);
  void NamedItem(const nsAString&, nsAString&);
  uint32_t Length();
  void GetSupportedNames(nsTArray<nsString>&);
};

class TestIndexedSetterInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  void IndexedSetter(uint32_t, const nsAString&);
  void IndexedGetter(uint32_t, bool&, nsString&);
  uint32_t Length();
  void SetItem(uint32_t, const nsAString&);
};

class TestNamedSetterInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
  TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&);
  void GetSupportedNames(nsTArray<nsString>&);
};

class TestIndexedAndNamedSetterInterface : public nsISupports,
                                           public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  void IndexedSetter(uint32_t, TestIndexedSetterInterface&);
  TestIndexedSetterInterface* IndexedGetter(uint32_t, bool&);
  uint32_t Length();
  void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
  TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&);
  void SetNamedItem(const nsAString&, TestIndexedSetterInterface&);
  void GetSupportedNames(nsTArray<nsString>&);
};

class TestIndexedAndNamedGetterAndSetterInterface
    : public TestIndexedSetterInterface {
 public:
  uint32_t IndexedGetter(uint32_t, bool&);
  uint32_t Item(uint32_t);
  void NamedGetter(const nsAString&, bool&, nsAString&);
  void NamedItem(const nsAString&, nsAString&);
  void IndexedSetter(uint32_t, int32_t&);
  void IndexedSetter(uint32_t, const nsAString&) = delete;
  void NamedSetter(const nsAString&, const nsAString&);
  void Stringify(nsAString&);
  uint32_t Length();
  void GetSupportedNames(nsTArray<nsString>&);
};

class TestCppKeywordNamedMethodsInterface : public nsISupports,
                                            public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  bool Continue();
  bool Delete();
  int32_t Volatile();
};

class TestNamedDeleterInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  void NamedDeleter(const nsAString&, bool&);
  long NamedGetter(const nsAString&, bool&);
  void GetSupportedNames(nsTArray<nsString>&);
};

class TestNamedDeleterWithRetvalInterface : public nsISupports,
                                            public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();

  bool NamedDeleter(const nsAString&, bool&);
  bool NamedDeleter(const nsAString&) = delete;
  long NamedGetter(const nsAString&, bool&);
  bool DelNamedItem(const nsAString&);
  bool DelNamedItem(const nsAString&, bool&) = delete;
  void GetSupportedNames(nsTArray<nsString>&);
};

class TestParentInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  virtual nsISupports* GetParentObject();
};

class TestChildInterface : public TestParentInterface {};

class TestDeprecatedInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  static already_AddRefed<TestDeprecatedInterface> Constructor(
      const GlobalObject&);

  static void AlsoDeprecated(const GlobalObject&);

  virtual nsISupports* GetParentObject();
};

class TestInterfaceWithPromiseConstructorArg : public nsISupports,
                                               public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  static already_AddRefed<TestInterfaceWithPromiseConstructorArg> Constructor(
      const GlobalObject&, Promise&);

  virtual nsISupports* GetParentObject();
};

class TestSecureContextInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  static already_AddRefed<TestSecureContextInterface> Constructor(
      const GlobalObject&, ErrorResult&);

  static void AlsoSecureContext(const GlobalObject&);

  virtual nsISupports* GetParentObject();
};

class TestNamespace {
 public:
  static bool Foo(const GlobalObject&);
  static int32_t Bar(const GlobalObject&);
  static void Baz(const GlobalObject&);
};

class TestRenamedNamespace {};

class TestProtoObjectHackedNamespace {};

class TestWorkerExposedInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject to make binding codegen happy
  nsISupports* GetParentObject();

  void NeedsSubjectPrincipalMethod(nsIPrincipal&);
  bool NeedsSubjectPrincipalAttr(nsIPrincipal&);
  void SetNeedsSubjectPrincipalAttr(bool, nsIPrincipal&);
  void NeedsCallerTypeMethod(CallerType);
  bool NeedsCallerTypeAttr(CallerType);
  void SetNeedsCallerTypeAttr(bool, CallerType);
  void NeedsNonSystemSubjectPrincipalMethod(nsIPrincipal*);
  bool NeedsNonSystemSubjectPrincipalAttr(nsIPrincipal*);
  void SetNeedsNonSystemSubjectPrincipalAttr(bool, nsIPrincipal*);
};

class TestHTMLConstructorInterface : public nsGenericHTMLElement {
 public:
  virtual nsISupports* GetParentObject();
};

class TestThrowingConstructorInterface : public nsISupports,
                                         public nsWrapperCache {
 public:
  static already_AddRefed<TestThrowingConstructorInterface> Constructor(
      const GlobalObject&, ErrorResult&);
  static already_AddRefed<TestThrowingConstructorInterface> Constructor(
      const GlobalObject&, const nsAString&, ErrorResult&);
  static already_AddRefed<TestThrowingConstructorInterface> Constructor(
      const GlobalObject&, uint32_t, const Nullable<bool>&, ErrorResult&);
  static already_AddRefed<TestThrowingConstructorInterface> Constructor(
      const GlobalObject&, TestInterface*, ErrorResult&);
  static already_AddRefed<TestThrowingConstructorInterface> Constructor(
      const GlobalObject&, uint32_t, TestInterface&, ErrorResult&);

  static already_AddRefed<TestThrowingConstructorInterface> Constructor(
      const GlobalObject&, const ArrayBuffer&, ErrorResult&);
  static already_AddRefed<TestThrowingConstructorInterface> Constructor(
      const GlobalObject&, const Uint8Array&, ErrorResult&);
  /*  static
  already_AddRefed<TestThrowingConstructorInterface>
    Constructor(const GlobalObject&, uint32_t, uint32_t,
                const TestInterfaceOrOnlyForUseInConstructor&, ErrorResult&);
  */

  virtual nsISupports* GetParentObject();
};

class TestCEReactionsInterface : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject and GetDocGroup to make binding codegen happy
  virtual nsISupports* GetParentObject();
  DocGroup* GetDocGroup() const;

  int32_t Item(uint32_t);
  uint32_t Length() const;
  int32_t IndexedGetter(uint32_t, bool&);
  void IndexedSetter(uint32_t, int32_t);
  void NamedDeleter(const nsAString&, bool&);
  void NamedGetter(const nsAString&, bool&, nsString&);
  void NamedSetter(const nsAString&, const nsAString&);
  void GetSupportedNames(nsTArray<nsString>&);
};

class TestAttributesOnTypes : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS

  // We need a GetParentObject and GetDocGroup to make binding codegen happy
  virtual nsISupports* GetParentObject();

  void Foo(uint8_t arg);
  void Bar(uint8_t arg);
  void Baz(const nsAString& arg);
  uint8_t SomeAttr();
  void SetSomeAttr(uint8_t);
  void ArgWithAttr(uint8_t arg1, const Optional<uint8_t>& arg2);
};

class TestPrefConstructorForInterface : public nsISupports,
                                        public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  virtual nsISupports* GetParentObject();

  // Since only the constructor is under a pref,
  // the generated constructor should check for the pref.
  static already_AddRefed<TestPrefConstructorForInterface> Constructor(
      const GlobalObject&);
};

class TestConstructorForPrefInterface : public nsISupports,
                                        public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  virtual nsISupports* GetParentObject();

  // Since the interface itself is under a Pref, there should be no
  // check for the pref in the generated constructor.
  static already_AddRefed<TestConstructorForPrefInterface> Constructor(
      const GlobalObject&);
};

class TestPrefConstructorForDifferentPrefInterface : public nsISupports,
                                                     public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  virtual nsISupports* GetParentObject();

  // Since the constructor's pref is different than the interface pref
  // there should still be a check for the pref in the generated constructor.
  static already_AddRefed<TestPrefConstructorForDifferentPrefInterface>
  Constructor(const GlobalObject&);
};

class TestConstructorForSCInterface : public nsISupports,
                                      public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  virtual nsISupports* GetParentObject();

  // Since the interface itself is SecureContext, there should be no
  // check for SecureContext in the constructor.
  static already_AddRefed<TestConstructorForSCInterface> Constructor(
      const GlobalObject&);
};

class TestSCConstructorForInterface : public nsISupports,
                                      public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  virtual nsISupports* GetParentObject();

  // Since the interface context is unspecified but the constructor is
  // SecureContext, the generated constructor should check for SecureContext.
  static already_AddRefed<TestSCConstructorForInterface> Constructor(
      const GlobalObject&);
};

class TestConstructorForFuncInterface : public nsISupports,
                                        public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  virtual nsISupports* GetParentObject();

  // Since the interface has a Func attribute, but the constructor does not,
  // the generated constructor should not check for the Func.
  static already_AddRefed<TestConstructorForFuncInterface> Constructor(
      const GlobalObject&);
};

class TestFuncConstructorForInterface : public nsISupports,
                                        public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  virtual nsISupports* GetParentObject();

  // Since the constructor has a Func attribute, but the interface does not,
  // the generated constructor should check for the Func.
  static already_AddRefed<TestFuncConstructorForInterface> Constructor(
      const GlobalObject&);
};

class TestFuncConstructorForDifferentFuncInterface : public nsISupports,
                                                     public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  virtual nsISupports* GetParentObject();

  // Since the constructor has a different Func attribute from the interface,
  // the generated constructor should still check for its conditional func.
  static already_AddRefed<TestFuncConstructorForDifferentFuncInterface>
  Constructor(const GlobalObject&);
};

class TestPrefChromeOnlySCFuncConstructorForInterface : public nsISupports,
                                                        public nsWrapperCache {
 public:
  NS_DECL_ISUPPORTS
  virtual nsISupports* GetParentObject();

  // There should be checks for all Pref/ChromeOnly/SecureContext/Func
  // in the generated constructor.
  static already_AddRefed<TestPrefChromeOnlySCFuncConstructorForInterface>
  Constructor(const GlobalObject&);
};

}  // namespace dom
}  // namespace mozilla

#endif /* TestBindingHeader_h */