forked from servo/rust-mozjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjsapi.rs
1287 lines (750 loc) · 47.2 KB
/
jsapi.rs
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
/* automatically generated by rust-bindgen */
import libc::*;
type JSIntn = c_int;
type JSUintn = c_uint;
type JSBool = JSIntn;
type JSPackedBool = uint8_t;
type intN = JSIntn;
type uintN = JSUintn;
type jsid = ptrdiff_t;
type jsint = int32_t;
type jsuint = uint32_t;
type jsdouble = c_double;
type jsrefcount = int32_t;
type jschar = uint16_t;
type enum_JSVersion = c_int;
const JSVERSION_1_0: i32 = 100_i32;
const JSVERSION_1_1: i32 = 110_i32;
const JSVERSION_1_2: i32 = 120_i32;
const JSVERSION_1_3: i32 = 130_i32;
const JSVERSION_1_4: i32 = 140_i32;
const JSVERSION_ECMA_3: i32 = 148_i32;
const JSVERSION_1_5: i32 = 150_i32;
const JSVERSION_1_6: i32 = 160_i32;
const JSVERSION_1_7: i32 = 170_i32;
const JSVERSION_1_8: i32 = 180_i32;
const JSVERSION_ECMA_5: i32 = 185_i32;
const JSVERSION_DEFAULT: i32 = 0_i32;
const JSVERSION_UNKNOWN: i32 = -1_i32;
const JSVERSION_LATEST: i32 = 185_i32;
type JSVersion = enum_JSVersion;
type enum_JSType = c_uint;
const JSTYPE_VOID: u32 = 0_u32;
const JSTYPE_OBJECT: u32 = 1_u32;
const JSTYPE_FUNCTION: u32 = 2_u32;
const JSTYPE_STRING: u32 = 3_u32;
const JSTYPE_NUMBER: u32 = 4_u32;
const JSTYPE_BOOLEAN: u32 = 5_u32;
const JSTYPE_NULL: u32 = 6_u32;
const JSTYPE_XML: u32 = 7_u32;
const JSTYPE_LIMIT: u32 = 8_u32;
type JSType = enum_JSType;
type enum_JSProtoKey = c_uint;
const JSProto_Null: u32 = 0_u32;
const JSProto_Object: u32 = 1_u32;
const JSProto_Function: u32 = 2_u32;
const JSProto_Array: u32 = 3_u32;
const JSProto_Boolean: u32 = 4_u32;
const JSProto_JSON: u32 = 5_u32;
const JSProto_Date: u32 = 6_u32;
const JSProto_Math: u32 = 7_u32;
const JSProto_Number: u32 = 8_u32;
const JSProto_String: u32 = 9_u32;
const JSProto_RegExp: u32 = 10_u32;
const JSProto_XML: u32 = 11_u32;
const JSProto_Namespace: u32 = 12_u32;
const JSProto_QName: u32 = 13_u32;
const JSProto_Error: u32 = 14_u32;
const JSProto_InternalError: u32 = 15_u32;
const JSProto_EvalError: u32 = 16_u32;
const JSProto_RangeError: u32 = 17_u32;
const JSProto_ReferenceError: u32 = 18_u32;
const JSProto_SyntaxError: u32 = 19_u32;
const JSProto_TypeError: u32 = 20_u32;
const JSProto_URIError: u32 = 21_u32;
const JSProto_Iterator: u32 = 22_u32;
const JSProto_StopIteration: u32 = 23_u32;
const JSProto_ArrayBuffer: u32 = 24_u32;
const JSProto_Int8Array: u32 = 25_u32;
const JSProto_Uint8Array: u32 = 26_u32;
const JSProto_Int16Array: u32 = 27_u32;
const JSProto_Uint16Array: u32 = 28_u32;
const JSProto_Int32Array: u32 = 29_u32;
const JSProto_Uint32Array: u32 = 30_u32;
const JSProto_Float32Array: u32 = 31_u32;
const JSProto_Float64Array: u32 = 32_u32;
const JSProto_Uint8ClampedArray: u32 = 33_u32;
const JSProto_Proxy: u32 = 34_u32;
const JSProto_AnyName: u32 = 35_u32;
const JSProto_WeakMap: u32 = 36_u32;
const JSProto_Map: u32 = 37_u32;
const JSProto_Set: u32 = 38_u32;
const JSProto_LIMIT: u32 = 39_u32;
type JSProtoKey = enum_JSProtoKey;
type enum_JSAccessMode = c_uint;
const JSACC_PROTO: u32 = 0_u32;
const JSACC_PARENT: u32 = 1_u32;
const JSACC_WATCH: u32 = 3_u32;
const JSACC_READ: u32 = 4_u32;
const JSACC_WRITE: u32 = 8_u32;
const JSACC_LIMIT: u32 = 9_u32;
type JSAccessMode = enum_JSAccessMode;
type enum_JSIterateOp = c_uint;
const JSENUMERATE_INIT: u32 = 0_u32;
const JSENUMERATE_INIT_ALL: u32 = 1_u32;
const JSENUMERATE_NEXT: u32 = 2_u32;
const JSENUMERATE_DESTROY: u32 = 3_u32;
type JSIterateOp = enum_JSIterateOp;
type JSGCTraceKind = c_uint;
const JSTRACE_OBJECT: u32 = 0_u32;
const JSTRACE_STRING: u32 = 1_u32;
const JSTRACE_SCRIPT: u32 = 2_u32;
const JSTRACE_XML: u32 = 3_u32;
const JSTRACE_SHAPE: u32 = 4_u32;
const JSTRACE_BASE_SHAPE: u32 = 5_u32;
const JSTRACE_TYPE_OBJECT: u32 = 6_u32;
const JSTRACE_LAST: u32 = 6_u32;
type JSClass = struct_JSClass;
type struct_JSCompartment = c_void;
type JSCompartment = struct_JSCompartment;
type JSConstDoubleSpec = struct_JSConstDoubleSpec;
type struct_JSContext = c_void;
type JSContext = struct_JSContext;
type struct_JSCrossCompartmentCall = c_void;
type JSCrossCompartmentCall = struct_JSCrossCompartmentCall;
type JSErrorReport = struct_JSErrorReport;
type struct_JSExceptionState = c_void;
type JSExceptionState = struct_JSExceptionState;
type struct_JSFunction = c_void;
type JSFunction = struct_JSFunction;
type JSFunctionSpec = struct_JSFunctionSpec;
type struct_JSIdArray = c_void;
type JSIdArray = struct_JSIdArray;
type JSLocaleCallbacks = struct_JSLocaleCallbacks;
type struct_JSObject = c_void;
type JSObject = struct_JSObject;
type struct_JSObjectMap = c_void;
type JSObjectMap = struct_JSObjectMap;
type JSPrincipals = struct_JSPrincipals;
type JSPropertyDescriptor = struct_JSPropertyDescriptor;
type struct_JSPropertyName = c_void;
type JSPropertyName = struct_JSPropertyName;
type JSPropertySpec = struct_JSPropertySpec;
type struct_JSRuntime = c_void;
type JSRuntime = struct_JSRuntime;
type JSSecurityCallbacks = struct_JSSecurityCallbacks;
type struct_JSStackFrame = c_void;
type JSStackFrame = struct_JSStackFrame;
type struct_JSScript = c_void;
type JSScript = struct_JSScript;
type JSStructuredCloneCallbacks = struct_JSStructuredCloneCallbacks;
type struct_JSStructuredCloneReader = c_void;
type JSStructuredCloneReader = struct_JSStructuredCloneReader;
type struct_JSStructuredCloneWriter = c_void;
type JSStructuredCloneWriter = struct_JSStructuredCloneWriter;
type JSTracer = struct_JSTracer;
type struct_JSXDRState = c_void;
type JSXDRState = struct_JSXDRState;
type struct_JSFlatString = c_void;
type JSFlatString = struct_JSFlatString;
type struct_JSString = c_void;
type JSString = struct_JSString;
type JSCallOnceType = JSBool;
type JSInitCallback = *u8;
type JSMallocSizeOfFun = *u8;
type jsbitmap = size_t;
type JSValueType = uint8_t;
type JSValueTag = uint32_t;
type JSValueShiftedTag = uint64_t;
type enum_JSWhyMagic = c_uint;
const JS_ARRAY_HOLE: u32 = 0_u32;
const JS_ARGS_HOLE: u32 = 1_u32;
const JS_NATIVE_ENUMERATE: u32 = 2_u32;
const JS_NO_ITER_VALUE: u32 = 3_u32;
const JS_GENERATOR_CLOSING: u32 = 4_u32;
const JS_NO_CONSTANT: u32 = 5_u32;
const JS_THIS_POISON: u32 = 6_u32;
const JS_ARG_POISON: u32 = 7_u32;
const JS_SERIALIZE_NO_NODE: u32 = 8_u32;
const JS_LAZY_ARGUMENTS: u32 = 9_u32;
const JS_IS_CONSTRUCTING: u32 = 10_u32;
const JS_GENERIC_MAGIC: u32 = 11_u32;
type JSWhyMagic = enum_JSWhyMagic;
type union_jsval_layout = u64; // NDM--hand edited
type jsval_layout = union_jsval_layout;
type moz_static_assert0 = c_int;
type jsval = union_jsval_layout;
type moz_static_assert1 = c_int;
type JSPropertyOp = *u8;
type JSStrictPropertyOp = *u8;
type JSNewEnumerateOp = *u8;
type JSEnumerateOp = *u8;
type JSResolveOp = *u8;
type JSNewResolveOp = *u8;
type JSConvertOp = *u8;
type JSTypeOfOp = *u8;
type JSFinalizeOp = *u8;
type JSStringFinalizeOp = *u8;
type JSCheckAccessOp = *u8;
type JSXDRObjectOp = *u8;
type JSHasInstanceOp = *u8;
type JSTraceOp = *u8;
type JSTraceNamePrinter = *u8;
type JSEqualityOp = *u8;
type JSNative = *u8;
type enum_JSContextOp = c_uint;
const JSCONTEXT_NEW: u32 = 0_u32;
const JSCONTEXT_DESTROY: u32 = 1_u32;
type JSContextOp = enum_JSContextOp;
type JSContextCallback = *u8;
type enum_JSGCStatus = c_uint;
const JSGC_BEGIN: u32 = 0_u32;
const JSGC_END: u32 = 1_u32;
const JSGC_MARK_END: u32 = 2_u32;
const JSGC_FINALIZE_END: u32 = 3_u32;
type JSGCStatus = enum_JSGCStatus;
type JSGCCallback = *u8;
type JSTraceDataOp = *u8;
type JSOperationCallback = *u8;
type JSErrorReporter = *u8;
type enum_JSExnType = c_int;
const JSEXN_NONE: i32 = -1_i32;
const JSEXN_ERR: i32 = 0_i32;
const JSEXN_INTERNALERR: i32 = 1_i32;
const JSEXN_EVALERR: i32 = 2_i32;
const JSEXN_RANGEERR: i32 = 3_i32;
const JSEXN_REFERENCEERR: i32 = 4_i32;
const JSEXN_SYNTAXERR: i32 = 5_i32;
const JSEXN_TYPEERR: i32 = 6_i32;
const JSEXN_URIERR: i32 = 7_i32;
const JSEXN_LIMIT: i32 = 8_i32;
type JSExnType = enum_JSExnType;
type struct_JSErrorFormatString = {
format: *c_char,
argCount: uint16_t,
exnType: int16_t,
};
type JSErrorFormatString = struct_JSErrorFormatString;
type JSErrorCallback = *u8;
type JSLocaleToUpperCase = *u8;
type JSLocaleToLowerCase = *u8;
type JSLocaleCompare = *u8;
type JSLocaleToUnicode = *u8;
type JSPrincipalsTranscoder = *u8;
type JSObjectPrincipalsFinder = *u8;
type JSCSPEvalChecker = *u8;
type JSWrapObjectCallback = *u8;
type JSPreWrapCallback = *u8;
type JSCompartmentOp = c_uint;
const JSCOMPARTMENT_DESTROY: u32 = 0_u32;
type JSCompartmentCallback = *u8;
type ReadStructuredCloneOp = *u8;
type WriteStructuredCloneOp = *u8;
type StructuredCloneErrorOp = *u8;
/* FIXME: global variable JSVAL_NULL */
/* FIXME: global variable JSVAL_ZERO */
/* FIXME: global variable JSVAL_ONE */
/* FIXME: global variable JSVAL_FALSE */
/* FIXME: global variable JSVAL_TRUE */
/* FIXME: global variable JSVAL_VOID */
type JSEnumerateDiagnosticMemoryCallback = *u8;
type enum_JSGCRootType = c_uint;
const JS_GC_ROOT_VALUE_PTR: u32 = 0_u32;
const JS_GC_ROOT_GCTHING_PTR: u32 = 1_u32;
type JSGCRootType = enum_JSGCRootType;
type JSGCRootMapFun = *u8;
type JSTraceCallback = *u8;
type struct_JSTracer = {
runtime: *JSRuntime,
context: *JSContext,
callback: JSTraceCallback,
debugPrinter: JSTraceNamePrinter,
debugPrintArg: *c_void,
debugPrintIndex: size_t,
eagerlyTraceWeakMaps: JSBool,
};
type enum_JSGCParamKey = c_uint;
const JSGC_MAX_BYTES: u32 = 0_u32;
const JSGC_MAX_MALLOC_BYTES: u32 = 1_u32;
const JSGC_BYTES: u32 = 3_u32;
const JSGC_NUMBER: u32 = 4_u32;
const JSGC_MAX_CODE_CACHE_BYTES: u32 = 5_u32;
const JSGC_MODE: u32 = 6_u32;
const JSGC_UNUSED_CHUNKS: u32 = 7_u32;
const JSGC_TOTAL_CHUNKS: u32 = 8_u32;
type JSGCParamKey = enum_JSGCParamKey;
type enum_JSGCMode = c_uint;
const JSGC_MODE_GLOBAL: u32 = 0_u32;
const JSGC_MODE_COMPARTMENT: u32 = 1_u32;
type JSGCMode = enum_JSGCMode;
type JSClassInternal = *u8;
type struct_JSClass = {
name: *c_char,
flags: uint32_t,
addProperty: JSPropertyOp,
delProperty: JSPropertyOp,
getProperty: JSPropertyOp,
setProperty: JSStrictPropertyOp,
enumerate: JSEnumerateOp,
resolve: JSResolveOp,
convert: JSConvertOp,
finalize: JSFinalizeOp,
reserved0: JSClassInternal,
checkAccess: JSCheckAccessOp,
call: JSNative,
construct: JSNative,
xdrObject: JSXDRObjectOp,
hasInstance: JSHasInstanceOp,
trace: JSTraceOp,
reserved1: JSClassInternal,
reserved: (*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void),
};
type struct_JSConstDoubleSpec = {
dval: jsdouble,
name: *c_char,
flags: uint8_t,
spare: (uint8_t,uint8_t,uint8_t),
};
type struct_JSPropertySpec = {
name: *c_char,
tinyid: int8_t,
flags: uint8_t,
getter: JSPropertyOp,
setter: JSStrictPropertyOp,
};
type struct_JSFunctionSpec = {
name: *c_char,
call: JSNative,
nargs: uint16_t,
flags: uint16_t,
};
type struct_JSPropertyDescriptor = {
obj: *JSObject,
attrs: uintN,
getter: JSPropertyOp,
setter: JSStrictPropertyOp,
value: jsval,
shortid: uintN,
};
type struct_JSPrincipals = {
codebase: *c_char,
refcount: jsrefcount,
destroy: *u8,
subsume: *u8,
};
type struct_JSSecurityCallbacks = {
checkObjectAccess: JSCheckAccessOp,
principalsTranscoder: JSPrincipalsTranscoder,
findObjectPrincipals: JSObjectPrincipalsFinder,
contentSecurityPolicyAllows: JSCSPEvalChecker,
};
type enum_JSExecPart = c_uint;
const JSEXEC_PROLOG: u32 = 0_u32;
const JSEXEC_MAIN: u32 = 1_u32;
type JSExecPart = enum_JSExecPart;
type JSONWriteCallback = *u8;
type struct_JSStructuredCloneCallbacks = {
read: ReadStructuredCloneOp,
write: WriteStructuredCloneOp,
reportError: StructuredCloneErrorOp,
};
type struct_JSLocaleCallbacks = {
localeToUpperCase: JSLocaleToUpperCase,
localeToLowerCase: JSLocaleToLowerCase,
localeCompare: JSLocaleCompare,
localeToUnicode: JSLocaleToUnicode,
localeGetErrorMessage: JSErrorCallback,
};
type struct_JSErrorReport = {
filename: *c_char,
originPrincipals: *JSPrincipals,
lineno: uintN,
linebuf: *c_char,
tokenptr: *c_char,
uclinebuf: *jschar,
uctokenptr: *jschar,
flags: uintN,
errorNumber: uintN,
ucmessage: *jschar,
messageArgs: **jschar,
};
type struct_unnamed1 = {
payload: union_unnamed2,
};
type union_unnamed2 = c_void /* FIXME: union type */;
#[nolink]
native mod bindgen {
fn JS_StringHasBeenInterned(++arg0: *JSContext, ++arg1: *JSString) -> JSBool;
fn JS_CallOnce(++arg0: *JSCallOnceType, ++arg1: JSInitCallback) -> JSBool;
fn JS_Now() -> int64_t;
fn JS_GetNaNValue(++arg0: *JSContext) -> jsval;
fn JS_GetNegativeInfinityValue(++arg0: *JSContext) -> jsval;
fn JS_GetPositiveInfinityValue(++arg0: *JSContext) -> jsval;
fn JS_GetEmptyStringValue(++arg0: *JSContext) -> jsval;
fn JS_GetEmptyString(++arg0: *JSRuntime) -> *JSString;
fn JS_ConvertArguments(++arg0: *JSContext, ++arg1: uintN, ++arg2: *jsval, ++arg3: *c_char/* FIXME: variadic arguments */) -> JSBool;
fn JS_ConvertValue(++arg0: *JSContext, ++arg1: jsval, ++arg2: JSType, ++arg3: *jsval) -> JSBool;
fn JS_ValueToObject(++arg0: *JSContext, ++arg1: jsval, ++arg2: **JSObject) -> JSBool;
fn JS_ValueToFunction(++arg0: *JSContext, ++arg1: jsval) -> *JSFunction;
fn JS_ValueToConstructor(++arg0: *JSContext, ++arg1: jsval) -> *JSFunction;
fn JS_ValueToString(++arg0: *JSContext, ++arg1: jsval) -> *JSString;
fn JS_ValueToSource(++arg0: *JSContext, ++arg1: jsval) -> *JSString;
fn JS_ValueToNumber(++arg0: *JSContext, ++arg1: jsval, ++arg2: *jsdouble) -> JSBool;
fn JS_DoubleIsInt32(++arg0: jsdouble, ++arg1: *jsint) -> JSBool;
fn JS_DoubleToInt32(++arg0: jsdouble) -> int32_t;
fn JS_DoubleToUint32(++arg0: jsdouble) -> uint32_t;
fn JS_ValueToECMAInt32(++arg0: *JSContext, ++arg1: jsval, ++arg2: *int32_t) -> JSBool;
fn JS_ValueToECMAUint32(++arg0: *JSContext, ++arg1: jsval, ++arg2: *uint32_t) -> JSBool;
fn JS_ValueToInt32(++arg0: *JSContext, ++arg1: jsval, ++arg2: *int32_t) -> JSBool;
fn JS_ValueToUint16(++arg0: *JSContext, ++arg1: jsval, ++arg2: *uint16_t) -> JSBool;
fn JS_ValueToBoolean(++arg0: *JSContext, ++arg1: jsval, ++arg2: *JSBool) -> JSBool;
fn JS_TypeOfValue(++arg0: *JSContext, ++arg1: jsval) -> JSType;
fn JS_GetTypeName(++arg0: *JSContext, ++arg1: JSType) -> *c_char;
fn JS_StrictlyEqual(++arg0: *JSContext, ++arg1: jsval, ++arg2: jsval, ++arg3: *JSBool) -> JSBool;
fn JS_LooselyEqual(++arg0: *JSContext, ++arg1: jsval, ++arg2: jsval, ++arg3: *JSBool) -> JSBool;
fn JS_SameValue(++arg0: *JSContext, ++arg1: jsval, ++arg2: jsval, ++arg3: *JSBool) -> JSBool;
fn JS_IsBuiltinEvalFunction(++arg0: *JSFunction) -> JSBool;
fn JS_IsBuiltinFunctionConstructor(++arg0: *JSFunction) -> JSBool;
fn JS_Init(++arg0: uint32_t) -> *JSRuntime;
fn JS_Finish(++arg0: *JSRuntime);
fn JS_ShutDown();
fn JS_GetRuntimePrivate(++arg0: *JSRuntime) -> *c_void;
fn JS_GetRuntime(++arg0: *JSContext) -> *JSRuntime;
fn JS_SetRuntimePrivate(++arg0: *JSRuntime, ++arg1: *c_void);
fn JS_BeginRequest(++arg0: *JSContext);
fn JS_EndRequest(++arg0: *JSContext);
fn JS_YieldRequest(++arg0: *JSContext);
fn JS_SuspendRequest(++arg0: *JSContext) -> jsrefcount;
fn JS_ResumeRequest(++arg0: *JSContext, ++arg1: jsrefcount);
fn JS_IsInRequest(++arg0: *JSRuntime) -> JSBool;
fn JS_IsInSuspendedRequest(++arg0: *JSRuntime) -> JSBool;
fn JS_SetContextCallback(++arg0: *JSRuntime, ++arg1: JSContextCallback) -> JSContextCallback;
fn JS_NewContext(++arg0: *JSRuntime, ++arg1: size_t) -> *JSContext;
fn JS_DestroyContext(++arg0: *JSContext);
fn JS_DestroyContextNoGC(++arg0: *JSContext);
fn JS_GetContextPrivate(++arg0: *JSContext) -> *c_void;
fn JS_SetContextPrivate(++arg0: *JSContext, ++arg1: *c_void);
fn JS_GetSecondContextPrivate(++arg0: *JSContext) -> *c_void;
fn JS_SetSecondContextPrivate(++arg0: *JSContext, ++arg1: *c_void);
fn JS_ContextIterator(++arg0: *JSRuntime, ++arg1: **JSContext) -> *JSContext;
fn JS_GetVersion(++arg0: *JSContext) -> JSVersion;
fn JS_SetVersion(++arg0: *JSContext, ++arg1: JSVersion) -> JSVersion;
fn JS_VersionToString(++arg0: JSVersion) -> *c_char;
fn JS_StringToVersion(++arg0: *c_char) -> JSVersion;
fn JS_GetOptions(++arg0: *JSContext) -> uint32_t;
fn JS_SetOptions(++arg0: *JSContext, ++arg1: uint32_t) -> uint32_t;
fn JS_ToggleOptions(++arg0: *JSContext, ++arg1: uint32_t) -> uint32_t;
fn JS_GetImplementationVersion() -> *c_char;
fn JS_SetWrapObjectCallbacks(++arg0: *JSRuntime, ++arg1: JSWrapObjectCallback, ++arg2: JSPreWrapCallback) -> JSWrapObjectCallback;
fn JS_EnterCrossCompartmentCall(++arg0: *JSContext, ++arg1: *JSObject) -> *JSCrossCompartmentCall;
fn JS_LeaveCrossCompartmentCall(++arg0: *JSCrossCompartmentCall);
fn JS_SetCompartmentPrivate(++arg0: *JSContext, ++arg1: *JSCompartment, ++arg2: *c_void) -> *c_void;
fn JS_WrapObject(++arg0: *JSContext, ++arg1: **JSObject) -> JSBool;
fn JS_WrapValue(++arg0: *JSContext, ++arg1: *jsval) -> JSBool;
fn JS_TransplantObject(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject) -> *JSObject;
fn js_TransplantObjectWithWrapper(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject, ++arg3: *JSObject, ++arg4: *JSObject) -> *JSObject;
fn JS_GetGlobalObject(++arg0: *JSContext) -> *JSObject;
fn JS_SetGlobalObject(++arg0: *JSContext, ++arg1: *JSObject);
fn JS_InitStandardClasses(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_ResolveStandardClass(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *JSBool) -> JSBool;
fn JS_EnumerateStandardClasses(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_EnumerateResolvedStandardClasses(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSIdArray) -> *JSIdArray;
fn JS_GetClassObject(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: JSProtoKey, ++arg3: **JSObject) -> JSBool;
fn JS_GetGlobalForObject(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_GetGlobalForScopeChain(++arg0: *JSContext) -> *JSObject;
fn JS_InitReflect(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_EnumerateDiagnosticMemoryRegions(++arg0: JSEnumerateDiagnosticMemoryCallback);
fn JS_ComputeThis(++arg0: *JSContext, ++arg1: *jsval) -> jsval;
fn JS_malloc(++arg0: *JSContext, ++arg1: size_t) -> *c_void;
fn JS_realloc(++arg0: *JSContext, ++arg1: *c_void, ++arg2: size_t) -> *c_void;
fn JS_free(++arg0: *JSContext, ++arg1: *c_void);
fn JS_updateMallocCounter(++arg0: *JSContext, ++arg1: size_t);
fn JS_strdup(++arg0: *JSContext, ++arg1: *c_char) -> *c_char;
fn JS_NewNumberValue(++arg0: *JSContext, ++arg1: jsdouble, ++arg2: *jsval) -> JSBool;
fn JS_AddValueRoot(++arg0: *JSContext, ++arg1: *jsval) -> JSBool;
fn JS_AddStringRoot(++arg0: *JSContext, ++arg1: **JSString) -> JSBool;
fn JS_AddObjectRoot(++arg0: *JSContext, ++arg1: **JSObject) -> JSBool;
fn JS_AddGCThingRoot(++arg0: *JSContext, ++arg1: **c_void) -> JSBool;
fn JS_AddNamedValueRoot(++arg0: *JSContext, ++arg1: *jsval, ++arg2: *c_char) -> JSBool;
fn JS_AddNamedStringRoot(++arg0: *JSContext, ++arg1: **JSString, ++arg2: *c_char) -> JSBool;
fn JS_AddNamedObjectRoot(++arg0: *JSContext, ++arg1: **JSObject, ++arg2: *c_char) -> JSBool;
fn JS_AddNamedScriptRoot(++arg0: *JSContext, ++arg1: **JSScript, ++arg2: *c_char) -> JSBool;
fn JS_AddNamedGCThingRoot(++arg0: *JSContext, ++arg1: **c_void, ++arg2: *c_char) -> JSBool;
fn JS_RemoveValueRoot(++arg0: *JSContext, ++arg1: *jsval) -> JSBool;
fn JS_RemoveStringRoot(++arg0: *JSContext, ++arg1: **JSString) -> JSBool;
fn JS_RemoveObjectRoot(++arg0: *JSContext, ++arg1: **JSObject) -> JSBool;
fn JS_RemoveScriptRoot(++arg0: *JSContext, ++arg1: **JSScript) -> JSBool;
fn JS_RemoveGCThingRoot(++arg0: *JSContext, ++arg1: **c_void) -> JSBool;
fn js_AddRootRT(++arg0: *JSRuntime, ++arg1: *jsval, ++arg2: *c_char) -> JSBool;
fn js_AddGCThingRootRT(++arg0: *JSRuntime, ++arg1: **c_void, ++arg2: *c_char) -> JSBool;
fn js_RemoveRoot(++arg0: *JSRuntime, ++arg1: *c_void) -> JSBool;
fn JS_AnchorPtr(++arg0: *c_void);
fn JS_MapGCRoots(++arg0: *JSRuntime, ++arg1: JSGCRootMapFun, ++arg2: *c_void) -> uint32_t;
fn JS_LockGCThing(++arg0: *JSContext, ++arg1: *c_void) -> JSBool;
fn JS_LockGCThingRT(++arg0: *JSRuntime, ++arg1: *c_void) -> JSBool;
fn JS_UnlockGCThing(++arg0: *JSContext, ++arg1: *c_void) -> JSBool;
fn JS_UnlockGCThingRT(++arg0: *JSRuntime, ++arg1: *c_void) -> JSBool;
fn JS_SetExtraGCRootsTracer(++arg0: *JSRuntime, ++arg1: JSTraceDataOp, ++arg2: *c_void);
fn JS_CallTracer(++arg0: *JSTracer, ++arg1: *c_void, ++arg2: JSGCTraceKind);
fn JS_TracerInit(++arg0: *JSTracer, ++arg1: *JSContext, ++arg2: JSTraceCallback);
fn JS_TraceChildren(++arg0: *JSTracer, ++arg1: *c_void, ++arg2: JSGCTraceKind);
fn JS_TraceRuntime(++arg0: *JSTracer);
fn JS_GC(++arg0: *JSContext);
fn JS_MaybeGC(++arg0: *JSContext);
fn JS_SetGCCallback(++arg0: *JSContext, ++arg1: JSGCCallback) -> JSGCCallback;
fn JS_IsGCMarkingTracer(++arg0: *JSTracer) -> JSBool;
fn JS_IsAboutToBeFinalized(++arg0: *JSContext, ++arg1: *c_void) -> JSBool;
fn JS_SetGCParameter(++arg0: *JSRuntime, ++arg1: JSGCParamKey, ++arg2: uint32_t);
fn JS_GetGCParameter(++arg0: *JSRuntime, ++arg1: JSGCParamKey) -> uint32_t;
fn JS_SetGCParameterForThread(++arg0: *JSContext, ++arg1: JSGCParamKey, ++arg2: uint32_t);
fn JS_GetGCParameterForThread(++arg0: *JSContext, ++arg1: JSGCParamKey) -> uint32_t;
fn JS_NewExternalString(++arg0: *JSContext, ++arg1: *jschar, ++arg2: size_t, ++arg3: intN) -> *JSString;
fn JS_IsExternalString(++arg0: *JSContext, ++arg1: *JSString) -> JSBool;
fn JS_SetNativeStackQuota(++arg0: *JSContext, ++arg1: size_t);
fn JS_IdArrayLength(++arg0: *JSContext, ++arg1: *JSIdArray) -> jsint;
fn JS_IdArrayGet(++arg0: *JSContext, ++arg1: *JSIdArray, ++arg2: jsint) -> jsid;
fn JS_DestroyIdArray(++arg0: *JSContext, ++arg1: *JSIdArray);
fn JS_ValueToId(++arg0: *JSContext, ++arg1: jsval, ++arg2: *jsid) -> JSBool;
fn JS_IdToValue(++arg0: *JSContext, ++arg1: jsid, ++arg2: *jsval) -> JSBool;
fn JS_DefaultValue(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: JSType, ++arg3: *jsval) -> JSBool;
fn JS_PropertyStub(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_StrictPropertyStub(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: JSBool, ++arg4: *jsval) -> JSBool;
fn JS_EnumerateStub(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_ResolveStub(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid) -> JSBool;
fn JS_ConvertStub(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: JSType, ++arg3: *jsval) -> JSBool;
fn JS_InitClass(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject, ++arg3: *JSClass, ++arg4: JSNative, ++arg5: uintN, ++arg6: *JSPropertySpec, ++arg7: *JSFunctionSpec, ++arg8: *JSPropertySpec, ++arg9: *JSFunctionSpec) -> *JSObject;
fn JS_GetClass(++arg0: *JSObject) -> *JSClass;
fn JS_InstanceOf(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSClass, ++arg3: *jsval) -> JSBool;
fn JS_HasInstance(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsval, ++arg3: *JSBool) -> JSBool;
fn JS_GetPrivate(++arg0: *JSContext, ++arg1: *JSObject) -> *c_void;
fn JS_SetPrivate(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_void) -> JSBool;
fn JS_GetInstancePrivate(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSClass, ++arg3: *jsval) -> *c_void;
fn JS_GetPrototype(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_SetPrototype(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject) -> JSBool;
fn JS_GetParent(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_SetParent(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject) -> JSBool;
fn JS_GetConstructor(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_GetObjectId(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jsid) -> JSBool;
fn JS_NewGlobalObject(++arg0: *JSContext, ++arg1: *JSClass) -> *JSObject;
fn JS_NewCompartmentAndGlobalObject(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSPrincipals) -> *JSObject;
fn JS_NewObject(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSObject, ++arg3: *JSObject) -> *JSObject;
fn JS_IsExtensible(++arg0: *JSObject) -> JSBool;
fn JS_IsNative(++arg0: *JSObject) -> JSBool;
fn JS_NewObjectWithGivenProto(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSObject, ++arg3: *JSObject) -> *JSObject;
fn JS_DeepFreezeObject(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_FreezeObject(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_ConstructObject(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSObject) -> *JSObject;
fn JS_ConstructObjectWithArguments(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSObject, ++arg3: uintN, ++arg4: *jsval) -> *JSObject;
fn JS_New(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uintN, ++arg3: *jsval) -> *JSObject;
fn JS_DefineObject(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *JSClass, ++arg4: *JSObject, ++arg5: uintN) -> *JSObject;
fn JS_DefineConstDoubles(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSConstDoubleSpec) -> JSBool;
fn JS_DefineProperties(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPropertySpec) -> JSBool;
fn JS_DefineProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: jsval, ++arg4: JSPropertyOp, ++arg5: JSStrictPropertyOp, ++arg6: uintN) -> JSBool;
fn JS_DefinePropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: jsval, ++arg4: JSPropertyOp, ++arg5: JSStrictPropertyOp, ++arg6: uintN) -> JSBool;
fn JS_DefineOwnProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: jsval, ++arg4: *JSBool) -> JSBool;
fn JS_GetPropertyAttributes(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *uintN, ++arg4: *JSBool) -> JSBool;
fn JS_GetPropertyAttrsGetterAndSetter(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *uintN, ++arg4: *JSBool, ++arg5: *JSPropertyOp, ++arg6: *JSStrictPropertyOp) -> JSBool;
fn JS_GetPropertyAttrsGetterAndSetterById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *uintN, ++arg4: *JSBool, ++arg5: *JSPropertyOp, ++arg6: *JSStrictPropertyOp) -> JSBool;
fn JS_SetPropertyAttributes(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: uintN, ++arg4: *JSBool) -> JSBool;
fn JS_DefinePropertyWithTinyId(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: int8_t, ++arg4: jsval, ++arg5: JSPropertyOp, ++arg6: JSStrictPropertyOp, ++arg7: uintN) -> JSBool;
fn JS_AlreadyHasOwnProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *JSBool) -> JSBool;
fn JS_AlreadyHasOwnPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *JSBool) -> JSBool;
fn JS_HasProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *JSBool) -> JSBool;
fn JS_HasPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *JSBool) -> JSBool;
fn JS_LookupProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *jsval) -> JSBool;
fn JS_LookupPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_LookupPropertyWithFlags(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: uintN, ++arg4: *jsval) -> JSBool;
fn JS_LookupPropertyWithFlagsById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: uintN, ++arg4: **JSObject, ++arg5: *jsval) -> JSBool;
fn JS_GetPropertyDescriptorById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: uintN, ++arg4: *JSPropertyDescriptor) -> JSBool;
fn JS_GetOwnPropertyDescriptor(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_GetProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *jsval) -> JSBool;
fn JS_GetPropertyDefault(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: jsval, ++arg4: *jsval) -> JSBool;
fn JS_GetPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_GetPropertyByIdDefault(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: jsval, ++arg4: *jsval) -> JSBool;
fn JS_ForwardGetPropertyTo(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *JSObject, ++arg4: *jsval) -> JSBool;
fn JS_GetMethodById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: **JSObject, ++arg4: *jsval) -> JSBool;
fn JS_GetMethod(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: **JSObject, ++arg4: *jsval) -> JSBool;
fn JS_SetProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *jsval) -> JSBool;
fn JS_SetPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_DeleteProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char) -> JSBool;
fn JS_DeleteProperty2(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *jsval) -> JSBool;
fn JS_DeletePropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid) -> JSBool;
fn JS_DeletePropertyById2(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_DefineUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: jsval, ++arg5: JSPropertyOp, ++arg6: JSStrictPropertyOp, ++arg7: uintN) -> JSBool;
fn JS_GetUCPropertyAttributes(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *uintN, ++arg5: *JSBool) -> JSBool;
fn JS_GetUCPropertyAttrsGetterAndSetter(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *uintN, ++arg5: *JSBool, ++arg6: *JSPropertyOp, ++arg7: *JSStrictPropertyOp) -> JSBool;
fn JS_SetUCPropertyAttributes(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: uintN, ++arg5: *JSBool) -> JSBool;
fn JS_DefineUCPropertyWithTinyId(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: int8_t, ++arg5: jsval, ++arg6: JSPropertyOp, ++arg7: JSStrictPropertyOp, ++arg8: uintN) -> JSBool;
fn JS_AlreadyHasOwnUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *JSBool) -> JSBool;
fn JS_HasUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *JSBool) -> JSBool;
fn JS_LookupUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *jsval) -> JSBool;
fn JS_GetUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *jsval) -> JSBool;
fn JS_SetUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *jsval) -> JSBool;
fn JS_DeleteUCProperty2(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *jsval) -> JSBool;
fn JS_NewArrayObject(++arg0: *JSContext, ++arg1: jsint, ++arg2: *jsval) -> *JSObject;
fn JS_IsArrayObject(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_GetArrayLength(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jsuint) -> JSBool;
fn JS_SetArrayLength(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsuint) -> JSBool;
fn JS_DefineElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: jsval, ++arg4: JSPropertyOp, ++arg5: JSStrictPropertyOp, ++arg6: uintN) -> JSBool;
fn JS_AlreadyHasOwnElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *JSBool) -> JSBool;
fn JS_HasElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *JSBool) -> JSBool;
fn JS_LookupElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_GetElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_ForwardGetElementTo(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *JSObject, ++arg4: *jsval) -> JSBool;
fn JS_GetElementIfPresent(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *JSObject, ++arg4: *jsval, ++arg5: *JSBool) -> JSBool;
fn JS_SetElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_DeleteElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t) -> JSBool;
fn JS_DeleteElement2(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_ClearScope(++arg0: *JSContext, ++arg1: *JSObject);
fn JS_Enumerate(++arg0: *JSContext, ++arg1: *JSObject) -> *JSIdArray;
fn JS_NewPropertyIterator(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_NextProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jsid) -> JSBool;
fn JS_CheckAccess(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: JSAccessMode, ++arg4: *jsval, ++arg5: *uintN) -> JSBool;
fn JS_GetReservedSlot(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_SetReservedSlot(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: jsval) -> JSBool;
fn JS_GetSecurityCallbacks(++arg0: *JSContext) -> *JSSecurityCallbacks;
fn JS_SetTrustedPrincipals(++arg0: *JSRuntime, ++arg1: *JSPrincipals);