Skip to content

Instantly share code, notes, and snippets.

@michaelwu
Last active September 18, 2015 22:13
Show Gist options
  • Save michaelwu/1040fa8f592ad020f893 to your computer and use it in GitHub Desktop.
Save michaelwu/1040fa8f592ad020f893 to your computer and use it in GitHub Desktop.
jsapi.rs (09/18/2015)
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(raw_pointer_derive)]
#![feature(const_fn)]
#![feature(libc)]
extern crate libc;
use libc::{size_t, intptr_t, uintptr_t, ptrdiff_t, FILE};
use std::marker::PhantomData;
pub enum va_list { }
pub enum JSPrincipals { }
#[derive(Copy, Clone)]
pub enum VectorImpl { }
#[derive(Copy, Clone)]
pub enum HashMapImpl { }
#[derive(Copy, Clone)]
pub enum HashSetImpl { }
#[derive(Copy, Clone)]
pub struct DebugOnly<T> {
#[cfg(debugmozjs)]
value: T,
#[cfg(not(debugmozjs))]
value: PhantomData<T>,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum Override {
Default = 0,
ForceTrue = 1,
ForceFalse = 2,
}
/* automatically generated by rust-bindgen */
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RangedPtr<T> {
pub mPtr: *mut T,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Range<T> {
pub mStart: RangedPtr<T>,
pub mEnd: RangedPtr<T>,
}
pub enum JSContext { }
pub enum JSFunction { }
pub enum JSObject { }
pub enum JSScript { }
pub enum JSString { }
pub enum JSAddonId { }
pub type Latin1Char = u8;
pub enum Symbol { }
pub type HandleFunction = Handle<*mut JSFunction>;
pub type HandleId = Handle<jsid>;
pub type HandleObject = Handle<*mut JSObject>;
pub type HandleScript = Handle<*mut JSScript>;
pub type HandleString = Handle<*mut JSString>;
pub type HandleSymbol = Handle<*mut Symbol>;
pub type HandleValue = Handle<Value>;
pub type MutableHandleFunction = MutableHandle<*mut JSFunction>;
pub type MutableHandleId = MutableHandle<jsid>;
pub type MutableHandleObject = MutableHandle<*mut JSObject>;
pub type MutableHandleScript = MutableHandle<*mut JSScript>;
pub type MutableHandleString = MutableHandle<*mut JSString>;
pub type MutableHandleSymbol = MutableHandle<*mut Symbol>;
pub type MutableHandleValue = MutableHandle<Value>;
pub type RootedObject = Rooted<*mut JSObject>;
pub type RootedFunction = Rooted<*mut JSFunction>;
pub type RootedScript = Rooted<*mut JSScript>;
pub type RootedString = Rooted<*mut JSString>;
pub type RootedSymbol = Rooted<*mut Symbol>;
pub type RootedId = Rooted<jsid>;
pub type RootedValue = Rooted<Value>;
pub type PersistentRootedFunction = PersistentRooted<*mut JSFunction>;
pub type PersistentRootedId = PersistentRooted<jsid>;
pub type PersistentRootedObject = PersistentRooted<*mut JSObject>;
pub type PersistentRootedScript = PersistentRooted<*mut JSScript>;
pub type PersistentRootedString = PersistentRooted<*mut JSString>;
pub type PersistentRootedSymbol = PersistentRooted<*mut Symbol>;
pub type PersistentRootedValue = PersistentRooted<Value>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct LinkedListElement<T> {
pub mNext: *mut LinkedListElement<T>,
pub mPrev: *mut LinkedListElement<T>,
pub mIsSentinel: bool,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct LinkedList<T> {
pub sentinel: LinkedListElement<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoCleanLinkedList<T> {
pub _base: LinkedList<T>,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSVersion {
JSVERSION_ECMA_3 = 148,
JSVERSION_1_6 = 160,
JSVERSION_1_7 = 170,
JSVERSION_1_8 = 180,
JSVERSION_ECMA_5 = 185,
JSVERSION_DEFAULT = 0,
JSVERSION_UNKNOWN = -1,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSType {
JSTYPE_VOID = 0,
JSTYPE_OBJECT = 1,
JSTYPE_FUNCTION = 2,
JSTYPE_STRING = 3,
JSTYPE_NUMBER = 4,
JSTYPE_BOOLEAN = 5,
JSTYPE_NULL = 6,
JSTYPE_SYMBOL = 7,
JSTYPE_LIMIT = 8,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSProtoKey {
JSProto_Null = 0,
JSProto_Object = 1,
JSProto_Function = 2,
JSProto_Array = 3,
JSProto_Boolean = 4,
JSProto_JSON = 5,
JSProto_Date = 6,
JSProto_Math = 7,
JSProto_Number = 8,
JSProto_String = 9,
JSProto_RegExp = 10,
JSProto_Error = 11,
JSProto_InternalError = 12,
JSProto_EvalError = 13,
JSProto_RangeError = 14,
JSProto_ReferenceError = 15,
JSProto_SyntaxError = 16,
JSProto_TypeError = 17,
JSProto_URIError = 18,
JSProto_Iterator = 19,
JSProto_StopIteration = 20,
JSProto_ArrayBuffer = 21,
JSProto_Int8Array = 22,
JSProto_Uint8Array = 23,
JSProto_Int16Array = 24,
JSProto_Uint16Array = 25,
JSProto_Int32Array = 26,
JSProto_Uint32Array = 27,
JSProto_Float32Array = 28,
JSProto_Float64Array = 29,
JSProto_Uint8ClampedArray = 30,
JSProto_Proxy = 31,
JSProto_WeakMap = 32,
JSProto_Map = 33,
JSProto_Set = 34,
JSProto_DataView = 35,
JSProto_Symbol = 36,
JSProto_SharedArrayBuffer = 37,
JSProto_Intl = 38,
JSProto_TypedObject = 39,
JSProto_GeneratorFunction = 40,
JSProto_SIMD = 41,
JSProto_WeakSet = 42,
JSProto_SharedInt8Array = 43,
JSProto_SharedUint8Array = 44,
JSProto_SharedInt16Array = 45,
JSProto_SharedUint16Array = 46,
JSProto_SharedInt32Array = 47,
JSProto_SharedUint32Array = 48,
JSProto_SharedFloat32Array = 49,
JSProto_SharedFloat64Array = 50,
JSProto_SharedUint8ClampedArray = 51,
JSProto_TypedArray = 52,
JSProto_Atomics = 53,
JSProto_SavedFrame = 54,
JSProto_LIMIT = 55,
}
pub enum JSCompartment { }
pub enum JSCrossCompartmentCall { }
pub enum JSExceptionState { }
pub enum JSIdArray { }
pub enum JSObjectMap { }
pub enum JSPropertyName { }
pub enum JSRuntime { }
pub enum JSStructuredCloneCallbacks { }
pub enum JSStructuredCloneReader { }
pub enum JSStructuredCloneWriter { }
pub enum JSFlatString { }
pub enum PRCallOnceType { }
pub type JSCallOnceType = PRCallOnceType;
pub type JSInitCallback =
::std::option::Option<unsafe extern "C" fn() -> bool>;
pub type JSConstDoubleSpec = JSConstScalarSpec<f64>;
pub type JSConstIntegerSpec = JSConstScalarSpec<i32>;
pub type JSTraceDataOp =
::std::option::Option<unsafe extern "C" fn(trc: *mut JSTracer,
data: *mut ::libc::c_void)>;
pub enum StoreBuffer { }
pub type OffThreadCompileCallback =
::std::option::Option<unsafe extern "C" fn(token: *mut ::libc::c_void,
callbackData:
*mut ::libc::c_void)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Runtime {
pub needsIncrementalBarrier_: bool,
pub gcStoreBufferPtr_: *mut StoreBuffer,
pub functionPersistentRooteds: LinkedList<PersistentRooted<*mut JSFunction>>,
pub idPersistentRooteds: LinkedList<PersistentRooted<jsid>>,
pub objectPersistentRooteds: LinkedList<PersistentRooted<*mut JSObject>>,
pub scriptPersistentRooteds: LinkedList<PersistentRooted<*mut JSScript>>,
pub stringPersistentRooteds: LinkedList<PersistentRooted<*mut JSString>>,
pub valuePersistentRooteds: LinkedList<PersistentRooted<Value>>,
}
impl ::std::default::Default for Runtime {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoGCRooter {
pub down: *mut AutoGCRooter,
pub tag_: ptrdiff_t,
pub stackTop: *mut *mut AutoGCRooter,
}
impl ::std::default::Default for AutoGCRooter {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum AutoGCRooter_enum0 {
VALARRAY = -2,
PARSER = -3,
SHAPEVECTOR = -4,
IDARRAY = -6,
DESCVECTOR = -7,
VALVECTOR = -10,
IDVECTOR = -11,
IDVALVECTOR = -12,
OBJVECTOR = -14,
STRINGVECTOR = -15,
SCRIPTVECTOR = -16,
NAMEVECTOR = -17,
HASHABLEVALUE = -18,
IONMASM = -19,
WRAPVECTOR = -20,
WRAPPER = -21,
OBJOBJHASHMAP = -22,
OBJU32HASHMAP = -23,
OBJHASHSET = -24,
JSONPARSER = -25,
CUSTOM = -26,
FUNVECTOR = -27,
}
extern "C" {
fn _ZN2JS12AutoGCRooter5traceEP8JSTracer(this: *mut AutoGCRooter,
trc: *mut JSTracer);
fn _ZN2JS12AutoGCRooter8traceAllEP8JSTracer(trc: *mut JSTracer);
fn _ZN2JS12AutoGCRooter16traceAllWrappersEP8JSTracer(trc: *mut JSTracer);
}
impl AutoGCRooter {
#[inline]
pub unsafe extern "C" fn trace(&mut self, trc: *mut JSTracer) {
_ZN2JS12AutoGCRooter5traceEP8JSTracer(&mut *self, trc)
}
#[inline]
pub unsafe extern "C" fn traceAll(trc: *mut JSTracer) {
_ZN2JS12AutoGCRooter8traceAllEP8JSTracer(trc)
}
#[inline]
pub unsafe extern "C" fn traceAllWrappers(trc: *mut JSTracer) {
_ZN2JS12AutoGCRooter16traceAllWrappersEP8JSTracer(trc)
}
}
pub enum ExclusiveContext { }
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum ThingRootKind {
THING_ROOT_OBJECT = 0,
THING_ROOT_SHAPE = 1,
THING_ROOT_BASE_SHAPE = 2,
THING_ROOT_OBJECT_GROUP = 3,
THING_ROOT_STRING = 4,
THING_ROOT_SYMBOL = 5,
THING_ROOT_JIT_CODE = 6,
THING_ROOT_SCRIPT = 7,
THING_ROOT_LAZY_SCRIPT = 8,
THING_ROOT_ID = 9,
THING_ROOT_VALUE = 10,
THING_ROOT_TYPE = 11,
THING_ROOT_BINDINGS = 12,
THING_ROOT_PROPERTY_DESCRIPTOR = 13,
THING_ROOT_PROP_DESC = 14,
THING_ROOT_LIMIT = 15,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum StackKind {
StackForSystemCode = 0,
StackForTrustedScript = 1,
StackForUntrustedScript = 2,
StackKindCount = 3,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ContextFriendFields {
pub runtime_: *mut JSRuntime,
pub compartment_: *mut JSCompartment,
pub zone_: *mut Zone,
pub thingGCRooters: [*mut Rooted<*mut ::libc::c_void>; 15usize],
pub autoGCRooters: *mut AutoGCRooter,
}
impl ::std::default::Default for ContextFriendFields {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub enum PerThreadData { }
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PerThreadDataFriendFields {
pub thingGCRooters: [*mut Rooted<*mut ::libc::c_void>; 15usize],
pub nativeStackLimit: [uintptr_t; 3usize],
}
impl ::std::default::Default for PerThreadDataFriendFields {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RuntimeDummy {
pub _base: Runtime,
pub mainThread: PerThreadDummy,
}
impl ::std::default::Default for RuntimeDummy {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PerThreadDummy {
pub field1: *mut ::libc::c_void,
pub field2: uintptr_t,
pub field3: u64,
}
impl ::std::default::Default for PerThreadDummy {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSGCTraceKind {
JSTRACE_OBJECT = 0,
JSTRACE_STRING = 1,
JSTRACE_SYMBOL = 2,
JSTRACE_SCRIPT = 3,
JSTRACE_SHAPE = 4,
JSTRACE_NULL = 6,
JSTRACE_OUTOFLINE = 7,
JSTRACE_BASE_SHAPE = 15,
JSTRACE_JITCODE = 31,
JSTRACE_LAZY_SCRIPT = 47,
JSTRACE_OBJECT_GROUP = 63,
}
pub type JSTraceCallback =
::std::option::Option<unsafe extern "C" fn(trc: *mut JSTracer,
thingp:
*mut *mut ::libc::c_void,
kind: JSGCTraceKind)>;
pub type JSTraceNamePrinter =
::std::option::Option<unsafe extern "C" fn(trc: *mut JSTracer,
buf: *mut ::libc::c_char,
bufsize: size_t)>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum WeakMapTraceKind {
DoNotTraceWeakMaps = 0,
TraceWeakMapValues = 1,
TraceWeakMapKeysValues = 2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSTracer {
pub callback: JSTraceCallback,
pub runtime_: *mut JSRuntime,
pub debugPrinter_: JSTraceNamePrinter,
pub debugPrintArg_: *const ::libc::c_void,
pub debugPrintIndex_: size_t,
pub eagerlyTraceWeakMaps_: WeakMapTraceKind,
pub realLocation_: *mut ::libc::c_void,
}
impl ::std::default::Default for JSTracer {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN8JSTracer17setTracingDetailsEPFvPS_PcmEPKvm(this: *mut JSTracer,
printer:
JSTraceNamePrinter,
arg:
*const ::libc::c_void,
index: size_t);
fn _ZN8JSTracer15setTracingIndexEPKcm(this: *mut JSTracer,
name: *const ::libc::c_char,
index: size_t);
fn _ZN8JSTracer14setTracingNameEPKc(this: *mut JSTracer,
name: *const ::libc::c_char);
fn _ZN8JSTracer19clearTracingDetailsEv(this: *mut JSTracer);
fn _ZNK8JSTracer17hasTracingDetailsEv(this: *mut JSTracer) -> bool;
fn _ZNK8JSTracer11tracingNameEPKc(this: *mut JSTracer,
fallback: *const ::libc::c_char)
-> *const ::libc::c_char;
fn _ZN8JSTracer18getTracingEdgeNameEPcm(this: *mut JSTracer,
buffer: *mut ::libc::c_char,
bufferSize: size_t)
-> *const ::libc::c_char;
fn _ZNK8JSTracer12debugPrinterEv(this: *mut JSTracer)
-> JSTraceNamePrinter;
fn _ZNK8JSTracer13debugPrintArgEv(this: *mut JSTracer)
-> *const ::libc::c_void;
fn _ZNK8JSTracer15debugPrintIndexEv(this: *mut JSTracer) -> size_t;
fn _ZNK8JSTracer7runtimeEv(this: *mut JSTracer) -> *mut JSRuntime;
fn _ZNK8JSTracer20eagerlyTraceWeakMapsEv(this: *mut JSTracer)
-> WeakMapTraceKind;
fn _ZN8JSTracer16setTraceCallbackEPFvPS_PPv13JSGCTraceKindE(this:
*mut JSTracer,
traceCallback:
JSTraceCallback);
fn _ZN8JSTracer18setTracingLocationEPv(this: *mut JSTracer,
location: *mut ::libc::c_void);
fn _ZN8JSTracer20unsetTracingLocationEv(this: *mut JSTracer);
fn _ZN8JSTracer15tracingLocationEPPv(this: *mut JSTracer,
thingp: *mut *mut ::libc::c_void)
-> *mut *mut ::libc::c_void;
}
impl JSTracer {
#[inline]
pub unsafe extern "C" fn setTracingDetails(&mut self,
printer: JSTraceNamePrinter,
arg: *const ::libc::c_void,
index: size_t) {
_ZN8JSTracer17setTracingDetailsEPFvPS_PcmEPKvm(&mut *self, printer,
arg, index)
}
#[inline]
pub unsafe extern "C" fn setTracingIndex(&mut self,
name: *const ::libc::c_char,
index: size_t) {
_ZN8JSTracer15setTracingIndexEPKcm(&mut *self, name, index)
}
#[inline]
pub unsafe extern "C" fn setTracingName(&mut self,
name: *const ::libc::c_char) {
_ZN8JSTracer14setTracingNameEPKc(&mut *self, name)
}
#[inline]
pub unsafe extern "C" fn clearTracingDetails(&mut self) {
_ZN8JSTracer19clearTracingDetailsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn hasTracingDetails(&mut self) -> bool {
_ZNK8JSTracer17hasTracingDetailsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn tracingName(&mut self,
fallback: *const ::libc::c_char)
-> *const ::libc::c_char {
_ZNK8JSTracer11tracingNameEPKc(&mut *self, fallback)
}
#[inline]
pub unsafe extern "C" fn getTracingEdgeName(&mut self,
buffer: *mut ::libc::c_char,
bufferSize: size_t)
-> *const ::libc::c_char {
_ZN8JSTracer18getTracingEdgeNameEPcm(&mut *self, buffer, bufferSize)
}
#[inline]
pub unsafe extern "C" fn debugPrinter(&mut self) -> JSTraceNamePrinter {
_ZNK8JSTracer12debugPrinterEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn debugPrintArg(&mut self)
-> *const ::libc::c_void {
_ZNK8JSTracer13debugPrintArgEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn debugPrintIndex(&mut self) -> size_t {
_ZNK8JSTracer15debugPrintIndexEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn runtime(&mut self) -> *mut JSRuntime {
_ZNK8JSTracer7runtimeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn eagerlyTraceWeakMaps(&mut self)
-> WeakMapTraceKind {
_ZNK8JSTracer20eagerlyTraceWeakMapsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setTraceCallback(&mut self,
traceCallback:
JSTraceCallback) {
_ZN8JSTracer16setTraceCallbackEPFvPS_PPv13JSGCTraceKindE(&mut *self,
traceCallback)
}
#[inline]
pub unsafe extern "C" fn setTracingLocation(&mut self,
location:
*mut ::libc::c_void) {
_ZN8JSTracer18setTracingLocationEPv(&mut *self, location)
}
#[inline]
pub unsafe extern "C" fn unsetTracingLocation(&mut self) {
_ZN8JSTracer20unsetTracingLocationEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn tracingLocation(&mut self,
thingp: *mut *mut ::libc::c_void)
-> *mut *mut ::libc::c_void {
_ZN8JSTracer15tracingLocationEPPv(&mut *self, thingp)
}
}
pub enum HashSet { }
pub enum Cell { }
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Zone {
pub runtime_: *mut JSRuntime,
pub barrierTracer_: *mut JSTracer,
pub needsIncrementalBarrier_: bool,
}
impl ::std::default::Default for Zone {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GCCellPtr {
pub ptr: uintptr_t,
}
impl ::std::default::Default for GCCellPtr {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2JS9GCCellPtr7NullPtrEv() -> GCCellPtr;
fn _ZNK2JS9GCCellPtr4kindEv(this: *mut GCCellPtr) -> JSGCTraceKind;
fn _ZNK2JS9GCCellPtr8isObjectEv(this: *mut GCCellPtr) -> bool;
fn _ZNK2JS9GCCellPtr8isScriptEv(this: *mut GCCellPtr) -> bool;
fn _ZNK2JS9GCCellPtr8isStringEv(this: *mut GCCellPtr) -> bool;
fn _ZNK2JS9GCCellPtr8isSymbolEv(this: *mut GCCellPtr) -> bool;
fn _ZNK2JS9GCCellPtr7isShapeEv(this: *mut GCCellPtr) -> bool;
fn _ZNK2JS9GCCellPtr8toObjectEv(this: *mut GCCellPtr) -> *mut JSObject;
fn _ZNK2JS9GCCellPtr8toStringEv(this: *mut GCCellPtr) -> *mut JSString;
fn _ZNK2JS9GCCellPtr8toScriptEv(this: *mut GCCellPtr) -> *mut JSScript;
fn _ZNK2JS9GCCellPtr8toSymbolEv(this: *mut GCCellPtr) -> *mut Symbol;
fn _ZNK2JS9GCCellPtr6asCellEv(this: *mut GCCellPtr) -> *mut Cell;
fn _ZNK2JS9GCCellPtr15unsafeAsIntegerEv(this: *mut GCCellPtr) -> u64;
fn _ZNK2JS9GCCellPtr15unsafeAsUIntPtrEv(this: *mut GCCellPtr)
-> uintptr_t;
fn _ZN2JS9GCCellPtr11checkedCastEPv13JSGCTraceKind(this: *mut GCCellPtr,
p: *mut ::libc::c_void,
traceKind:
JSGCTraceKind)
-> uintptr_t;
fn _ZNK2JS9GCCellPtr13outOfLineKindEv(this: *mut GCCellPtr)
-> JSGCTraceKind;
}
impl GCCellPtr {
#[inline]
pub unsafe extern "C" fn NullPtr() -> GCCellPtr {
_ZN2JS9GCCellPtr7NullPtrEv()
}
#[inline]
pub unsafe extern "C" fn kind(&mut self) -> JSGCTraceKind {
_ZNK2JS9GCCellPtr4kindEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isObject(&mut self) -> bool {
_ZNK2JS9GCCellPtr8isObjectEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isScript(&mut self) -> bool {
_ZNK2JS9GCCellPtr8isScriptEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isString(&mut self) -> bool {
_ZNK2JS9GCCellPtr8isStringEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isSymbol(&mut self) -> bool {
_ZNK2JS9GCCellPtr8isSymbolEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isShape(&mut self) -> bool {
_ZNK2JS9GCCellPtr7isShapeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toObject(&mut self) -> *mut JSObject {
_ZNK2JS9GCCellPtr8toObjectEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toString(&mut self) -> *mut JSString {
_ZNK2JS9GCCellPtr8toStringEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toScript(&mut self) -> *mut JSScript {
_ZNK2JS9GCCellPtr8toScriptEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toSymbol(&mut self) -> *mut Symbol {
_ZNK2JS9GCCellPtr8toSymbolEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn asCell(&mut self) -> *mut Cell {
_ZNK2JS9GCCellPtr6asCellEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn unsafeAsInteger(&mut self) -> u64 {
_ZNK2JS9GCCellPtr15unsafeAsIntegerEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn unsafeAsUIntPtr(&mut self) -> uintptr_t {
_ZNK2JS9GCCellPtr15unsafeAsUIntPtrEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn checkedCast(&mut self, p: *mut ::libc::c_void,
traceKind: JSGCTraceKind)
-> uintptr_t {
_ZN2JS9GCCellPtr11checkedCastEPv13JSGCTraceKind(&mut *self, p,
traceKind)
}
#[inline]
pub unsafe extern "C" fn outOfLineKind(&mut self) -> JSGCTraceKind {
_ZNK2JS9GCCellPtr13outOfLineKindEv(&mut *self)
}
}
pub enum GCRuntime { }
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSGCMode {
JSGC_MODE_GLOBAL = 0,
JSGC_MODE_COMPARTMENT = 1,
JSGC_MODE_INCREMENTAL = 2,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSGCInvocationKind { GC_NORMAL = 0, GC_SHRINK = 1, }
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum Reason {
API = 0,
EAGER_ALLOC_TRIGGER = 1,
DESTROY_RUNTIME = 2,
DESTROY_CONTEXT = 3,
LAST_DITCH = 4,
TOO_MUCH_MALLOC = 5,
ALLOC_TRIGGER = 6,
DEBUG_GC = 7,
COMPARTMENT_REVIVED = 8,
RESET = 9,
OUT_OF_NURSERY = 10,
EVICT_NURSERY = 11,
FULL_STORE_BUFFER = 12,
SHARED_MEMORY_LIMIT = 13,
PERIODIC_FULL_GC = 14,
INCREMENTAL_TOO_SLOW = 15,
RESERVED0 = 16,
RESERVED1 = 17,
RESERVED2 = 18,
RESERVED3 = 19,
RESERVED4 = 20,
RESERVED5 = 21,
RESERVED6 = 22,
RESERVED7 = 23,
RESERVED8 = 24,
RESERVED9 = 25,
RESERVED10 = 26,
RESERVED11 = 27,
RESERVED12 = 28,
RESERVED13 = 29,
RESERVED14 = 30,
RESERVED15 = 31,
RESERVED16 = 32,
DOM_WINDOW_UTILS = 33,
COMPONENT_UTILS = 34,
MEM_PRESSURE = 35,
CC_WAITING = 36,
CC_FORCED = 37,
LOAD_END = 38,
POST_COMPARTMENT = 39,
PAGE_HIDE = 40,
NSJSCONTEXT_DESTROY = 41,
SET_NEW_DOCUMENT = 42,
SET_DOC_SHELL = 43,
DOM_UTILS = 44,
DOM_IPC = 45,
DOM_WORKER = 46,
INTER_SLICE_GC = 47,
REFRESH_FRAME = 48,
FULL_GC_TIMER = 49,
SHUTDOWN_CC = 50,
FINISH_LARGE_EVALUATE = 51,
USER_INACTIVE = 52,
NO_REASON = 53,
NUM_REASONS = 54,
NUM_TELEMETRY_REASONS = 100,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum GCProgress {
GC_CYCLE_BEGIN = 0,
GC_SLICE_BEGIN = 1,
GC_SLICE_END = 2,
GC_CYCLE_END = 3,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GCDescription {
pub isCompartment_: bool,
pub invocationKind_: JSGCInvocationKind,
}
impl ::std::default::Default for GCDescription {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2JS13GCDescription13formatMessageEP9JSRuntime(this:
*mut GCDescription,
rt: *mut JSRuntime)
-> *mut u16;
fn _ZNK2JS13GCDescription10formatJSONEP9JSRuntimem(this:
*mut GCDescription,
rt: *mut JSRuntime,
timestamp: u64)
-> *mut u16;
}
impl GCDescription {
#[inline]
pub unsafe extern "C" fn formatMessage(&mut self, rt: *mut JSRuntime)
-> *mut u16 {
_ZNK2JS13GCDescription13formatMessageEP9JSRuntime(&mut *self, rt)
}
#[inline]
pub unsafe extern "C" fn formatJSON(&mut self, rt: *mut JSRuntime,
timestamp: u64) -> *mut u16 {
_ZNK2JS13GCDescription10formatJSONEP9JSRuntimem(&mut *self, rt,
timestamp)
}
}
pub type GCSliceCallback =
::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime,
progress: GCProgress,
desc: &GCDescription)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoDisableGenerationalGC {
pub gc: *mut GCRuntime,
pub restartVerifier: bool,
}
impl ::std::default::Default for AutoDisableGenerationalGC {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoAssertOnGC;
impl ::std::default::Default for AutoAssertOnGC {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2JS14AutoAssertOnGC16VerifyIsSafeToGCEP9JSRuntime(rt:
*mut JSRuntime);
}
impl AutoAssertOnGC {
#[inline]
pub unsafe extern "C" fn VerifyIsSafeToGC(rt: *mut JSRuntime) {
_ZN2JS14AutoAssertOnGC16VerifyIsSafeToGCEP9JSRuntime(rt)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoAssertNoAlloc {
pub gc: *mut GCRuntime,
}
impl ::std::default::Default for AutoAssertNoAlloc {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2JS17AutoAssertNoAlloc13disallowAllocEP9JSRuntime(this:
*mut AutoAssertNoAlloc,
rt:
*mut JSRuntime);
}
impl AutoAssertNoAlloc {
#[inline]
pub unsafe extern "C" fn disallowAlloc(&mut self, rt: *mut JSRuntime) {
_ZN2JS17AutoAssertNoAlloc13disallowAllocEP9JSRuntime(&mut *self, rt)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoSuppressGCAnalysis {
pub _base: AutoAssertNoAlloc,
}
impl ::std::default::Default for AutoSuppressGCAnalysis {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoAssertGCCallback {
pub _base: AutoSuppressGCAnalysis,
}
impl ::std::default::Default for AutoAssertGCCallback {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoCheckCannotGC {
pub _base: AutoAssertOnGC,
}
impl ::std::default::Default for AutoCheckCannotGC {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GCMethods<T> {
pub _phantom0: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RootedBase<T> {
pub _phantom0: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HandleBase<T> {
pub _phantom0: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MutableHandleBase<T> {
pub _phantom0: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HeapBase<T> {
pub _phantom0: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PersistentRootedBase<T> {
pub _phantom0: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct NullPtr;
impl ::std::default::Default for NullPtr {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub enum PersistentRootedMarker { }
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Heap<T> {
pub _base: HeapBase<T>,
pub ptr: T,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TenuredHeap<T> {
pub _base: HeapBase<T>,
pub bits: uintptr_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Handle<T> {
pub _base: HandleBase<T>,
pub ptr: *const T,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MutableHandle<T> {
pub _base: MutableHandleBase<T>,
pub ptr: *mut T,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct InternalHandle<T> {
pub _phantom0: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Rooted<T> {
pub _base: RootedBase<T>,
pub stack: *mut *mut Rooted<*mut ::libc::c_void>,
pub prev: *mut Rooted<*mut ::libc::c_void>,
pub ptr: T,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct FakeRooted<T> {
pub _base: RootedBase<T>,
pub ptr: T,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct FakeMutableHandle<T> {
pub _base: MutableHandleBase<T>,
pub ptr: *mut T,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum AllowGC { NoGC = 0, CanGC = 1, }
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MaybeRooted<T> {
pub _phantom0: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PersistentRooted<T> {
pub _base: PersistentRootedBase<T>,
pub _base1: LinkedListElement<T>,
pub ptr: T,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ObjectPtr {
pub value: Heap<*mut JSObject>,
}
impl ::std::default::Default for ObjectPtr {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2JS9ObjectPtr8finalizeEP9JSRuntime(this: *mut ObjectPtr,
rt: *mut JSRuntime);
fn _ZN2JS9ObjectPtr4initEP8JSObject(this: *mut ObjectPtr,
obj: *mut JSObject);
fn _ZNK2JS9ObjectPtr3getEv(this: *mut ObjectPtr) -> *mut JSObject;
fn _ZN2JS9ObjectPtr15writeBarrierPreEP9JSRuntime(this: *mut ObjectPtr,
rt: *mut JSRuntime);
fn _ZN2JS9ObjectPtr24updateWeakPointerAfterGCEv(this: *mut ObjectPtr);
fn _ZN2JS9ObjectPtr5traceEP8JSTracerPKc(this: *mut ObjectPtr,
trc: *mut JSTracer,
name: *const ::libc::c_char);
}
impl ObjectPtr {
#[inline]
pub unsafe extern "C" fn finalize(&mut self, rt: *mut JSRuntime) {
_ZN2JS9ObjectPtr8finalizeEP9JSRuntime(&mut *self, rt)
}
#[inline]
pub unsafe extern "C" fn init(&mut self, obj: *mut JSObject) {
_ZN2JS9ObjectPtr4initEP8JSObject(&mut *self, obj)
}
#[inline]
pub unsafe extern "C" fn get(&mut self) -> *mut JSObject {
_ZNK2JS9ObjectPtr3getEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn writeBarrierPre(&mut self, rt: *mut JSRuntime) {
_ZN2JS9ObjectPtr15writeBarrierPreEP9JSRuntime(&mut *self, rt)
}
#[inline]
pub unsafe extern "C" fn updateWeakPointerAfterGC(&mut self) {
_ZN2JS9ObjectPtr24updateWeakPointerAfterGCEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn trace(&mut self, trc: *mut JSTracer,
name: *const ::libc::c_char) {
_ZN2JS9ObjectPtr5traceEP8JSTracerPKc(&mut *self, trc, name)
}
}
#[repr(i8)]
#[derive(Copy, Clone)]
pub enum JSValueType {
JSVAL_TYPE_DOUBLE = 0,
JSVAL_TYPE_INT32 = 1,
JSVAL_TYPE_UNDEFINED = 2,
JSVAL_TYPE_BOOLEAN = 3,
JSVAL_TYPE_MAGIC = 4,
JSVAL_TYPE_STRING = 5,
JSVAL_TYPE_SYMBOL = 6,
JSVAL_TYPE_NULL = 7,
JSVAL_TYPE_OBJECT = 8,
JSVAL_TYPE_UNKNOWN = 32,
JSVAL_TYPE_MISSING = 33,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSValueTag {
JSVAL_TAG_MAX_DOUBLE = 131056,
JSVAL_TAG_INT32 = 131057,
JSVAL_TAG_UNDEFINED = 131058,
JSVAL_TAG_STRING = 131061,
JSVAL_TAG_SYMBOL = 131062,
JSVAL_TAG_BOOLEAN = 131059,
JSVAL_TAG_MAGIC = 131060,
JSVAL_TAG_NULL = 131063,
JSVAL_TAG_OBJECT = 131064,
}
#[repr(i64)]
#[derive(Copy, Clone)]
pub enum JSValueShiftedTag {
JSVAL_SHIFTED_TAG_MAX_DOUBLE = -2251795518717953,
JSVAL_SHIFTED_TAG_INT32 = -2111062325329920,
JSVAL_SHIFTED_TAG_UNDEFINED = -1970324836974592,
JSVAL_SHIFTED_TAG_STRING = -1548112371908608,
JSVAL_SHIFTED_TAG_SYMBOL = -1407374883553280,
JSVAL_SHIFTED_TAG_BOOLEAN = -1829587348619264,
JSVAL_SHIFTED_TAG_MAGIC = -1688849860263936,
JSVAL_SHIFTED_TAG_NULL = -1266637395197952,
JSVAL_SHIFTED_TAG_OBJECT = -1125899906842624,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSWhyMagic {
JS_ELEMENTS_HOLE = 0,
JS_NO_ITER_VALUE = 1,
JS_GENERATOR_CLOSING = 2,
JS_NO_CONSTANT = 3,
JS_THIS_POISON = 4,
JS_ARG_POISON = 5,
JS_SERIALIZE_NO_NODE = 6,
JS_LAZY_ARGUMENTS = 7,
JS_OPTIMIZED_ARGUMENTS = 8,
JS_IS_CONSTRUCTING = 9,
JS_OVERWRITTEN_CALLEE = 10,
JS_BLOCK_NEEDS_CLONE = 11,
JS_HASH_KEY_EMPTY = 12,
JS_ION_ERROR = 13,
JS_ION_BAILOUT = 14,
JS_OPTIMIZED_OUT = 15,
JS_UNINITIALIZED_LEXICAL = 16,
JS_GENERIC_MAGIC = 17,
JS_WHY_MAGIC_COUNT = 18,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct jsval_layout {
pub _bindgen_data_: u64,
}
impl jsval_layout {
pub unsafe fn asBits(&mut self) -> *mut u64 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn s(&mut self) -> *mut Value_h_unnamed_2 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn asDouble(&mut self) -> *mut f64 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn asPtr(&mut self) -> *mut *mut ::libc::c_void {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn asWord(&mut self) -> *mut size_t {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn asUIntPtr(&mut self) -> *mut uintptr_t {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::default::Default for jsval_layout {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Value_h_unnamed_2 {
pub payload: Value_h_unnamed_3,
}
impl ::std::default::Default for Value_h_unnamed_2 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Value_h_unnamed_3 {
pub _bindgen_data_: u32,
}
impl Value_h_unnamed_3 {
pub unsafe fn i32(&mut self) -> *mut i32 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn u32(&mut self) -> *mut u32 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn why(&mut self) -> *mut JSWhyMagic {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::default::Default for Value_h_unnamed_3 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Value {
pub data: jsval_layout,
}
impl ::std::default::Default for Value {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MakeNumberValue;
impl ::std::default::Default for MakeNumberValue {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ValueOperations<Outer> {
pub _phantom0: PhantomData<Outer>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MutableValueOperations<Outer> {
pub _base: ValueOperations<Outer>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ValueAlignmentTester {
pub c: ::libc::c_char,
pub v: Value,
}
impl ::std::default::Default for ValueAlignmentTester {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct LayoutAlignmentTester {
pub c: ::libc::c_char,
pub l: jsval_layout,
}
impl ::std::default::Default for LayoutAlignmentTester {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type jsval = Value;
pub type JSNative =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext, argc: u32,
vp: *mut Value) -> bool>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UsedRvalBase;
impl ::std::default::Default for UsedRvalBase {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct IncludeUsedRval {
pub _base: UsedRvalBase,
pub usedRval_: bool,
}
impl ::std::default::Default for IncludeUsedRval {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct NoUsedRval {
pub _base: UsedRvalBase,
}
impl ::std::default::Default for NoUsedRval {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CallReceiverBase<WantUsedRval> {
pub _base: WantUsedRval,
pub argv_: *mut Value,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CallReceiver {
pub _base: CallReceiverBase<IncludeUsedRval>,
}
impl ::std::default::Default for CallReceiver {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CallArgsBase<WantUsedRval> {
pub _base: CallReceiverBase<WantUsedRval>,
pub argc_: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CallArgs {
pub _base: CallArgsBase<IncludeUsedRval>,
}
impl ::std::default::Default for CallArgs {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct jsid {
pub asBits: size_t,
}
impl ::std::default::Default for jsid {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub enum FreeOp { }
pub enum PropertyName { }
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ObjectOpResult {
pub code_: uintptr_t,
}
impl ::std::default::Default for ObjectOpResult {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i64)]
#[derive(Copy, Clone)]
pub enum SpecialCodes { OkCode = 0, Uninitialized = -1, }
extern "C" {
fn _ZN2JS14ObjectOpResult20failCantRedefinePropEv(this:
*mut ObjectOpResult)
-> bool;
fn _ZN2JS14ObjectOpResult12failReadOnlyEv(this: *mut ObjectOpResult)
-> bool;
fn _ZN2JS14ObjectOpResult14failGetterOnlyEv(this: *mut ObjectOpResult)
-> bool;
fn _ZN2JS14ObjectOpResult14failCantDeleteEv(this: *mut ObjectOpResult)
-> bool;
fn _ZN2JS14ObjectOpResult21failCantSetInterposedEv(this:
*mut ObjectOpResult)
-> bool;
fn _ZN2JS14ObjectOpResult27failCantDefineWindowElementEv(this:
*mut ObjectOpResult)
-> bool;
fn _ZN2JS14ObjectOpResult27failCantDeleteWindowElementEv(this:
*mut ObjectOpResult)
-> bool;
fn _ZN2JS14ObjectOpResult33failCantDeleteWindowNamedPropertyEv(this:
*mut ObjectOpResult)
-> bool;
fn _ZN2JS14ObjectOpResult25failCantPreventExtensionsEv(this:
*mut ObjectOpResult)
-> bool;
fn _ZN2JS14ObjectOpResult26reportStrictErrorOrWarningEP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEEb(this:
*mut ObjectOpResult,
cx:
*mut JSContext,
obj:
HandleObject,
id:
HandleId,
strict:
bool)
-> bool;
fn _ZN2JS14ObjectOpResult26reportStrictErrorOrWarningEP9JSContextNS_6HandleIP8JSObjectEEb(this:
*mut ObjectOpResult,
cx:
*mut JSContext,
obj:
HandleObject,
strict:
bool)
-> bool;
}
impl ObjectOpResult {
#[inline]
pub unsafe extern "C" fn failCantRedefineProp(&mut self) -> bool {
_ZN2JS14ObjectOpResult20failCantRedefinePropEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn failReadOnly(&mut self) -> bool {
_ZN2JS14ObjectOpResult12failReadOnlyEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn failGetterOnly(&mut self) -> bool {
_ZN2JS14ObjectOpResult14failGetterOnlyEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn failCantDelete(&mut self) -> bool {
_ZN2JS14ObjectOpResult14failCantDeleteEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn failCantSetInterposed(&mut self) -> bool {
_ZN2JS14ObjectOpResult21failCantSetInterposedEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn failCantDefineWindowElement(&mut self) -> bool {
_ZN2JS14ObjectOpResult27failCantDefineWindowElementEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn failCantDeleteWindowElement(&mut self) -> bool {
_ZN2JS14ObjectOpResult27failCantDeleteWindowElementEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn failCantDeleteWindowNamedProperty(&mut self)
-> bool {
_ZN2JS14ObjectOpResult33failCantDeleteWindowNamedPropertyEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn failCantPreventExtensions(&mut self) -> bool {
_ZN2JS14ObjectOpResult25failCantPreventExtensionsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn reportStrictErrorOrWarning(&mut self,
cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
strict: bool)
-> bool {
_ZN2JS14ObjectOpResult26reportStrictErrorOrWarningEP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEEb(&mut *self,
cx,
obj,
id,
strict)
}
#[inline]
pub unsafe extern "C" fn reportStrictErrorOrWarning1(&mut self,
cx: *mut JSContext,
obj: HandleObject,
strict: bool)
-> bool {
_ZN2JS14ObjectOpResult26reportStrictErrorOrWarningEP9JSContextNS_6HandleIP8JSObjectEEb(&mut *self,
cx,
obj,
strict)
}
}
pub type JSGetterOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
vp: MutableHandleValue)
-> bool>;
pub type JSAddPropertyOp = JSGetterOp;
pub type JSSetterOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
vp: MutableHandleValue,
result: &mut ObjectOpResult)
-> bool>;
pub type JSDeletePropertyOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
result: &mut ObjectOpResult)
-> bool>;
pub type JSNewEnumerateOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
properties: &mut AutoIdVector)
-> bool>;
pub type JSEnumerateOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject) -> bool>;
pub type JSResolveOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
resolvedp: *mut bool) -> bool>;
pub type JSConvertOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
_type: JSType,
vp: MutableHandleValue)
-> bool>;
pub type JSFinalizeOp =
::std::option::Option<unsafe extern "C" fn(fop: *mut JSFreeOp,
obj: *mut JSObject)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSStringFinalizer {
pub finalize: ::std::option::Option<unsafe extern "C" fn(fin:
*const JSStringFinalizer,
chars:
*mut u16)>,
}
impl ::std::default::Default for JSStringFinalizer {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type JSHasInstanceOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
vp: MutableHandleValue,
bp: *mut bool) -> bool>;
pub type JSTraceOp =
::std::option::Option<unsafe extern "C" fn(trc: *mut JSTracer,
obj: *mut JSObject)>;
pub type JSWeakmapKeyDelegateOp =
::std::option::Option<unsafe extern "C" fn(obj: *mut JSObject)
-> *mut JSObject>;
pub type JSObjectMovedOp =
::std::option::Option<unsafe extern "C" fn(obj: *mut JSObject,
old: *const JSObject)>;
pub type LookupPropertyOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
objp: MutableHandleObject,
propp:
MutableHandle<*mut Shape>)
-> bool>;
pub type DefinePropertyOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
value: HandleValue,
getter: JSGetterOp,
setter: JSSetterOp, attrs: u32,
result: &mut ObjectOpResult)
-> bool>;
pub type HasPropertyOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
foundp: *mut bool) -> bool>;
pub type GetPropertyOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
receiver: HandleObject,
id: HandleId,
vp: MutableHandleValue)
-> bool>;
pub type SetPropertyOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
receiver: HandleObject,
id: HandleId,
vp: MutableHandleValue,
result: &mut ObjectOpResult)
-> bool>;
pub type GetOwnPropertyOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
desc:
MutableHandle<JSPropertyDescriptor>)
-> bool>;
pub type DeletePropertyOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
result: &mut ObjectOpResult)
-> bool>;
pub type WatchOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
callable: HandleObject)
-> bool>;
pub type UnwatchOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject,
id: HandleId) -> bool>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ElementAdder {
pub resObj_: RootedObject,
pub vp_: *mut Value,
pub index_: u32,
pub length_: DebugOnly<u32>,
pub getBehavior_: GetBehavior,
}
impl ::std::default::Default for ElementAdder {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum GetBehavior { CheckHasElemPreserveHoles = 0, GetElement = 1, }
extern "C" {
fn _ZNK2js12ElementAdder11getBehaviorEv(this: *mut ElementAdder)
-> GetBehavior;
fn _ZN2js12ElementAdder6appendEP9JSContextN2JS6HandleINS3_5ValueEEE(this:
*mut ElementAdder,
cx:
*mut JSContext,
v:
HandleValue);
fn _ZN2js12ElementAdder10appendHoleEv(this: *mut ElementAdder);
}
impl ElementAdder {
#[inline]
pub unsafe extern "C" fn getBehavior(&mut self) -> GetBehavior {
_ZNK2js12ElementAdder11getBehaviorEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn append(&mut self, cx: *mut JSContext,
v: HandleValue) {
_ZN2js12ElementAdder6appendEP9JSContextN2JS6HandleINS3_5ValueEEE(&mut *self,
cx,
v)
}
#[inline]
pub unsafe extern "C" fn appendHole(&mut self) {
_ZN2js12ElementAdder10appendHoleEv(&mut *self)
}
}
pub type GetElementsOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject, begin: u32,
end: u32,
adder: *mut ElementAdder)
-> bool>;
pub type ObjectOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: HandleObject)
-> *mut JSObject>;
pub type InnerObjectOp =
::std::option::Option<unsafe extern "C" fn(obj: *mut JSObject)
-> *mut JSObject>;
pub type FinalizeOp =
::std::option::Option<unsafe extern "C" fn(fop: *mut FreeOp,
obj: *mut JSObject)>;
pub type ClassObjectCreationOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
key: JSProtoKey)
-> *mut JSObject>;
pub type FinishClassInitOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
ctor: HandleObject,
proto: HandleObject) -> bool>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ClassSpec {
pub createConstructor: ClassObjectCreationOp,
pub createPrototype: ClassObjectCreationOp,
pub constructorFunctions: *const JSFunctionSpec,
pub constructorProperties: *const JSPropertySpec,
pub prototypeFunctions: *const JSFunctionSpec,
pub prototypeProperties: *const JSPropertySpec,
pub finishInit: FinishClassInitOp,
pub flags: uintptr_t,
}
impl ::std::default::Default for ClassSpec {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ClassExtension {
pub outerObject: ObjectOp,
pub innerObject: InnerObjectOp,
pub isWrappedNative: bool,
pub weakmapKeyDelegateOp: JSWeakmapKeyDelegateOp,
pub objectMovedOp: JSObjectMovedOp,
}
impl ::std::default::Default for ClassExtension {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct ObjectOps {
pub lookupProperty: LookupPropertyOp,
pub defineProperty: DefinePropertyOp,
pub hasProperty: HasPropertyOp,
pub getProperty: GetPropertyOp,
pub setProperty: SetPropertyOp,
pub getOwnPropertyDescriptor: GetOwnPropertyOp,
pub deleteProperty: DeletePropertyOp,
pub watch: WatchOp,
pub unwatch: UnwatchOp,
pub getElements: GetElementsOp,
pub enumerate: JSNewEnumerateOp,
pub thisObject: ObjectOp,
}
impl ::std::default::Default for ObjectOps {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type JSClassInternal = ::std::option::Option<unsafe extern "C" fn()>;
#[repr(C)]
pub struct JSClass {
pub name: *const ::libc::c_char,
pub flags: u32,
pub addProperty: JSAddPropertyOp,
pub delProperty: JSDeletePropertyOp,
pub getProperty: JSGetterOp,
pub setProperty: JSSetterOp,
pub enumerate: JSEnumerateOp,
pub resolve: JSResolveOp,
pub convert: JSConvertOp,
pub finalize: JSFinalizeOp,
pub call: JSNative,
pub hasInstance: JSHasInstanceOp,
pub construct: JSNative,
pub trace: JSTraceOp,
pub reserved: [*mut ::libc::c_void; 25usize],
}
impl ::std::default::Default for JSClass {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct Class {
pub name: *const ::libc::c_char,
pub flags: u32,
pub addProperty: JSAddPropertyOp,
pub delProperty: JSDeletePropertyOp,
pub getProperty: JSGetterOp,
pub setProperty: JSSetterOp,
pub enumerate: JSEnumerateOp,
pub resolve: JSResolveOp,
pub convert: JSConvertOp,
pub finalize: FinalizeOp,
pub call: JSNative,
pub hasInstance: JSHasInstanceOp,
pub construct: JSNative,
pub trace: JSTraceOp,
pub spec: ClassSpec,
pub ext: ClassExtension,
pub ops: ObjectOps,
}
impl ::std::default::Default for Class {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum ESClassValue {
ESClass_Object = 0,
ESClass_Array = 1,
ESClass_Number = 2,
ESClass_String = 3,
ESClass_Boolean = 4,
ESClass_RegExp = 5,
ESClass_ArrayBuffer = 6,
ESClass_SharedArrayBuffer = 7,
ESClass_Date = 8,
ESClass_Set = 9,
ESClass_Map = 10,
ESClass_IsArray = 11,
}
pub enum Latin1CharsZ { }
pub enum TwoByteChars { }
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoCheckRequestDepth {
pub cx: *mut JSContext,
}
impl ::std::default::Default for AutoCheckRequestDepth {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoValueArray {
pub _base: AutoGCRooter,
pub length_: size_t,
pub elements_: *mut Value,
}
impl ::std::default::Default for AutoValueArray {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoVectorRooter<T> {
pub _base: AutoGCRooter,
pub vector: VectorImpl,
pub phantom: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoHashMapRooter<Key, Value> {
pub _base: AutoGCRooter,
pub map: HashMapImpl,
pub phantom: PhantomData<Key>,
pub phantom2: PhantomData<Value>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoHashSetRooter<T> {
pub _base: AutoGCRooter,
pub set: HashSetImpl,
pub phantom: PhantomData<T>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoValueVector {
pub _base: AutoVectorRooter<Value>,
}
impl ::std::default::Default for AutoValueVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoIdVector {
pub _base: AutoVectorRooter<jsid>,
}
impl ::std::default::Default for AutoIdVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoObjectVector {
pub _base: AutoVectorRooter<*mut JSObject>,
}
impl ::std::default::Default for AutoObjectVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoFunctionVector {
pub _base: AutoVectorRooter<*mut JSFunction>,
}
impl ::std::default::Default for AutoFunctionVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoScriptVector {
pub _base: AutoVectorRooter<*mut JSScript>,
}
impl ::std::default::Default for AutoScriptVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CustomAutoRooter {
pub _vftable: *const _vftable_CustomAutoRooter,
pub _base: AutoGCRooter,
}
impl ::std::default::Default for CustomAutoRooter {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_CustomAutoRooter {
pub trace: extern "C" fn(this: *mut ::libc::c_void, trc: *mut JSTracer),
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RootedGeneric<T> {
pub _base: CustomAutoRooter,
pub value: T,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HandleValueArray {
pub length_: size_t,
pub elements_: *const Value,
}
impl ::std::default::Default for HandleValueArray {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
/************************************************************************/
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSFreeOp {
pub runtime_: *mut JSRuntime,
}
impl ::std::default::Default for JSFreeOp {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSContextOp { JSCONTEXT_NEW = 0, JSCONTEXT_DESTROY = 1, }
pub type JSContextCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
contextOp: u32,
data: *mut ::libc::c_void)
-> bool>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSGCStatus { JSGC_BEGIN = 0, JSGC_END = 1, }
pub type JSGCCallback =
::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime,
status: JSGCStatus,
data: *mut ::libc::c_void)>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSFinalizeStatus {
JSFINALIZE_GROUP_START = 0,
JSFINALIZE_GROUP_END = 1,
JSFINALIZE_COLLECTION_END = 2,
}
pub type JSFinalizeCallback =
::std::option::Option<unsafe extern "C" fn(fop: *mut JSFreeOp,
status: JSFinalizeStatus,
isCompartment: bool,
data: *mut ::libc::c_void)>;
pub type JSWeakPointerCallback =
::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime,
data: *mut ::libc::c_void)>;
pub type JSInterruptCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext) -> bool>;
pub type JSErrorReporter =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
message: *const ::libc::c_char,
report: *mut JSErrorReport)>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSExnType {
JSEXN_NONE = -1,
JSEXN_ERR = 0,
JSEXN_INTERNALERR = 1,
JSEXN_EVALERR = 2,
JSEXN_RANGEERR = 3,
JSEXN_REFERENCEERR = 4,
JSEXN_SYNTAXERR = 5,
JSEXN_TYPEERR = 6,
JSEXN_URIERR = 7,
JSEXN_LIMIT = 8,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSErrorFormatString {
pub format: *const ::libc::c_char,
pub argCount: u16,
pub exnType: i16,
}
impl ::std::default::Default for JSErrorFormatString {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type JSErrorCallback =
::std::option::Option<unsafe extern "C" fn(userRef: *mut ::libc::c_void,
errorNumber: u32)
-> *const JSErrorFormatString>;
pub type JSLocaleToUpperCase =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
src: HandleString,
rval: MutableHandleValue)
-> bool>;
pub type JSLocaleToLowerCase =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
src: HandleString,
rval: MutableHandleValue)
-> bool>;
pub type JSLocaleCompare =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
src1: HandleString,
src2: HandleString,
rval: MutableHandleValue)
-> bool>;
pub type JSLocaleToUnicode =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
src: *const ::libc::c_char,
rval: MutableHandleValue)
-> bool>;
pub type JSWrapObjectCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
existing: HandleObject,
obj: HandleObject)
-> *mut JSObject>;
pub type JSPreWrapCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
scope: HandleObject,
obj: HandleObject,
objectPassedToWrap:
HandleObject)
-> *mut JSObject>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSWrapObjectCallbacks {
pub wrap: JSWrapObjectCallback,
pub preWrap: JSPreWrapCallback,
}
impl ::std::default::Default for JSWrapObjectCallbacks {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type JSDestroyCompartmentCallback =
::std::option::Option<unsafe extern "C" fn(fop: *mut JSFreeOp,
compartment:
*mut JSCompartment)>;
pub type JSZoneCallback =
::std::option::Option<unsafe extern "C" fn(zone: *mut Zone)>;
pub type JSCompartmentNameCallback =
::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime,
compartment:
*mut JSCompartment,
buf: *mut ::libc::c_char,
bufsize: size_t)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SourceBufferHolder {
pub data_: *const u16,
pub length_: size_t,
pub ownsChars_: bool,
}
impl ::std::default::Default for SourceBufferHolder {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum Ownership { NoOwnership = 0, GiveOwnership = 1, }
#[repr(C)]
pub struct CompartmentTimeStats {
pub compartmentName: [::libc::c_char; 1024usize],
pub addonId: *mut JSAddonId,
pub compartment: *mut JSCompartment,
pub time: u64,
pub cpowTime: u64,
}
impl ::std::default::Default for CompartmentTimeStats {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type JS_ICUAllocFn =
::std::option::Option<unsafe extern "C" fn(arg1: *const ::libc::c_void,
size: size_t)
-> *mut ::libc::c_void>;
pub type JS_ICUReallocFn =
::std::option::Option<unsafe extern "C" fn(arg1: *const ::libc::c_void,
p: *mut ::libc::c_void,
size: size_t)
-> *mut ::libc::c_void>;
pub type JS_ICUFreeFn =
::std::option::Option<unsafe extern "C" fn(arg1: *const ::libc::c_void,
p: *mut ::libc::c_void)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSAutoRequest {
pub mContext: *mut JSContext,
}
impl ::std::default::Default for JSAutoRequest {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RuntimeOptions {
pub _bitfield_1: u8,
pub _bitfield_2: u8,
}
impl ::std::default::Default for RuntimeOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
impl RuntimeOptions {
pub fn set_baseline_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 0usize);
self._bitfield_1 |= (val as u8) << 0usize;
}
pub fn set_ion_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 1usize);
self._bitfield_1 |= (val as u8) << 1usize;
}
pub fn set_asmJS_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 2usize);
self._bitfield_1 |= (val as u8) << 2usize;
}
pub fn set_nativeRegExp_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 3usize);
self._bitfield_1 |= (val as u8) << 3usize;
}
pub fn set_unboxedObjects_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 4usize);
self._bitfield_1 |= (val as u8) << 4usize;
}
pub fn set_werror_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 5usize);
self._bitfield_1 |= (val as u8) << 5usize;
}
pub fn set_strictMode_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 6usize);
self._bitfield_1 |= (val as u8) << 6usize;
}
pub fn set_extraWarnings_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 7usize);
self._bitfield_1 |= (val as u8) << 7usize;
}
pub const fn new_bitfield_1(baseline_: bool, ion_: bool, asmJS_: bool,
nativeRegExp_: bool, unboxedObjects_: bool,
werror_: bool, strictMode_: bool,
extraWarnings_: bool) -> u8 {
0 | ((baseline_ as u8) << 0u32) | ((ion_ as u8) << 1u32) |
((asmJS_ as u8) << 2u32) | ((nativeRegExp_ as u8) << 3u32) |
((unboxedObjects_ as u8) << 4u32) | ((werror_ as u8) << 5u32) |
((strictMode_ as u8) << 6u32) | ((extraWarnings_ as u8) << 7u32)
}
pub fn set_varObjFix_(&mut self, val: bool) {
self._bitfield_2 &= !(((1 << 1u32) - 1) << 0usize);
self._bitfield_2 |= (val as u8) << 0usize;
}
pub const fn new_bitfield_2(varObjFix_: bool) -> u8 {
0 | ((varObjFix_ as u8) << 0u32)
}
}
extern "C" {
fn _ZNK2JS14RuntimeOptions8baselineEv(this: *mut RuntimeOptions) -> bool;
fn _ZN2JS14RuntimeOptions11setBaselineEb(this: *mut RuntimeOptions,
flag: bool)
-> *mut RuntimeOptions;
fn _ZN2JS14RuntimeOptions14toggleBaselineEv(this: *mut RuntimeOptions)
-> *mut RuntimeOptions;
fn _ZNK2JS14RuntimeOptions3ionEv(this: *mut RuntimeOptions) -> bool;
fn _ZN2JS14RuntimeOptions6setIonEb(this: *mut RuntimeOptions, flag: bool)
-> *mut RuntimeOptions;
fn _ZN2JS14RuntimeOptions9toggleIonEv(this: *mut RuntimeOptions)
-> *mut RuntimeOptions;
fn _ZNK2JS14RuntimeOptions5asmJSEv(this: *mut RuntimeOptions) -> bool;
fn _ZN2JS14RuntimeOptions8setAsmJSEb(this: *mut RuntimeOptions,
flag: bool) -> *mut RuntimeOptions;
fn _ZN2JS14RuntimeOptions11toggleAsmJSEv(this: *mut RuntimeOptions)
-> *mut RuntimeOptions;
fn _ZNK2JS14RuntimeOptions12nativeRegExpEv(this: *mut RuntimeOptions)
-> bool;
fn _ZN2JS14RuntimeOptions15setNativeRegExpEb(this: *mut RuntimeOptions,
flag: bool)
-> *mut RuntimeOptions;
fn _ZNK2JS14RuntimeOptions14unboxedObjectsEv(this: *mut RuntimeOptions)
-> bool;
fn _ZN2JS14RuntimeOptions17setUnboxedObjectsEb(this: *mut RuntimeOptions,
flag: bool)
-> *mut RuntimeOptions;
fn _ZNK2JS14RuntimeOptions6werrorEv(this: *mut RuntimeOptions) -> bool;
fn _ZN2JS14RuntimeOptions9setWerrorEb(this: *mut RuntimeOptions,
flag: bool) -> *mut RuntimeOptions;
fn _ZN2JS14RuntimeOptions12toggleWerrorEv(this: *mut RuntimeOptions)
-> *mut RuntimeOptions;
fn _ZNK2JS14RuntimeOptions10strictModeEv(this: *mut RuntimeOptions)
-> bool;
fn _ZN2JS14RuntimeOptions13setStrictModeEb(this: *mut RuntimeOptions,
flag: bool)
-> *mut RuntimeOptions;
fn _ZN2JS14RuntimeOptions16toggleStrictModeEv(this: *mut RuntimeOptions)
-> *mut RuntimeOptions;
fn _ZNK2JS14RuntimeOptions13extraWarningsEv(this: *mut RuntimeOptions)
-> bool;
fn _ZN2JS14RuntimeOptions16setExtraWarningsEb(this: *mut RuntimeOptions,
flag: bool)
-> *mut RuntimeOptions;
fn _ZN2JS14RuntimeOptions19toggleExtraWarningsEv(this:
*mut RuntimeOptions)
-> *mut RuntimeOptions;
fn _ZNK2JS14RuntimeOptions9varObjFixEv(this: *mut RuntimeOptions) -> bool;
fn _ZN2JS14RuntimeOptions12setVarObjFixEb(this: *mut RuntimeOptions,
flag: bool)
-> *mut RuntimeOptions;
fn _ZN2JS14RuntimeOptions15toggleVarObjFixEv(this: *mut RuntimeOptions)
-> *mut RuntimeOptions;
}
impl RuntimeOptions {
#[inline]
pub unsafe extern "C" fn baseline(&mut self) -> bool {
_ZNK2JS14RuntimeOptions8baselineEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setBaseline(&mut self, flag: bool)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions11setBaselineEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn toggleBaseline(&mut self)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions14toggleBaselineEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn ion(&mut self) -> bool {
_ZNK2JS14RuntimeOptions3ionEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setIon(&mut self, flag: bool)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions6setIonEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn toggleIon(&mut self) -> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions9toggleIonEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn asmJS(&mut self) -> bool {
_ZNK2JS14RuntimeOptions5asmJSEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setAsmJS(&mut self, flag: bool)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions8setAsmJSEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn toggleAsmJS(&mut self) -> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions11toggleAsmJSEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn nativeRegExp(&mut self) -> bool {
_ZNK2JS14RuntimeOptions12nativeRegExpEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setNativeRegExp(&mut self, flag: bool)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions15setNativeRegExpEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn unboxedObjects(&mut self) -> bool {
_ZNK2JS14RuntimeOptions14unboxedObjectsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setUnboxedObjects(&mut self, flag: bool)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions17setUnboxedObjectsEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn werror(&mut self) -> bool {
_ZNK2JS14RuntimeOptions6werrorEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setWerror(&mut self, flag: bool)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions9setWerrorEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn toggleWerror(&mut self) -> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions12toggleWerrorEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn strictMode(&mut self) -> bool {
_ZNK2JS14RuntimeOptions10strictModeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setStrictMode(&mut self, flag: bool)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions13setStrictModeEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn toggleStrictMode(&mut self)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions16toggleStrictModeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn extraWarnings(&mut self) -> bool {
_ZNK2JS14RuntimeOptions13extraWarningsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setExtraWarnings(&mut self, flag: bool)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions16setExtraWarningsEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn toggleExtraWarnings(&mut self)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions19toggleExtraWarningsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn varObjFix(&mut self) -> bool {
_ZNK2JS14RuntimeOptions9varObjFixEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setVarObjFix(&mut self, flag: bool)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions12setVarObjFixEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn toggleVarObjFix(&mut self)
-> *mut RuntimeOptions {
_ZN2JS14RuntimeOptions15toggleVarObjFixEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ContextOptions {
pub _bitfield_1: u8,
}
impl ::std::default::Default for ContextOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
impl ContextOptions {
pub fn set_privateIsNSISupports_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 0usize);
self._bitfield_1 |= (val as u8) << 0usize;
}
pub fn set_dontReportUncaught_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 1usize);
self._bitfield_1 |= (val as u8) << 1usize;
}
pub fn set_autoJSAPIOwnsErrorReporting_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 2usize);
self._bitfield_1 |= (val as u8) << 2usize;
}
pub const fn new_bitfield_1(privateIsNSISupports_: bool,
dontReportUncaught_: bool,
autoJSAPIOwnsErrorReporting_: bool) -> u8 {
0 | ((privateIsNSISupports_ as u8) << 0u32) |
((dontReportUncaught_ as u8) << 1u32) |
((autoJSAPIOwnsErrorReporting_ as u8) << 2u32)
}
}
extern "C" {
fn _ZNK2JS14ContextOptions20privateIsNSISupportsEv(this:
*mut ContextOptions)
-> bool;
fn _ZN2JS14ContextOptions23setPrivateIsNSISupportsEb(this:
*mut ContextOptions,
flag: bool)
-> *mut ContextOptions;
fn _ZN2JS14ContextOptions26togglePrivateIsNSISupportsEv(this:
*mut ContextOptions)
-> *mut ContextOptions;
fn _ZNK2JS14ContextOptions18dontReportUncaughtEv(this:
*mut ContextOptions)
-> bool;
fn _ZN2JS14ContextOptions21setDontReportUncaughtEb(this:
*mut ContextOptions,
flag: bool)
-> *mut ContextOptions;
fn _ZN2JS14ContextOptions24toggleDontReportUncaughtEv(this:
*mut ContextOptions)
-> *mut ContextOptions;
fn _ZNK2JS14ContextOptions27autoJSAPIOwnsErrorReportingEv(this:
*mut ContextOptions)
-> bool;
fn _ZN2JS14ContextOptions30setAutoJSAPIOwnsErrorReportingEb(this:
*mut ContextOptions,
flag: bool)
-> *mut ContextOptions;
fn _ZN2JS14ContextOptions33toggleAutoJSAPIOwnsErrorReportingEv(this:
*mut ContextOptions)
-> *mut ContextOptions;
}
impl ContextOptions {
#[inline]
pub unsafe extern "C" fn privateIsNSISupports(&mut self) -> bool {
_ZNK2JS14ContextOptions20privateIsNSISupportsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setPrivateIsNSISupports(&mut self, flag: bool)
-> *mut ContextOptions {
_ZN2JS14ContextOptions23setPrivateIsNSISupportsEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn togglePrivateIsNSISupports(&mut self)
-> *mut ContextOptions {
_ZN2JS14ContextOptions26togglePrivateIsNSISupportsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn dontReportUncaught(&mut self) -> bool {
_ZNK2JS14ContextOptions18dontReportUncaughtEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setDontReportUncaught(&mut self, flag: bool)
-> *mut ContextOptions {
_ZN2JS14ContextOptions21setDontReportUncaughtEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn toggleDontReportUncaught(&mut self)
-> *mut ContextOptions {
_ZN2JS14ContextOptions24toggleDontReportUncaughtEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn autoJSAPIOwnsErrorReporting(&mut self) -> bool {
_ZNK2JS14ContextOptions27autoJSAPIOwnsErrorReportingEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setAutoJSAPIOwnsErrorReporting(&mut self,
flag: bool)
-> *mut ContextOptions {
_ZN2JS14ContextOptions30setAutoJSAPIOwnsErrorReportingEb(&mut *self,
flag)
}
#[inline]
pub unsafe extern "C" fn toggleAutoJSAPIOwnsErrorReporting(&mut self)
-> *mut ContextOptions {
_ZN2JS14ContextOptions33toggleAutoJSAPIOwnsErrorReportingEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoSaveContextOptions {
pub cx_: *mut JSContext,
pub oldOptions_: ContextOptions,
}
impl ::std::default::Default for AutoSaveContextOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSAutoCompartment {
pub cx_: *mut JSContext,
pub oldCompartment_: *mut JSCompartment,
}
impl ::std::default::Default for JSAutoCompartment {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSAutoNullableCompartment {
pub cx_: *mut JSContext,
pub oldCompartment_: *mut JSCompartment,
}
impl ::std::default::Default for JSAutoNullableCompartment {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type JSIterateCompartmentCallback =
::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime,
data: *mut ::libc::c_void,
compartment:
*mut JSCompartment)>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSGCParamKey {
JSGC_MAX_BYTES = 0,
JSGC_MAX_MALLOC_BYTES = 1,
JSGC_BYTES = 3,
JSGC_NUMBER = 4,
JSGC_MAX_CODE_CACHE_BYTES = 5,
JSGC_MODE = 6,
JSGC_UNUSED_CHUNKS = 7,
JSGC_TOTAL_CHUNKS = 8,
JSGC_SLICE_TIME_BUDGET = 9,
JSGC_MARK_STACK_LIMIT = 10,
JSGC_HIGH_FREQUENCY_TIME_LIMIT = 11,
JSGC_HIGH_FREQUENCY_LOW_LIMIT = 12,
JSGC_HIGH_FREQUENCY_HIGH_LIMIT = 13,
JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX = 14,
JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN = 15,
JSGC_LOW_FREQUENCY_HEAP_GROWTH = 16,
JSGC_DYNAMIC_HEAP_GROWTH = 17,
JSGC_DYNAMIC_MARK_SLICE = 18,
JSGC_ALLOCATION_THRESHOLD = 19,
JSGC_DECOMMIT_THRESHOLD = 20,
JSGC_MIN_EMPTY_CHUNK_COUNT = 21,
JSGC_MAX_EMPTY_CHUNK_COUNT = 22,
JSGC_COMPACTING_ENABLED = 23,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoIdArray {
pub _base: AutoGCRooter,
pub context: *mut JSContext,
pub idArray: *mut JSIdArray,
}
impl ::std::default::Default for AutoIdArray {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSConstScalarSpec<T> {
pub name: *const ::libc::c_char,
pub val: T,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSNativeWrapper {
pub op: JSNative,
pub info: *const JSJitInfo,
}
impl ::std::default::Default for JSNativeWrapper {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSPropertySpec {
pub name: *const ::libc::c_char,
pub flags: u8,
pub getter: jsapi_h_unnamed_4,
pub setter: jsapi_h_unnamed_5,
}
impl ::std::default::Default for JSPropertySpec {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SelfHostedWrapper {
pub unused: *mut ::libc::c_void,
pub funname: *const ::libc::c_char,
}
impl ::std::default::Default for SelfHostedWrapper {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct jsapi_h_unnamed_4 {
pub _bindgen_data_: [u64; 2usize],
}
impl jsapi_h_unnamed_4 {
pub unsafe fn native(&mut self) -> *mut JSNativeWrapper {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn selfHosted(&mut self) -> *mut SelfHostedWrapper {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::default::Default for jsapi_h_unnamed_4 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct jsapi_h_unnamed_5 {
pub _bindgen_data_: [u64; 2usize],
}
impl jsapi_h_unnamed_5 {
pub unsafe fn native(&mut self) -> *mut JSNativeWrapper {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn selfHosted(&mut self) -> *mut SelfHostedWrapper {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::default::Default for jsapi_h_unnamed_5 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSFunctionSpec {
pub name: *const ::libc::c_char,
pub call: JSNativeWrapper,
pub nargs: u16,
pub flags: u16,
pub selfHostedName: *const ::libc::c_char,
}
impl ::std::default::Default for JSFunctionSpec {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum ZoneSpecifier { FreshZone = 0, SystemZone = 1, }
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CompartmentOptions {
pub version_: JSVersion,
pub invisibleToDebugger_: bool,
pub mergeable_: bool,
pub discardSource_: bool,
pub cloneSingletons_: bool,
pub extraWarningsOverride_: Override,
pub zone_: jsapi_h_unnamed_6,
pub traceGlobal_: JSTraceOp,
pub singletonsAsTemplates_: bool,
pub addonId_: *mut JSAddonId,
pub preserveJitCode_: bool,
}
impl ::std::default::Default for CompartmentOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct jsapi_h_unnamed_6 {
pub _bindgen_data_: u64,
}
impl jsapi_h_unnamed_6 {
pub unsafe fn spec(&mut self) -> *mut ZoneSpecifier {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn pointer(&mut self) -> *mut *mut ::libc::c_void {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::default::Default for jsapi_h_unnamed_6 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2JS18CompartmentOptions7versionEv(this: *mut CompartmentOptions)
-> JSVersion;
fn _ZN2JS18CompartmentOptions10setVersionE9JSVersion(this:
*mut CompartmentOptions,
aVersion: JSVersion)
-> *mut CompartmentOptions;
fn _ZNK2JS18CompartmentOptions19invisibleToDebuggerEv(this:
*mut CompartmentOptions)
-> bool;
fn _ZN2JS18CompartmentOptions22setInvisibleToDebuggerEb(this:
*mut CompartmentOptions,
flag: bool)
-> *mut CompartmentOptions;
fn _ZNK2JS18CompartmentOptions9mergeableEv(this: *mut CompartmentOptions)
-> bool;
fn _ZN2JS18CompartmentOptions12setMergeableEb(this:
*mut CompartmentOptions,
flag: bool)
-> *mut CompartmentOptions;
fn _ZNK2JS18CompartmentOptions13discardSourceEv(this:
*mut CompartmentOptions)
-> bool;
fn _ZN2JS18CompartmentOptions16setDiscardSourceEb(this:
*mut CompartmentOptions,
flag: bool)
-> *mut CompartmentOptions;
fn _ZNK2JS18CompartmentOptions15cloneSingletonsEv(this:
*mut CompartmentOptions)
-> bool;
fn _ZN2JS18CompartmentOptions18setCloneSingletonsEb(this:
*mut CompartmentOptions,
flag: bool)
-> *mut CompartmentOptions;
fn _ZNK2JS18CompartmentOptions13extraWarningsEP9JSRuntime(this:
*mut CompartmentOptions,
rt:
*mut JSRuntime)
-> bool;
fn _ZNK2JS18CompartmentOptions13extraWarningsEP9JSContext(this:
*mut CompartmentOptions,
cx:
*mut JSContext)
-> bool;
fn _ZN2JS18CompartmentOptions21extraWarningsOverrideEv(this:
*mut CompartmentOptions)
-> *mut Override;
fn _ZNK2JS18CompartmentOptions11zonePointerEv(this:
*mut CompartmentOptions)
-> *mut ::libc::c_void;
fn _ZNK2JS18CompartmentOptions13zoneSpecifierEv(this:
*mut CompartmentOptions)
-> ZoneSpecifier;
fn _ZN2JS18CompartmentOptions7setZoneENS_13ZoneSpecifierE(this:
*mut CompartmentOptions,
spec:
ZoneSpecifier)
-> *mut CompartmentOptions;
fn _ZN2JS18CompartmentOptions13setSameZoneAsEP8JSObject(this:
*mut CompartmentOptions,
obj:
*mut JSObject)
-> *mut CompartmentOptions;
fn _ZN2JS18CompartmentOptions21setSingletonsAsValuesEv(this:
*mut CompartmentOptions);
fn _ZNK2JS18CompartmentOptions24getSingletonsAsTemplatesEv(this:
*mut CompartmentOptions)
-> bool;
fn _ZNK2JS18CompartmentOptions13addonIdOrNullEv(this:
*mut CompartmentOptions)
-> *mut JSAddonId;
fn _ZN2JS18CompartmentOptions10setAddonIdEP9JSAddonId(this:
*mut CompartmentOptions,
id: *mut JSAddonId)
-> *mut CompartmentOptions;
fn _ZN2JS18CompartmentOptions8setTraceEPFvP8JSTracerP8JSObjectE(this:
*mut CompartmentOptions,
op:
JSTraceOp)
-> *mut CompartmentOptions;
fn _ZNK2JS18CompartmentOptions8getTraceEv(this: *mut CompartmentOptions)
-> JSTraceOp;
fn _ZNK2JS18CompartmentOptions15preserveJitCodeEv(this:
*mut CompartmentOptions)
-> bool;
fn _ZN2JS18CompartmentOptions18setPreserveJitCodeEb(this:
*mut CompartmentOptions,
flag: bool)
-> *mut CompartmentOptions;
}
impl CompartmentOptions {
#[inline]
pub unsafe extern "C" fn version(&mut self) -> JSVersion {
_ZNK2JS18CompartmentOptions7versionEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setVersion(&mut self, aVersion: JSVersion)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions10setVersionE9JSVersion(&mut *self,
aVersion)
}
#[inline]
pub unsafe extern "C" fn invisibleToDebugger(&mut self) -> bool {
_ZNK2JS18CompartmentOptions19invisibleToDebuggerEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setInvisibleToDebugger(&mut self, flag: bool)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions22setInvisibleToDebuggerEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn mergeable(&mut self) -> bool {
_ZNK2JS18CompartmentOptions9mergeableEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setMergeable(&mut self, flag: bool)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions12setMergeableEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn discardSource(&mut self) -> bool {
_ZNK2JS18CompartmentOptions13discardSourceEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setDiscardSource(&mut self, flag: bool)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions16setDiscardSourceEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn cloneSingletons(&mut self) -> bool {
_ZNK2JS18CompartmentOptions15cloneSingletonsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setCloneSingletons(&mut self, flag: bool)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions18setCloneSingletonsEb(&mut *self, flag)
}
#[inline]
pub unsafe extern "C" fn extraWarnings(&mut self, rt: *mut JSRuntime)
-> bool {
_ZNK2JS18CompartmentOptions13extraWarningsEP9JSRuntime(&mut *self, rt)
}
#[inline]
pub unsafe extern "C" fn extraWarnings1(&mut self, cx: *mut JSContext)
-> bool {
_ZNK2JS18CompartmentOptions13extraWarningsEP9JSContext(&mut *self, cx)
}
#[inline]
pub unsafe extern "C" fn extraWarningsOverride(&mut self)
-> *mut Override {
_ZN2JS18CompartmentOptions21extraWarningsOverrideEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn zonePointer(&mut self) -> *mut ::libc::c_void {
_ZNK2JS18CompartmentOptions11zonePointerEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn zoneSpecifier(&mut self) -> ZoneSpecifier {
_ZNK2JS18CompartmentOptions13zoneSpecifierEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setZone(&mut self, spec: ZoneSpecifier)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions7setZoneENS_13ZoneSpecifierE(&mut *self,
spec)
}
#[inline]
pub unsafe extern "C" fn setSameZoneAs(&mut self, obj: *mut JSObject)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions13setSameZoneAsEP8JSObject(&mut *self, obj)
}
#[inline]
pub unsafe extern "C" fn setSingletonsAsValues(&mut self) {
_ZN2JS18CompartmentOptions21setSingletonsAsValuesEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn getSingletonsAsTemplates(&mut self) -> bool {
_ZNK2JS18CompartmentOptions24getSingletonsAsTemplatesEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn addonIdOrNull(&mut self) -> *mut JSAddonId {
_ZNK2JS18CompartmentOptions13addonIdOrNullEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setAddonId(&mut self, id: *mut JSAddonId)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions10setAddonIdEP9JSAddonId(&mut *self, id)
}
#[inline]
pub unsafe extern "C" fn setTrace(&mut self, op: JSTraceOp)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions8setTraceEPFvP8JSTracerP8JSObjectE(&mut *self,
op)
}
#[inline]
pub unsafe extern "C" fn getTrace(&mut self) -> JSTraceOp {
_ZNK2JS18CompartmentOptions8getTraceEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn preserveJitCode(&mut self) -> bool {
_ZNK2JS18CompartmentOptions15preserveJitCodeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setPreserveJitCode(&mut self, flag: bool)
-> *mut CompartmentOptions {
_ZN2JS18CompartmentOptions18setPreserveJitCodeEb(&mut *self, flag)
}
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum OnNewGlobalHookOption {
FireOnNewGlobalHook = 0,
DontFireOnNewGlobalHook = 1,
}
/*** Property descriptors ************************************************************************/
#[repr(C)]
pub struct JSPropertyDescriptor {
pub obj: *mut JSObject,
pub attrs: u32,
pub getter: JSGetterOp,
pub setter: JSSetterOp,
pub value: Value,
}
impl ::std::default::Default for JSPropertyDescriptor {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PropertyDescriptorOperations<Outer> {
pub _phantom0: PhantomData<Outer>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MutablePropertyDescriptorOperations<Outer> {
pub _base: PropertyDescriptorOperations<Outer>,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum PropertyDefinitionBehavior {
DefineAllProperties = 0,
OnlyDefineLateProperties = 1,
DontDefineLateProperties = 2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ReadOnlyCompileOptions {
pub _vftable: *const _vftable_ReadOnlyCompileOptions,
pub mutedErrors_: bool,
pub filename_: *const ::libc::c_char,
pub introducerFilename_: *const ::libc::c_char,
pub sourceMapURL_: *const u16,
pub version: JSVersion,
pub versionSet: bool,
pub utf8: bool,
pub lineno: u32,
pub column: u32,
pub compileAndGo: bool,
pub hasPollutedGlobalScope: bool,
pub forEval: bool,
pub noScriptRval: bool,
pub selfHostingMode: bool,
pub canLazilyParse: bool,
pub strictOption: bool,
pub extraWarningsOption: bool,
pub werrorOption: bool,
pub asmJSOption: bool,
pub forceAsync: bool,
pub installedFile: bool,
pub sourceIsLazy: bool,
pub introductionType: *const ::libc::c_char,
pub introductionLineno: u32,
pub introductionOffset: u32,
pub hasIntroductionInfo: bool,
}
impl ::std::default::Default for ReadOnlyCompileOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_ReadOnlyCompileOptions {
pub element: extern "C" fn(this: *mut ::libc::c_void) -> *mut JSObject,
pub elementAttributeName: extern "C" fn(this: *mut ::libc::c_void)
-> *mut JSString,
pub introductionScript: extern "C" fn(this: *mut ::libc::c_void)
-> *mut JSScript,
}
extern "C" {
fn _ZN2JS22ReadOnlyCompileOptions14copyPODOptionsERKS0_(this:
*mut ReadOnlyCompileOptions,
rhs:
&ReadOnlyCompileOptions);
fn _ZNK2JS22ReadOnlyCompileOptions11mutedErrorsEv(this:
*mut ReadOnlyCompileOptions)
-> bool;
fn _ZNK2JS22ReadOnlyCompileOptions8filenameEv(this:
*mut ReadOnlyCompileOptions)
-> *const ::libc::c_char;
fn _ZNK2JS22ReadOnlyCompileOptions18introducerFilenameEv(this:
*mut ReadOnlyCompileOptions)
-> *const ::libc::c_char;
fn _ZNK2JS22ReadOnlyCompileOptions12sourceMapURLEv(this:
*mut ReadOnlyCompileOptions)
-> *const u16;
}
impl ReadOnlyCompileOptions {
#[inline]
pub unsafe extern "C" fn copyPODOptions(&mut self,
rhs: &ReadOnlyCompileOptions) {
_ZN2JS22ReadOnlyCompileOptions14copyPODOptionsERKS0_(&mut *self, rhs)
}
#[inline]
pub unsafe extern "C" fn mutedErrors(&mut self) -> bool {
_ZNK2JS22ReadOnlyCompileOptions11mutedErrorsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn filename(&mut self) -> *const ::libc::c_char {
_ZNK2JS22ReadOnlyCompileOptions8filenameEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn introducerFilename(&mut self)
-> *const ::libc::c_char {
_ZNK2JS22ReadOnlyCompileOptions18introducerFilenameEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn sourceMapURL(&mut self) -> *const u16 {
_ZNK2JS22ReadOnlyCompileOptions12sourceMapURLEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct OwningCompileOptions {
pub _base: ReadOnlyCompileOptions,
pub runtime: *mut JSRuntime,
pub elementRoot: PersistentRootedObject,
pub elementAttributeNameRoot: PersistentRootedString,
pub introductionScriptRoot: PersistentRootedScript,
}
impl ::std::default::Default for OwningCompileOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_OwningCompileOptions {
pub _base: _vftable_ReadOnlyCompileOptions,
}
extern "C" {
fn _ZN2JS20OwningCompileOptions4copyEP9JSContextRKNS_22ReadOnlyCompileOptionsE(this:
*mut OwningCompileOptions,
cx:
*mut JSContext,
rhs:
&ReadOnlyCompileOptions)
-> bool;
fn _ZN2JS20OwningCompileOptions7setFileEP9JSContextPKc(this:
*mut OwningCompileOptions,
cx: *mut JSContext,
f:
*const ::libc::c_char)
-> bool;
fn _ZN2JS20OwningCompileOptions14setFileAndLineEP9JSContextPKcj(this:
*mut OwningCompileOptions,
cx:
*mut JSContext,
f:
*const ::libc::c_char,
l: u32)
-> bool;
fn _ZN2JS20OwningCompileOptions15setSourceMapURLEP9JSContextPKDs(this:
*mut OwningCompileOptions,
cx:
*mut JSContext,
s:
*const u16)
-> bool;
fn _ZN2JS20OwningCompileOptions21setIntroducerFilenameEP9JSContextPKc(this:
*mut OwningCompileOptions,
cx:
*mut JSContext,
s:
*const ::libc::c_char)
-> bool;
fn _ZN2JS20OwningCompileOptions7setLineEj(this: *mut OwningCompileOptions,
l: u32)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions10setElementEP8JSObject(this:
*mut OwningCompileOptions,
e: *mut JSObject)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions23setElementAttributeNameEP8JSString(this:
*mut OwningCompileOptions,
p:
*mut JSString)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions21setIntroductionScriptEP8JSScript(this:
*mut OwningCompileOptions,
s:
*mut JSScript)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions14setMutedErrorsEb(this:
*mut OwningCompileOptions,
mute: bool)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions10setVersionE9JSVersion(this:
*mut OwningCompileOptions,
v: JSVersion)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions7setUTF8Eb(this: *mut OwningCompileOptions,
u: bool)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions9setColumnEj(this:
*mut OwningCompileOptions,
c: u32)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions15setCompileAndGoEb(this:
*mut OwningCompileOptions,
cng: bool)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions19setHasPollutedScopeEb(this:
*mut OwningCompileOptions,
p: bool)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions10setForEvalEb(this:
*mut OwningCompileOptions,
eval: bool)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions15setNoScriptRvalEb(this:
*mut OwningCompileOptions,
nsr: bool)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions18setSelfHostingModeEb(this:
*mut OwningCompileOptions,
shm: bool)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions17setCanLazilyParseEb(this:
*mut OwningCompileOptions,
clp: bool)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions15setSourceIsLazyEb(this:
*mut OwningCompileOptions,
l: bool)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions19setIntroductionTypeEPKc(this:
*mut OwningCompileOptions,
t:
*const ::libc::c_char)
-> *mut OwningCompileOptions;
fn _ZN2JS20OwningCompileOptions19setIntroductionInfoEP9JSContextPKcS4_jP8JSScriptj(this:
*mut OwningCompileOptions,
cx:
*mut JSContext,
introducerFn:
*const ::libc::c_char,
intro:
*const ::libc::c_char,
line:
u32,
script:
*mut JSScript,
offset:
u32)
-> bool;
}
impl OwningCompileOptions {
#[inline]
pub unsafe extern "C" fn copy(&mut self, cx: *mut JSContext,
rhs: &ReadOnlyCompileOptions) -> bool {
_ZN2JS20OwningCompileOptions4copyEP9JSContextRKNS_22ReadOnlyCompileOptionsE(&mut *self,
cx,
rhs)
}
#[inline]
pub unsafe extern "C" fn setFile(&mut self, cx: *mut JSContext,
f: *const ::libc::c_char) -> bool {
_ZN2JS20OwningCompileOptions7setFileEP9JSContextPKc(&mut *self, cx, f)
}
#[inline]
pub unsafe extern "C" fn setFileAndLine(&mut self, cx: *mut JSContext,
f: *const ::libc::c_char, l: u32)
-> bool {
_ZN2JS20OwningCompileOptions14setFileAndLineEP9JSContextPKcj(&mut *self,
cx, f, l)
}
#[inline]
pub unsafe extern "C" fn setSourceMapURL(&mut self, cx: *mut JSContext,
s: *const u16) -> bool {
_ZN2JS20OwningCompileOptions15setSourceMapURLEP9JSContextPKDs(&mut *self,
cx, s)
}
#[inline]
pub unsafe extern "C" fn setIntroducerFilename(&mut self,
cx: *mut JSContext,
s: *const ::libc::c_char)
-> bool {
_ZN2JS20OwningCompileOptions21setIntroducerFilenameEP9JSContextPKc(&mut *self,
cx,
s)
}
#[inline]
pub unsafe extern "C" fn setLine(&mut self, l: u32)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions7setLineEj(&mut *self, l)
}
#[inline]
pub unsafe extern "C" fn setElement(&mut self, e: *mut JSObject)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions10setElementEP8JSObject(&mut *self, e)
}
#[inline]
pub unsafe extern "C" fn setElementAttributeName(&mut self,
p: *mut JSString)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions23setElementAttributeNameEP8JSString(&mut *self,
p)
}
#[inline]
pub unsafe extern "C" fn setIntroductionScript(&mut self,
s: *mut JSScript)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions21setIntroductionScriptEP8JSScript(&mut *self,
s)
}
#[inline]
pub unsafe extern "C" fn setMutedErrors(&mut self, mute: bool)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions14setMutedErrorsEb(&mut *self, mute)
}
#[inline]
pub unsafe extern "C" fn setVersion(&mut self, v: JSVersion)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions10setVersionE9JSVersion(&mut *self, v)
}
#[inline]
pub unsafe extern "C" fn setUTF8(&mut self, u: bool)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions7setUTF8Eb(&mut *self, u)
}
#[inline]
pub unsafe extern "C" fn setColumn(&mut self, c: u32)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions9setColumnEj(&mut *self, c)
}
#[inline]
pub unsafe extern "C" fn setCompileAndGo(&mut self, cng: bool)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions15setCompileAndGoEb(&mut *self, cng)
}
#[inline]
pub unsafe extern "C" fn setHasPollutedScope(&mut self, p: bool)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions19setHasPollutedScopeEb(&mut *self, p)
}
#[inline]
pub unsafe extern "C" fn setForEval(&mut self, eval: bool)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions10setForEvalEb(&mut *self, eval)
}
#[inline]
pub unsafe extern "C" fn setNoScriptRval(&mut self, nsr: bool)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions15setNoScriptRvalEb(&mut *self, nsr)
}
#[inline]
pub unsafe extern "C" fn setSelfHostingMode(&mut self, shm: bool)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions18setSelfHostingModeEb(&mut *self, shm)
}
#[inline]
pub unsafe extern "C" fn setCanLazilyParse(&mut self, clp: bool)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions17setCanLazilyParseEb(&mut *self, clp)
}
#[inline]
pub unsafe extern "C" fn setSourceIsLazy(&mut self, l: bool)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions15setSourceIsLazyEb(&mut *self, l)
}
#[inline]
pub unsafe extern "C" fn setIntroductionType(&mut self,
t: *const ::libc::c_char)
-> *mut OwningCompileOptions {
_ZN2JS20OwningCompileOptions19setIntroductionTypeEPKc(&mut *self, t)
}
#[inline]
pub unsafe extern "C" fn setIntroductionInfo(&mut self,
cx: *mut JSContext,
introducerFn:
*const ::libc::c_char,
intro: *const ::libc::c_char,
line: u32,
script: *mut JSScript,
offset: u32) -> bool {
_ZN2JS20OwningCompileOptions19setIntroductionInfoEP9JSContextPKcS4_jP8JSScriptj(&mut *self,
cx,
introducerFn,
intro,
line,
script,
offset)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CompileOptions {
pub _base: ReadOnlyCompileOptions,
pub elementRoot: RootedObject,
pub elementAttributeNameRoot: RootedString,
pub introductionScriptRoot: RootedScript,
}
impl ::std::default::Default for CompileOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_CompileOptions {
pub _base: _vftable_ReadOnlyCompileOptions,
}
extern "C" {
fn _ZN2JS14CompileOptions7setFileEPKc(this: *mut CompileOptions,
f: *const ::libc::c_char)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions7setLineEj(this: *mut CompileOptions, l: u32)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions14setFileAndLineEPKcj(this: *mut CompileOptions,
f: *const ::libc::c_char,
l: u32)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions15setSourceMapURLEPKDs(this: *mut CompileOptions,
s: *const u16)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions10setElementEP8JSObject(this:
*mut CompileOptions,
e: *mut JSObject)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions23setElementAttributeNameEP8JSString(this:
*mut CompileOptions,
p:
*mut JSString)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions21setIntroductionScriptEP8JSScript(this:
*mut CompileOptions,
s:
*mut JSScript)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions14setMutedErrorsEb(this: *mut CompileOptions,
mute: bool)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions10setVersionE9JSVersion(this:
*mut CompileOptions,
v: JSVersion)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions7setUTF8Eb(this: *mut CompileOptions, u: bool)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions9setColumnEj(this: *mut CompileOptions, c: u32)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions15setCompileAndGoEb(this: *mut CompileOptions,
cng: bool)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions19setHasPollutedScopeEb(this:
*mut CompileOptions,
p: bool)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions10setForEvalEb(this: *mut CompileOptions,
eval: bool)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions15setNoScriptRvalEb(this: *mut CompileOptions,
nsr: bool)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions18setSelfHostingModeEb(this: *mut CompileOptions,
shm: bool)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions17setCanLazilyParseEb(this: *mut CompileOptions,
clp: bool)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions15setSourceIsLazyEb(this: *mut CompileOptions,
l: bool)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions19setIntroductionTypeEPKc(this:
*mut CompileOptions,
t:
*const ::libc::c_char)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions19setIntroductionInfoEPKcS2_jP8JSScriptj(this:
*mut CompileOptions,
introducerFn:
*const ::libc::c_char,
intro:
*const ::libc::c_char,
line:
u32,
script:
*mut JSScript,
offset:
u32)
-> *mut CompileOptions;
fn _ZN2JS14CompileOptions19maybeMakeStrictModeEb(this:
*mut CompileOptions,
strict: bool)
-> *mut CompileOptions;
}
impl CompileOptions {
#[inline]
pub unsafe extern "C" fn setFile(&mut self, f: *const ::libc::c_char)
-> *mut CompileOptions {
_ZN2JS14CompileOptions7setFileEPKc(&mut *self, f)
}
#[inline]
pub unsafe extern "C" fn setLine(&mut self, l: u32)
-> *mut CompileOptions {
_ZN2JS14CompileOptions7setLineEj(&mut *self, l)
}
#[inline]
pub unsafe extern "C" fn setFileAndLine(&mut self,
f: *const ::libc::c_char, l: u32)
-> *mut CompileOptions {
_ZN2JS14CompileOptions14setFileAndLineEPKcj(&mut *self, f, l)
}
#[inline]
pub unsafe extern "C" fn setSourceMapURL(&mut self, s: *const u16)
-> *mut CompileOptions {
_ZN2JS14CompileOptions15setSourceMapURLEPKDs(&mut *self, s)
}
#[inline]
pub unsafe extern "C" fn setElement(&mut self, e: *mut JSObject)
-> *mut CompileOptions {
_ZN2JS14CompileOptions10setElementEP8JSObject(&mut *self, e)
}
#[inline]
pub unsafe extern "C" fn setElementAttributeName(&mut self,
p: *mut JSString)
-> *mut CompileOptions {
_ZN2JS14CompileOptions23setElementAttributeNameEP8JSString(&mut *self,
p)
}
#[inline]
pub unsafe extern "C" fn setIntroductionScript(&mut self,
s: *mut JSScript)
-> *mut CompileOptions {
_ZN2JS14CompileOptions21setIntroductionScriptEP8JSScript(&mut *self,
s)
}
#[inline]
pub unsafe extern "C" fn setMutedErrors(&mut self, mute: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions14setMutedErrorsEb(&mut *self, mute)
}
#[inline]
pub unsafe extern "C" fn setVersion(&mut self, v: JSVersion)
-> *mut CompileOptions {
_ZN2JS14CompileOptions10setVersionE9JSVersion(&mut *self, v)
}
#[inline]
pub unsafe extern "C" fn setUTF8(&mut self, u: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions7setUTF8Eb(&mut *self, u)
}
#[inline]
pub unsafe extern "C" fn setColumn(&mut self, c: u32)
-> *mut CompileOptions {
_ZN2JS14CompileOptions9setColumnEj(&mut *self, c)
}
#[inline]
pub unsafe extern "C" fn setCompileAndGo(&mut self, cng: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions15setCompileAndGoEb(&mut *self, cng)
}
#[inline]
pub unsafe extern "C" fn setHasPollutedScope(&mut self, p: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions19setHasPollutedScopeEb(&mut *self, p)
}
#[inline]
pub unsafe extern "C" fn setForEval(&mut self, eval: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions10setForEvalEb(&mut *self, eval)
}
#[inline]
pub unsafe extern "C" fn setNoScriptRval(&mut self, nsr: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions15setNoScriptRvalEb(&mut *self, nsr)
}
#[inline]
pub unsafe extern "C" fn setSelfHostingMode(&mut self, shm: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions18setSelfHostingModeEb(&mut *self, shm)
}
#[inline]
pub unsafe extern "C" fn setCanLazilyParse(&mut self, clp: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions17setCanLazilyParseEb(&mut *self, clp)
}
#[inline]
pub unsafe extern "C" fn setSourceIsLazy(&mut self, l: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions15setSourceIsLazyEb(&mut *self, l)
}
#[inline]
pub unsafe extern "C" fn setIntroductionType(&mut self,
t: *const ::libc::c_char)
-> *mut CompileOptions {
_ZN2JS14CompileOptions19setIntroductionTypeEPKc(&mut *self, t)
}
#[inline]
pub unsafe extern "C" fn setIntroductionInfo(&mut self,
introducerFn:
*const ::libc::c_char,
intro: *const ::libc::c_char,
line: u32,
script: *mut JSScript,
offset: u32)
-> *mut CompileOptions {
_ZN2JS14CompileOptions19setIntroductionInfoEPKcS2_jP8JSScriptj(&mut *self,
introducerFn,
intro,
line,
script,
offset)
}
#[inline]
pub unsafe extern "C" fn maybeMakeStrictMode(&mut self, strict: bool)
-> *mut CompileOptions {
_ZN2JS14CompileOptions19maybeMakeStrictModeEb(&mut *self, strict)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoSetAsyncStackForNewCalls {
pub cx: *mut JSContext,
pub oldAsyncStack: RootedObject,
pub oldAsyncCause: RootedString,
}
impl ::std::default::Default for AutoSetAsyncStackForNewCalls {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSAutoByteString {
pub mBytes: *mut ::libc::c_char,
}
impl ::std::default::Default for JSAutoByteString {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum SymbolCode {
iterator = 0,
InSymbolRegistry = -2,
UniqueSymbol = -1,
}
pub type JSONWriteCallback =
::std::option::Option<unsafe extern "C" fn(buf: *const u16, len: u32,
data: *mut ::libc::c_void)
-> bool>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSLocaleCallbacks {
pub localeToUpperCase: JSLocaleToUpperCase,
pub localeToLowerCase: JSLocaleToLowerCase,
pub localeCompare: JSLocaleCompare,
pub localeToUnicode: JSLocaleToUnicode,
}
impl ::std::default::Default for JSLocaleCallbacks {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSErrorReport {
pub filename: *const ::libc::c_char,
pub lineno: u32,
pub column: u32,
pub isMuted: bool,
pub linebuf: *const ::libc::c_char,
pub tokenptr: *const ::libc::c_char,
pub uclinebuf: *const u16,
pub uctokenptr: *const u16,
pub flags: u32,
pub errorNumber: u32,
pub ucmessage: *const u16,
pub messageArgs: *mut *const u16,
pub exnType: i16,
}
impl ::std::default::Default for JSErrorReport {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoSaveExceptionState {
pub context: *mut JSContext,
pub wasPropagatingForcedReturn: bool,
pub wasOverRecursed: bool,
pub wasThrowing: bool,
pub exceptionValue: RootedValue,
}
impl ::std::default::Default for AutoSaveExceptionState {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2JS22AutoSaveExceptionState4dropEv(this:
*mut AutoSaveExceptionState);
fn _ZN2JS22AutoSaveExceptionState7restoreEv(this:
*mut AutoSaveExceptionState);
}
impl AutoSaveExceptionState {
#[inline]
pub unsafe extern "C" fn drop(&mut self) {
_ZN2JS22AutoSaveExceptionState4dropEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn restore(&mut self) {
_ZN2JS22AutoSaveExceptionState7restoreEv(&mut *self)
}
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSJitCompilerOption {
JSJITCOMPILER_BASELINE_WARMUP_TRIGGER = 0,
JSJITCOMPILER_ION_WARMUP_TRIGGER = 1,
JSJITCOMPILER_ION_GVN_ENABLE = 2,
JSJITCOMPILER_ION_ENABLE = 3,
JSJITCOMPILER_BASELINE_ENABLE = 4,
JSJITCOMPILER_OFFTHREAD_COMPILATION_ENABLE = 5,
JSJITCOMPILER_SIGNALS_ENABLE = 6,
JSJITCOMPILER_NOT_AN_OPTION = 7,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoFilename {
pub scriptSource_: *mut ::libc::c_void,
}
impl ::std::default::Default for AutoFilename {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2JS12AutoFilename3getEv(this: *mut AutoFilename)
-> *const ::libc::c_char;
fn _ZN2JS12AutoFilename5resetEPv(this: *mut AutoFilename,
newScriptSource: *mut ::libc::c_void);
}
impl AutoFilename {
#[inline]
pub unsafe extern "C" fn get(&mut self) -> *const ::libc::c_char {
_ZNK2JS12AutoFilename3getEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn reset(&mut self,
newScriptSource: *mut ::libc::c_void) {
_ZN2JS12AutoFilename5resetEPv(&mut *self, newScriptSource)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoHideScriptedCaller {
pub mContext: *mut JSContext,
}
impl ::std::default::Default for AutoHideScriptedCaller {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type OpenAsmJSCacheEntryForReadOp =
::std::option::Option<unsafe extern "C" fn(global: HandleObject,
begin: *const u16,
limit: *const u16,
size: *mut size_t,
memory: *mut *const u8,
handle: *mut intptr_t)
-> bool>;
pub type CloseAsmJSCacheEntryForReadOp =
::std::option::Option<unsafe extern "C" fn(size: size_t,
memory: *const u8,
handle: intptr_t)>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum AsmJSCacheResult {
AsmJSCache_Success = 0,
AsmJSCache_ModuleTooSmall = 1,
AsmJSCache_SynchronousScript = 2,
AsmJSCache_QuotaExceeded = 3,
AsmJSCache_Disabled_Internal = 4,
AsmJSCache_Disabled_ShellFlags = 5,
AsmJSCache_Disabled_JitInspector = 6,
AsmJSCache_InternalError = 7,
AsmJSCache_LIMIT = 8,
}
pub type OpenAsmJSCacheEntryForWriteOp =
::std::option::Option<unsafe extern "C" fn(global: HandleObject,
installed: bool,
begin: *const u16,
end: *const u16, size: size_t,
memory: *mut *mut u8,
handle: *mut intptr_t)
-> AsmJSCacheResult>;
pub type CloseAsmJSCacheEntryForWriteOp =
::std::option::Option<unsafe extern "C" fn(size: size_t, memory: *mut u8,
handle: intptr_t)>;
pub type BuildIdCharVector = ::libc::c_void;
pub type BuildIdOp =
::std::option::Option<unsafe extern "C" fn(buildId:
*mut BuildIdCharVector)
-> bool>;
#[repr(C)]
pub struct AsmJSCacheOps {
pub openEntryForRead: OpenAsmJSCacheEntryForReadOp,
pub closeEntryForRead: CloseAsmJSCacheEntryForReadOp,
pub openEntryForWrite: OpenAsmJSCacheEntryForWriteOp,
pub closeEntryForWrite: CloseAsmJSCacheEntryForWriteOp,
pub buildId: BuildIdOp,
}
impl ::std::default::Default for AsmJSCacheOps {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ForOfIterator {
pub cx_: *mut JSContext,
pub iterator: RootedObject,
pub index: u32,
}
impl ::std::default::Default for ForOfIterator {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum NonIterableBehavior { ThrowOnNonIterable = 0, AllowNonIterable = 1, }
extern "C" {
fn _ZN2JS13ForOfIterator4initENS_6HandleINS_5ValueEEENS0_19NonIterableBehaviorE(this:
*mut ForOfIterator,
iterable:
HandleValue,
nonIterableBehavior:
NonIterableBehavior)
-> bool;
fn _ZN2JS13ForOfIterator16initWithIteratorENS_6HandleINS_5ValueEEE(this:
*mut ForOfIterator,
aIterator:
HandleValue)
-> bool;
fn _ZN2JS13ForOfIterator4nextENS_13MutableHandleINS_5ValueEEEPb(this:
*mut ForOfIterator,
val:
MutableHandleValue,
done:
*mut bool)
-> bool;
fn _ZNK2JS13ForOfIterator15valueIsIterableEv(this: *mut ForOfIterator)
-> bool;
fn _ZN2JS13ForOfIterator22nextFromOptimizedArrayENS_13MutableHandleINS_5ValueEEEPb(this:
*mut ForOfIterator,
val:
MutableHandleValue,
done:
*mut bool)
-> bool;
fn _ZN2JS13ForOfIterator24materializeArrayIteratorEv(this:
*mut ForOfIterator)
-> bool;
}
impl ForOfIterator {
#[inline]
pub unsafe extern "C" fn init(&mut self, iterable: HandleValue,
nonIterableBehavior: NonIterableBehavior)
-> bool {
_ZN2JS13ForOfIterator4initENS_6HandleINS_5ValueEEENS0_19NonIterableBehaviorE(&mut *self,
iterable,
nonIterableBehavior)
}
#[inline]
pub unsafe extern "C" fn initWithIterator(&mut self,
aIterator: HandleValue)
-> bool {
_ZN2JS13ForOfIterator16initWithIteratorENS_6HandleINS_5ValueEEE(&mut *self,
aIterator)
}
#[inline]
pub unsafe extern "C" fn next(&mut self, val: MutableHandleValue,
done: *mut bool) -> bool {
_ZN2JS13ForOfIterator4nextENS_13MutableHandleINS_5ValueEEEPb(&mut *self,
val,
done)
}
#[inline]
pub unsafe extern "C" fn valueIsIterable(&mut self) -> bool {
_ZNK2JS13ForOfIterator15valueIsIterableEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn nextFromOptimizedArray(&mut self,
val: MutableHandleValue,
done: *mut bool) -> bool {
_ZN2JS13ForOfIterator22nextFromOptimizedArrayENS_13MutableHandleINS_5ValueEEEPb(&mut *self,
val,
done)
}
#[inline]
pub unsafe extern "C" fn materializeArrayIterator(&mut self) -> bool {
_ZN2JS13ForOfIterator24materializeArrayIteratorEv(&mut *self)
}
}
pub type LargeAllocationFailureCallback =
::std::option::Option<unsafe extern "C" fn(data: *mut ::libc::c_void)>;
pub type OutOfMemoryCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
data: *mut ::libc::c_void)>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum SavedFrameResult { Ok = 0, AccessDenied = 1, }
pub type jsbytecode = u8;
pub enum JSAtom { }
pub enum JSLinearString { }
pub enum BaseProxyHandler { }
pub enum InterpreterFrame { }
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum jsfriendapi_hpp_unnamed_7 {
JS_TELEMETRY_GC_REASON = 0,
JS_TELEMETRY_GC_IS_COMPARTMENTAL = 1,
JS_TELEMETRY_GC_MS = 2,
JS_TELEMETRY_GC_MAX_PAUSE_MS = 3,
JS_TELEMETRY_GC_MARK_MS = 4,
JS_TELEMETRY_GC_SWEEP_MS = 5,
JS_TELEMETRY_GC_MARK_ROOTS_MS = 6,
JS_TELEMETRY_GC_MARK_GRAY_MS = 7,
JS_TELEMETRY_GC_SLICE_MS = 8,
JS_TELEMETRY_GC_MMU_50 = 9,
JS_TELEMETRY_GC_RESET = 10,
JS_TELEMETRY_GC_INCREMENTAL_DISABLED = 11,
JS_TELEMETRY_GC_NON_INCREMENTAL = 12,
JS_TELEMETRY_GC_SCC_SWEEP_TOTAL_MS = 13,
JS_TELEMETRY_GC_SCC_SWEEP_MAX_PAUSE_MS = 14,
JS_TELEMETRY_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT = 15,
JS_TELEMETRY_ADDON_EXCEPTIONS = 16,
}
pub type JSAccumulateTelemetryDataCallback =
::std::option::Option<unsafe extern "C" fn(id: i32, sample: u32,
key: *const ::libc::c_char)>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum jsfriendapi_hpp_unnamed_8 {
MakeNonConfigurableIntoConfigurable = 0,
CopyNonConfigurableAsIs = 1,
}
pub type PropertyCopyBehavior = jsfriendapi_hpp_unnamed_8;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSFunctionSpecWithHelp {
pub name: *const ::libc::c_char,
pub call: JSNative,
pub nargs: u16,
pub flags: u16,
pub usage: *const ::libc::c_char,
pub help: *const ::libc::c_char,
}
impl ::std::default::Default for JSFunctionSpecWithHelp {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SourceHook;
impl ::std::default::Default for SourceHook {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type PreserveWrapperCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: *mut JSObject) -> bool>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum jsfriendapi_hpp_unnamed_9 {
CollectNurseryBeforeDump = 0,
IgnoreNurseryObjects = 1,
}
pub type DumpHeapNurseryBehaviour = jsfriendapi_hpp_unnamed_9;
pub type WeakMapTraceCallback =
::std::option::Option<unsafe extern "C" fn(trc: *mut WeakMapTracer,
m: *mut JSObject,
key: GCCellPtr,
value: GCCellPtr)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct WeakMapTracer {
pub runtime: *mut JSRuntime,
pub callback: WeakMapTraceCallback,
}
impl ::std::default::Default for WeakMapTracer {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type GCThingCallback =
::std::option::Option<unsafe extern "C" fn(closure: *mut ::libc::c_void,
thing: GCCellPtr)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ObjectGroup {
pub clasp: *const Class,
pub proto: *mut JSObject,
pub compartment: *mut JSCompartment,
}
impl ::std::default::Default for ObjectGroup {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct BaseShape {
pub clasp_: *const Class,
pub parent: *mut JSObject,
}
impl ::std::default::Default for BaseShape {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Shape {
pub base: *mut BaseShape,
pub _1: jsid,
pub slotInfo: u32,
}
impl ::std::default::Default for Shape {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Object {
pub group: *mut ObjectGroup,
pub shape: *mut Shape,
pub slots: *mut Value,
pub _1: *mut ::libc::c_void,
}
impl ::std::default::Default for Object {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Function {
pub base: Object,
pub nargs: u16,
pub flags: u16,
pub native: JSNative,
pub jitinfo: *const JSJitInfo,
pub _1: *mut ::libc::c_void,
}
impl ::std::default::Default for Function {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct String {
pub flags: u32,
pub length: u32,
pub _bindgen_data_1_: u64,
}
impl String {
pub unsafe fn nonInlineCharsLatin1(&mut self) -> *mut *const Latin1Char {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn nonInlineCharsTwoByte(&mut self) -> *mut *const u16 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn inlineStorageLatin1(&mut self)
-> *mut [Latin1Char; 1usize] {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn inlineStorageTwoByte(&mut self) -> *mut [u16; 1usize] {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::default::Default for String {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type ActivityCallback =
::std::option::Option<unsafe extern "C" fn(arg: *mut ::libc::c_void,
active: bool)>;
pub type DOMInstanceClassHasProtoAtDepth =
::std::option::Option<unsafe extern "C" fn(instanceClass: *const Class,
protoID: u32, depth: u32)
-> bool>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSDOMCallbacks {
pub instanceClassMatchesProto: DOMInstanceClassHasProtoAtDepth,
}
impl ::std::default::Default for JSDOMCallbacks {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type DOMCallbacks = JSDOMCallbacks;
pub enum RegExpGuard { }
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum NukeReferencesToWindow {
NukeWindowReferences = 0,
DontNukeWindowReferences = 1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CompartmentFilter;
impl ::std::default::Default for CompartmentFilter {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AllCompartments {
pub _base: CompartmentFilter,
}
impl ::std::default::Default for AllCompartments {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ContentCompartmentsOnly {
pub _base: CompartmentFilter,
}
impl ::std::default::Default for ContentCompartmentsOnly {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ChromeCompartmentsOnly {
pub _base: CompartmentFilter,
}
impl ::std::default::Default for ChromeCompartmentsOnly {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SingleCompartment {
pub _base: CompartmentFilter,
pub ours: *mut JSCompartment,
}
impl ::std::default::Default for SingleCompartment {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CompartmentsWithPrincipals {
pub _base: CompartmentFilter,
pub principals: *mut JSPrincipals,
}
impl ::std::default::Default for CompartmentsWithPrincipals {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ExpandoAndGeneration {
pub expando: Heap<Value>,
pub generation: u32,
}
impl ::std::default::Default for ExpandoAndGeneration {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum DOMProxyShadowsResult {
ShadowCheckFailed = 0,
Shadows = 1,
DoesntShadow = 2,
DoesntShadowUnique = 3,
ShadowsViaDirectExpando = 4,
ShadowsViaIndirectExpando = 5,
}
pub type DOMProxyShadowsCheck =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
object: HandleObject,
id: HandleId)
-> DOMProxyShadowsResult>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum JSErrNum {
JSMSG_NOT_AN_ERROR = 0,
JSMSG_NOT_DEFINED = 1,
JSMSG_MORE_ARGS_NEEDED = 2,
JSMSG_INCOMPATIBLE_PROTO = 3,
JSMSG_NO_CONSTRUCTOR = 4,
JSMSG_BAD_SORT_ARG = 5,
JSMSG_CANT_WATCH = 6,
JSMSG_READ_ONLY = 7,
JSMSG_CANT_DELETE = 8,
JSMSG_CANT_TRUNCATE_ARRAY = 9,
JSMSG_NOT_FUNCTION = 10,
JSMSG_NOT_CONSTRUCTOR = 11,
JSMSG_CANT_CONVERT = 12,
JSMSG_CANT_CONVERT_TO = 13,
JSMSG_NO_PROPERTIES = 14,
JSMSG_BAD_REGEXP_FLAG = 15,
JSMSG_ARG_INDEX_OUT_OF_RANGE = 16,
JSMSG_SPREAD_TOO_LARGE = 17,
JSMSG_BAD_WEAKMAP_KEY = 18,
JSMSG_BAD_GETTER_OR_SETTER = 19,
JSMSG_BAD_ARRAY_LENGTH = 20,
JSMSG_REDECLARED_VAR = 21,
JSMSG_UNDECLARED_VAR = 22,
JSMSG_GETTER_ONLY = 23,
JSMSG_UNDEFINED_PROP = 24,
JSMSG_INVALID_MAP_ITERABLE = 25,
JSMSG_NESTING_GENERATOR = 26,
JSMSG_INCOMPATIBLE_METHOD = 27,
JSMSG_OBJECT_WATCH_DEPRECATED = 28,
JSMSG_TYPE_ERR_BAD_ARGS = 29,
JSMSG_BAD_SURROGATE_CHAR = 30,
JSMSG_UTF8_CHAR_TOO_LARGE = 31,
JSMSG_MALFORMED_UTF8_CHAR = 32,
JSMSG_WRONG_CONSTRUCTOR = 33,
JSMSG_BUILTIN_CTOR_NO_NEW = 34,
JSMSG_PROTO_SETTING_SLOW = 35,
JSMSG_BAD_GENERATOR_YIELD = 36,
JSMSG_EMPTY_ARRAY_REDUCE = 37,
JSMSG_UNEXPECTED_TYPE = 38,
JSMSG_MISSING_FUN_ARG = 39,
JSMSG_NOT_NONNULL_OBJECT = 40,
JSMSG_INVALID_DESCRIPTOR = 41,
JSMSG_OBJECT_NOT_EXTENSIBLE = 42,
JSMSG_CANT_REDEFINE_PROP = 43,
JSMSG_CANT_APPEND_TO_ARRAY = 44,
JSMSG_CANT_REDEFINE_ARRAY_LENGTH = 45,
JSMSG_CANT_DEFINE_PAST_ARRAY_LENGTH = 46,
JSMSG_BAD_GET_SET_FIELD = 47,
JSMSG_THROW_TYPE_ERROR = 48,
JSMSG_NOT_EXPECTED_TYPE = 49,
JSMSG_NOT_ITERABLE = 50,
JSMSG_ALREADY_HAS_PRAGMA = 51,
JSMSG_NEXT_RETURNED_PRIMITIVE = 52,
JSMSG_WRONG_VALUE = 53,
JSMSG_CANT_SET_PROTO = 54,
JSMSG_CANT_SET_PROTO_OF = 55,
JSMSG_CANT_SET_PROTO_CYCLE = 56,
JSMSG_INVALID_ARG_TYPE = 57,
JSMSG_TERMINATED = 58,
JSMSG_PROTO_NOT_OBJORNULL = 59,
JSMSG_JSON_BAD_PARSE = 60,
JSMSG_JSON_CYCLIC_VALUE = 61,
JSMSG_BAD_INSTANCEOF_RHS = 62,
JSMSG_BAD_LEFTSIDE_OF_ASS = 63,
JSMSG_BAD_PROTOTYPE = 64,
JSMSG_IN_NOT_OBJECT = 65,
JSMSG_TOO_MANY_CON_SPREADARGS = 66,
JSMSG_TOO_MANY_FUN_SPREADARGS = 67,
JSMSG_UNINITIALIZED_LEXICAL = 68,
JSMSG_INVALID_DATE = 69,
JSMSG_BAD_TOISOSTRING_PROP = 70,
JSMSG_BAD_URI = 71,
JSMSG_INVALID_NORMALIZE_FORM = 72,
JSMSG_NEGATIVE_REPETITION_COUNT = 73,
JSMSG_NOT_A_CODEPOINT = 74,
JSMSG_RESULTING_STRING_TOO_LARGE = 75,
JSMSG_BAD_RADIX = 76,
JSMSG_PRECISION_RANGE = 77,
JSMSG_BAD_APPLY_ARGS = 78,
JSMSG_BAD_FORMAL = 79,
JSMSG_CALLER_IS_STRICT = 80,
JSMSG_DEPRECATED_USAGE = 81,
JSMSG_FUNCTION_ARGUMENTS_AND_REST = 82,
JSMSG_NOT_SCRIPTED_FUNCTION = 83,
JSMSG_NO_REST_NAME = 84,
JSMSG_PARAMETER_AFTER_REST = 85,
JSMSG_TOO_MANY_FUN_APPLY_ARGS = 86,
JSMSG_CSP_BLOCKED_EVAL = 87,
JSMSG_CSP_BLOCKED_FUNCTION = 88,
JSMSG_ACCESSOR_DEF_DENIED = 89,
JSMSG_DEAD_OBJECT = 90,
JSMSG_UNWRAP_DENIED = 91,
JSMSG_BAD_CHAR = 92,
JSMSG_BAD_CLONE_FUNOBJ_SCOPE = 93,
JSMSG_BAD_NEW_RESULT = 94,
JSMSG_BAD_TYPE = 95,
JSMSG_CANT_CLONE_OBJECT = 96,
JSMSG_CANT_OPEN = 97,
JSMSG_USER_DEFINED_ERROR = 98,
JSMSG_ALLOC_OVERFLOW = 99,
JSMSG_BAD_BYTECODE = 100,
JSMSG_BAD_SCRIPT_MAGIC = 101,
JSMSG_BUFFER_TOO_SMALL = 102,
JSMSG_BYTECODE_TOO_BIG = 103,
JSMSG_CANT_SET_ARRAY_ATTRS = 104,
JSMSG_INACTIVE = 105,
JSMSG_NEED_DIET = 106,
JSMSG_OUT_OF_MEMORY = 107,
JSMSG_OVER_RECURSED = 108,
JSMSG_TOO_BIG_TO_ENCODE = 109,
JSMSG_TOO_DEEP = 110,
JSMSG_UNCAUGHT_EXCEPTION = 111,
JSMSG_UNKNOWN_FORMAT = 112,
JSMSG_ACCESSOR_WRONG_ARGS = 113,
JSMSG_ARGUMENTS_AND_REST = 114,
JSMSG_ARRAY_COMP_LEFTSIDE = 115,
JSMSG_ARRAY_INIT_TOO_BIG = 116,
JSMSG_AS_AFTER_RESERVED_WORD = 117,
JSMSG_BAD_ANON_GENERATOR_RETURN = 118,
JSMSG_BAD_ARROW_ARGS = 119,
JSMSG_BAD_BINDING = 120,
JSMSG_BAD_CONST_DECL = 121,
JSMSG_BAD_CONST_ASSIGN = 122,
JSMSG_BAD_CONTINUE = 123,
JSMSG_BAD_DESTRUCT_ASS = 124,
JSMSG_BAD_DESTRUCT_TARGET = 125,
JSMSG_BAD_DESTRUCT_DECL = 126,
JSMSG_BAD_DUP_ARGS = 127,
JSMSG_BAD_FOR_EACH_LOOP = 128,
JSMSG_BAD_FOR_LEFTSIDE = 129,
JSMSG_BAD_GENERATOR_RETURN = 130,
JSMSG_BAD_GENERATOR_SYNTAX = 131,
JSMSG_BAD_GENEXP_BODY = 132,
JSMSG_BAD_INCOP_OPERAND = 133,
JSMSG_BAD_METHOD_DEF = 134,
JSMSG_BAD_OCTAL = 135,
JSMSG_BAD_OPERAND = 136,
JSMSG_BAD_PROP_ID = 137,
JSMSG_BAD_RETURN_OR_YIELD = 138,
JSMSG_BAD_STRICT_ASSIGN = 139,
JSMSG_BAD_SWITCH = 140,
JSMSG_BRACKET_AFTER_ARRAY_COMPREHENSION = 141,
JSMSG_BRACKET_AFTER_LIST = 142,
JSMSG_BRACKET_IN_INDEX = 143,
JSMSG_CATCH_AFTER_GENERAL = 144,
JSMSG_CATCH_IDENTIFIER = 145,
JSMSG_CATCH_OR_FINALLY = 146,
JSMSG_CATCH_WITHOUT_TRY = 147,
JSMSG_COLON_AFTER_CASE = 148,
JSMSG_COLON_AFTER_ID = 149,
JSMSG_COLON_IN_COND = 150,
JSMSG_COMP_PROP_UNTERM_EXPR = 151,
JSMSG_CONTRARY_NONDIRECTIVE = 152,
JSMSG_CURLY_AFTER_BODY = 153,
JSMSG_CURLY_AFTER_CATCH = 154,
JSMSG_CURLY_AFTER_FINALLY = 155,
JSMSG_CURLY_AFTER_LET = 156,
JSMSG_CURLY_AFTER_LIST = 157,
JSMSG_CURLY_AFTER_TRY = 158,
JSMSG_CURLY_BEFORE_BODY = 159,
JSMSG_CURLY_BEFORE_CATCH = 160,
JSMSG_CURLY_BEFORE_CLASS = 161,
JSMSG_CURLY_BEFORE_FINALLY = 162,
JSMSG_CURLY_BEFORE_SWITCH = 163,
JSMSG_CURLY_BEFORE_TRY = 164,
JSMSG_CURLY_IN_COMPOUND = 165,
JSMSG_DECLARATION_AFTER_EXPORT = 166,
JSMSG_DECLARATION_AFTER_IMPORT = 167,
JSMSG_DEPRECATED_DELETE_OPERAND = 168,
JSMSG_DEPRECATED_LET_BLOCK = 169,
JSMSG_DEPRECATED_FOR_EACH = 170,
JSMSG_DEPRECATED_LET_EXPRESSION = 171,
JSMSG_DEPRECATED_OCTAL = 172,
JSMSG_DEPRECATED_PRAGMA = 173,
JSMSG_DUPLICATE_FORMAL = 174,
JSMSG_DUPLICATE_LABEL = 175,
JSMSG_DUPLICATE_PROPERTY = 176,
JSMSG_EMPTY_CONSEQUENT = 177,
JSMSG_EQUAL_AS_ASSIGN = 178,
JSMSG_EXPORT_DECL_AT_TOP_LEVEL = 179,
JSMSG_FINALLY_WITHOUT_TRY = 180,
JSMSG_FROM_AFTER_IMPORT_SPEC_SET = 181,
JSMSG_GARBAGE_AFTER_INPUT = 182,
JSMSG_IDSTART_AFTER_NUMBER = 183,
JSMSG_ILLEGAL_CHARACTER = 184,
JSMSG_IMPORT_DECL_AT_TOP_LEVEL = 185,
JSMSG_INVALID_FOR_IN_INIT = 186,
JSMSG_INVALID_FOR_OF_INIT = 187,
JSMSG_IN_AFTER_FOR_NAME = 188,
JSMSG_LABEL_NOT_FOUND = 189,
JSMSG_LET_CLASS_BINDING = 190,
JSMSG_LET_COMP_BINDING = 191,
JSMSG_LEXICAL_DECL_NOT_IN_BLOCK = 192,
JSMSG_LINE_BREAK_AFTER_THROW = 193,
JSMSG_MALFORMED_ESCAPE = 194,
JSMSG_MISSING_BINARY_DIGITS = 195,
JSMSG_MISSING_EXPONENT = 196,
JSMSG_MISSING_EXPR_AFTER_THROW = 197,
JSMSG_MISSING_FORMAL = 198,
JSMSG_MISSING_HEXDIGITS = 199,
JSMSG_MISSING_OCTAL_DIGITS = 200,
JSMSG_MODULES_NOT_IMPLEMENTED = 201,
JSMSG_MODULE_SPEC_AFTER_FROM = 202,
JSMSG_NAME_AFTER_DOT = 203,
JSMSG_NONDEFAULT_FORMAL_AFTER_DEFAULT = 204,
JSMSG_NO_BINDING_NAME = 205,
JSMSG_NO_CLASS_CONSTRUCTOR = 206,
JSMSG_NO_EXPORT_NAME = 207,
JSMSG_NO_IMPORT_NAME = 208,
JSMSG_NO_VARIABLE_NAME = 209,
JSMSG_OF_AFTER_FOR_NAME = 210,
JSMSG_PAREN_AFTER_ARGS = 211,
JSMSG_PAREN_AFTER_CATCH = 212,
JSMSG_PAREN_AFTER_COND = 213,
JSMSG_PAREN_AFTER_FOR = 214,
JSMSG_PAREN_AFTER_FORMAL = 215,
JSMSG_PAREN_AFTER_FOR_CTRL = 216,
JSMSG_PAREN_AFTER_FOR_OF_ITERABLE = 217,
JSMSG_PAREN_AFTER_LET = 218,
JSMSG_PAREN_AFTER_SWITCH = 219,
JSMSG_PAREN_AFTER_WITH = 220,
JSMSG_PAREN_BEFORE_CATCH = 221,
JSMSG_PAREN_BEFORE_COND = 222,
JSMSG_PAREN_BEFORE_FORMAL = 223,
JSMSG_PAREN_BEFORE_LET = 224,
JSMSG_PAREN_BEFORE_SWITCH = 225,
JSMSG_PAREN_BEFORE_WITH = 226,
JSMSG_PAREN_IN_PAREN = 227,
JSMSG_RC_AFTER_EXPORT_SPEC_LIST = 228,
JSMSG_RC_AFTER_IMPORT_SPEC_LIST = 229,
JSMSG_REDECLARED_CATCH_IDENTIFIER = 230,
JSMSG_REDECLARED_PARAM = 231,
JSMSG_RESERVED_ID = 232,
JSMSG_REST_WITH_DEFAULT = 233,
JSMSG_SELFHOSTED_TOP_LEVEL_LEXICAL = 234,
JSMSG_SELFHOSTED_UNBOUND_NAME = 235,
JSMSG_SEMI_AFTER_FOR_COND = 236,
JSMSG_SEMI_AFTER_FOR_INIT = 237,
JSMSG_SEMI_BEFORE_STMNT = 238,
JSMSG_SOURCE_TOO_LONG = 239,
JSMSG_STRICT_CODE_LET_EXPR_STMT = 240,
JSMSG_STRICT_CODE_WITH = 241,
JSMSG_STRICT_FUNCTION_STATEMENT = 242,
JSMSG_TEMPLSTR_UNTERM_EXPR = 243,
JSMSG_SIMD_NOT_A_VECTOR = 244,
JSMSG_TOO_MANY_CASES = 245,
JSMSG_TOO_MANY_CATCH_VARS = 246,
JSMSG_TOO_MANY_CON_ARGS = 247,
JSMSG_TOO_MANY_DEFAULTS = 248,
JSMSG_TOO_MANY_FUN_ARGS = 249,
JSMSG_TOO_MANY_LOCALS = 250,
JSMSG_TOO_MANY_YIELDS = 251,
JSMSG_TOUGH_BREAK = 252,
JSMSG_UNEXPECTED_TOKEN = 253,
JSMSG_UNNAMED_CLASS_STMT = 254,
JSMSG_UNNAMED_FUNCTION_STMT = 255,
JSMSG_UNTERMINATED_COMMENT = 256,
JSMSG_UNTERMINATED_REGEXP = 257,
JSMSG_UNTERMINATED_STRING = 258,
JSMSG_USELESS_EXPR = 259,
JSMSG_USE_ASM_DIRECTIVE_FAIL = 260,
JSMSG_VAR_HIDES_ARG = 261,
JSMSG_WHILE_AFTER_DO = 262,
JSMSG_YIELD_IN_ARROW = 263,
JSMSG_YIELD_IN_DEFAULT = 264,
JSMSG_BAD_COLUMN_NUMBER = 265,
JSMSG_COMPUTED_NAME_IN_PATTERN = 266,
JSMSG_DEFAULT_IN_PATTERN = 267,
JSMSG_USE_ASM_TYPE_FAIL = 268,
JSMSG_USE_ASM_LINK_FAIL = 269,
JSMSG_USE_ASM_TYPE_OK = 270,
JSMSG_BAD_TRAP_RETURN_VALUE = 271,
JSMSG_CANT_CHANGE_EXTENSIBILITY = 272,
JSMSG_CANT_DEFINE_INVALID = 273,
JSMSG_CANT_DEFINE_NEW = 274,
JSMSG_CANT_DEFINE_NE_AS_NC = 275,
JSMSG_PROXY_DEFINE_RETURNED_FALSE = 276,
JSMSG_PROXY_DELETE_RETURNED_FALSE = 277,
JSMSG_PROXY_PREVENTEXTENSIONS_RETURNED_FALSE = 278,
JSMSG_PROXY_SET_RETURNED_FALSE = 279,
JSMSG_CANT_REPORT_AS_NON_EXTENSIBLE = 280,
JSMSG_CANT_REPORT_C_AS_NC = 281,
JSMSG_CANT_REPORT_E_AS_NE = 282,
JSMSG_CANT_REPORT_INVALID = 283,
JSMSG_CANT_REPORT_NC_AS_NE = 284,
JSMSG_CANT_REPORT_NEW = 285,
JSMSG_CANT_REPORT_NE_AS_NC = 286,
JSMSG_CANT_SET_NW_NC = 287,
JSMSG_CANT_SET_WO_SETTER = 288,
JSMSG_CANT_SKIP_NC = 289,
JSMSG_INVALID_TRAP_RESULT = 290,
JSMSG_MUST_REPORT_SAME_VALUE = 291,
JSMSG_MUST_REPORT_UNDEFINED = 292,
JSMSG_OBJECT_ACCESS_DENIED = 293,
JSMSG_PROPERTY_ACCESS_DENIED = 294,
JSMSG_PROXY_CONSTRUCT_OBJECT = 295,
JSMSG_PROXY_EXTENSIBILITY = 296,
JSMSG_PROXY_GETOWN_OBJORUNDEF = 297,
JSMSG_PROXY_REVOKED = 298,
JSMSG_SC_BAD_CLONE_VERSION = 299,
JSMSG_SC_BAD_SERIALIZED_DATA = 300,
JSMSG_SC_DUP_TRANSFERABLE = 301,
JSMSG_SC_NOT_TRANSFERABLE = 302,
JSMSG_SC_UNSUPPORTED_TYPE = 303,
JSMSG_SC_SHMEM_MUST_TRANSFER = 304,
JSMSG_ASSIGN_FUNCTION_OR_NULL = 305,
JSMSG_DEBUG_BAD_LINE = 306,
JSMSG_DEBUG_BAD_OFFSET = 307,
JSMSG_DEBUG_BAD_REFERENT = 308,
JSMSG_DEBUG_BAD_RESUMPTION = 309,
JSMSG_DEBUG_CANT_DEBUG_GLOBAL = 310,
JSMSG_DEBUG_CCW_REQUIRED = 311,
JSMSG_DEBUG_COMPARTMENT_MISMATCH = 312,
JSMSG_DEBUG_LOOP = 313,
JSMSG_DEBUG_NOT_DEBUGGEE = 314,
JSMSG_DEBUG_NOT_DEBUGGING = 315,
JSMSG_DEBUG_NOT_IDLE = 316,
JSMSG_DEBUG_NOT_LIVE = 317,
JSMSG_DEBUG_NO_SCOPE_OBJECT = 318,
JSMSG_DEBUG_OBJECT_PROTO = 319,
JSMSG_DEBUG_OBJECT_WRONG_OWNER = 320,
JSMSG_DEBUG_OPTIMIZED_OUT = 321,
JSMSG_DEBUG_RESUMPTION_VALUE_DISALLOWED = 322,
JSMSG_DEBUG_VARIABLE_NOT_FOUND = 323,
JSMSG_DEBUG_WRAPPER_IN_WAY = 324,
JSMSG_NOT_CALLABLE_OR_UNDEFINED = 325,
JSMSG_NOT_TRACKING_ALLOCATIONS = 326,
JSMSG_OBJECT_METADATA_CALLBACK_ALREADY_SET = 327,
JSMSG_QUERY_INNERMOST_WITHOUT_LINE_URL = 328,
JSMSG_QUERY_LINE_WITHOUT_URL = 329,
JSMSG_DEBUG_CANT_SET_OPT_ENV = 330,
JSMSG_DEBUG_INVISIBLE_COMPARTMENT = 331,
JSMSG_TRACELOGGER_ENABLE_FAIL = 332,
JSMSG_DATE_NOT_FINITE = 333,
JSMSG_INTERNAL_INTL_ERROR = 334,
JSMSG_INTL_OBJECT_NOT_INITED = 335,
JSMSG_INTL_OBJECT_REINITED = 336,
JSMSG_INVALID_CURRENCY_CODE = 337,
JSMSG_INVALID_DIGITS_VALUE = 338,
JSMSG_INVALID_LANGUAGE_TAG = 339,
JSMSG_INVALID_LOCALES_ELEMENT = 340,
JSMSG_INVALID_LOCALE_MATCHER = 341,
JSMSG_INVALID_OPTION_VALUE = 342,
JSMSG_INVALID_TIME_ZONE = 343,
JSMSG_UNDEFINED_CURRENCY = 344,
JSMSG_BAD_CLASS_RANGE = 345,
JSMSG_ESCAPE_AT_END_OF_REGEXP = 346,
JSMSG_INVALID_GROUP = 347,
JSMSG_MISSING_PAREN = 348,
JSMSG_NEWREGEXP_FLAGGED = 349,
JSMSG_NOTHING_TO_REPEAT = 350,
JSMSG_NUMBERS_OUT_OF_ORDER = 351,
JSMSG_TOO_MANY_PARENS = 352,
JSMSG_UNMATCHED_RIGHT_PAREN = 353,
JSMSG_UNTERM_CLASS = 354,
JSMSG_DEFAULT_LOCALE_ERROR = 355,
JSMSG_NO_SUCH_SELF_HOSTED_PROP = 356,
JSMSG_INVALID_PROTOTYPE = 357,
JSMSG_TYPEDOBJECT_ARRAYTYPE_BAD_ARGS = 358,
JSMSG_TYPEDOBJECT_BAD_ARGS = 359,
JSMSG_TYPEDOBJECT_BINARYARRAY_BAD_INDEX = 360,
JSMSG_TYPEDOBJECT_HANDLE_UNATTACHED = 361,
JSMSG_TYPEDOBJECT_STRUCTTYPE_BAD_ARGS = 362,
JSMSG_TYPEDOBJECT_TOO_BIG = 363,
JSMSG_BAD_INDEX = 364,
JSMSG_TYPED_ARRAY_BAD_ARGS = 365,
JSMSG_TYPED_ARRAY_BAD_OBJECT = 366,
JSMSG_TYPED_ARRAY_BAD_INDEX = 367,
JSMSG_TYPED_ARRAY_NEGATIVE_ARG = 368,
JSMSG_TYPED_ARRAY_DETACHED = 369,
JSMSG_SHARED_ARRAY_BAD_OBJECT = 370,
JSMSG_SHARED_ARRAY_BAD_LENGTH = 371,
JSMSG_SHARED_TYPED_ARRAY_BAD_OBJECT = 372,
JSMSG_SHARED_TYPED_ARRAY_BAD_ARGS = 373,
JSMSG_SHARED_TYPED_ARRAY_ARG_RANGE = 374,
JSMSG_SHARED_TYPED_ARRAY_BAD_LENGTH = 375,
JSMSG_BAD_PARSE_NODE = 376,
JSMSG_BAD_SYMBOL = 377,
JSMSG_SYMBOL_TO_STRING = 378,
JSMSG_SYMBOL_TO_NUMBER = 379,
JSMSG_ATOMICS_BAD_ARRAY = 380,
JSMSG_ATOMICS_TOO_LONG = 381,
JSMSG_ATOMICS_WAIT_NOT_ALLOWED = 382,
JSMSG_CANT_SET_INTERPOSED = 383,
JSMSG_CANT_DEFINE_WINDOW_ELEMENT = 384,
JSMSG_CANT_DELETE_WINDOW_ELEMENT = 385,
JSMSG_CANT_DELETE_WINDOW_NAMED_PROPERTY = 386,
JSMSG_CANT_PREVENT_EXTENSIONS = 387,
JSErr_Limit = 388,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoStableStringChars {
pub s_: RootedString,
pub _bindgen_data_1_: u64,
pub state_: State,
pub ownsChars_: bool,
}
impl AutoStableStringChars {
pub unsafe fn twoByteChars_(&mut self) -> *mut *const u16 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn latin1Chars_(&mut self) -> *mut *const Latin1Char {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::default::Default for AutoStableStringChars {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum State { Uninitialized = 0, Latin1 = 1, TwoByte = 2, }
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ErrorReport {
pub reportp: *mut JSErrorReport,
pub message_: *const ::libc::c_char,
pub ownedReport: JSErrorReport,
pub ownedMessage: *mut ::libc::c_char,
pub _str: RootedString,
pub strChars: AutoStableStringChars,
pub exnObject: RootedObject,
pub bytesStorage: JSAutoByteString,
pub filename: JSAutoByteString,
pub ownsMessageAndReport: bool,
}
impl ::std::default::Default for ErrorReport {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2js11ErrorReport4initEP9JSContextN2JS6HandleINS3_5ValueEEE(this:
*mut ErrorReport,
cx:
*mut JSContext,
exn:
HandleValue)
-> bool;
fn _ZN2js11ErrorReport6reportEv(this: *mut ErrorReport)
-> *mut JSErrorReport;
fn _ZN2js11ErrorReport7messageEv(this: *mut ErrorReport)
-> *const ::libc::c_char;
fn _ZN2js11ErrorReport31populateUncaughtExceptionReportEP9JSContextz(this:
*mut ErrorReport,
cx:
*mut JSContext, ...)
-> bool;
fn _ZN2js11ErrorReport33populateUncaughtExceptionReportVAEP9JSContextP13__va_list_tag(this:
*mut ErrorReport,
cx:
*mut JSContext,
ap:
va_list)
-> bool;
}
impl ErrorReport {
#[inline]
pub unsafe extern "C" fn init(&mut self, cx: *mut JSContext,
exn: HandleValue) -> bool {
_ZN2js11ErrorReport4initEP9JSContextN2JS6HandleINS3_5ValueEEE(&mut *self,
cx, exn)
}
#[inline]
pub unsafe extern "C" fn report(&mut self) -> *mut JSErrorReport {
_ZN2js11ErrorReport6reportEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn message(&mut self) -> *const ::libc::c_char {
_ZN2js11ErrorReport7messageEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn populateUncaughtExceptionReport(&mut self,
cx:
*mut JSContext)
-> bool {
_ZN2js11ErrorReport31populateUncaughtExceptionReportEP9JSContextz(&mut *self,
cx)
}
#[inline]
pub unsafe extern "C" fn populateUncaughtExceptionReportVA(&mut self,
cx:
*mut JSContext,
ap: va_list)
-> bool {
_ZN2js11ErrorReport33populateUncaughtExceptionReportVAEP9JSContextP13__va_list_tag(&mut *self,
cx,
ap)
}
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum Type {
Int8 = 0,
Uint8 = 1,
Int16 = 2,
Uint16 = 3,
Int32 = 4,
Uint32 = 5,
Float32 = 6,
Float64 = 7,
Uint8Clamped = 8,
MaxTypedArrayViewType = 9,
Float32x4 = 10,
Int32x4 = 11,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum jsfriendapi_hpp_unnamed_10 { ChangeData = 0, KeepData = 1, }
pub type NeuterDataDisposition = jsfriendapi_hpp_unnamed_10;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSJitGetterCallArgs {
pub _base: MutableHandleValue,
}
impl ::std::default::Default for JSJitGetterCallArgs {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSJitSetterCallArgs {
pub _base: MutableHandleValue,
}
impl ::std::default::Default for JSJitSetterCallArgs {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSJitMethodCallArgs {
pub _base: CallArgsBase<NoUsedRval>,
}
impl ::std::default::Default for JSJitMethodCallArgs {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSJitMethodCallArgsTraits;
impl ::std::default::Default for JSJitMethodCallArgsTraits {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type JSJitGetterOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
thisObj: HandleObject,
specializedThis:
*mut ::libc::c_void,
args: JSJitGetterCallArgs)
-> bool>;
pub type JSJitSetterOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
thisObj: HandleObject,
specializedThis:
*mut ::libc::c_void,
args: JSJitSetterCallArgs)
-> bool>;
pub type JSJitMethodOp =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
thisObj: HandleObject,
specializedThis:
*mut ::libc::c_void,
args: &JSJitMethodCallArgs)
-> bool>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSJitInfo {
pub _bindgen_data_1_: u64,
pub protoID: u16,
pub depth: u16,
pub _bitfield_1: u32,
}
impl JSJitInfo {
pub unsafe fn getter(&mut self) -> *mut JSJitGetterOp {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn setter(&mut self) -> *mut JSJitSetterOp {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn method(&mut self) -> *mut JSJitMethodOp {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn staticMethod(&mut self) -> *mut JSNative {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_1_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::default::Default for JSJitInfo {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum OpType {
Getter = 0,
Setter = 1,
Method = 2,
StaticMethod = 3,
OpTypeCount = 4,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum ArgType {
String = 1,
Integer = 2,
Double = 4,
Boolean = 8,
Object = 16,
Null = 32,
Numeric = 6,
Primitive = 47,
ObjectOrNull = 48,
Any = 63,
ArgTypeListEnd = -2147483648,
}
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum AliasSet {
AliasNone = 0,
AliasDOMSets = 1,
AliasEverything = 2,
AliasSetCount = 3,
}
impl JSJitInfo {
pub fn set_type_(&mut self, val: u8) {
self._bitfield_1 &= !(((1 << 4u32) - 1) << 0usize);
self._bitfield_1 |= (val as u32) << 0usize;
}
pub fn set_aliasSet_(&mut self, val: u8) {
self._bitfield_1 &= !(((1 << 4u32) - 1) << 4usize);
self._bitfield_1 |= (val as u32) << 4usize;
}
pub fn set_returnType_(&mut self, val: u8) {
self._bitfield_1 &= !(((1 << 8u32) - 1) << 8usize);
self._bitfield_1 |= (val as u32) << 8usize;
}
pub fn set_isInfallible(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 16usize);
self._bitfield_1 |= (val as u32) << 16usize;
}
pub fn set_isMovable(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 17usize);
self._bitfield_1 |= (val as u32) << 17usize;
}
pub fn set_isAlwaysInSlot(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 18usize);
self._bitfield_1 |= (val as u32) << 18usize;
}
pub fn set_isLazilyCachedInSlot(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 19usize);
self._bitfield_1 |= (val as u32) << 19usize;
}
pub fn set_isTypedMethod(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 20usize);
self._bitfield_1 |= (val as u32) << 20usize;
}
pub fn set_slotIndex(&mut self, val: u16) {
self._bitfield_1 &= !(((1 << 11u32) - 1) << 21usize);
self._bitfield_1 |= (val as u32) << 21usize;
}
pub const fn new_bitfield_1(type_: u8, aliasSet_: u8, returnType_: u8,
isInfallible: bool, isMovable: bool,
isAlwaysInSlot: bool,
isLazilyCachedInSlot: bool,
isTypedMethod: bool, slotIndex: u16) -> u32 {
0 | ((type_ as u32) << 0u32) | ((aliasSet_ as u32) << 4u32) |
((returnType_ as u32) << 8u32) | ((isInfallible as u32) << 16u32)
| ((isMovable as u32) << 17u32) |
((isAlwaysInSlot as u32) << 18u32) |
((isLazilyCachedInSlot as u32) << 19u32) |
((isTypedMethod as u32) << 20u32) | ((slotIndex as u32) << 21u32)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSTypedMethodJitInfo {
pub base: JSJitInfo,
pub argTypes: *const ArgType,
}
impl ::std::default::Default for JSTypedMethodJitInfo {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type DefaultJSContextCallback =
::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime)
-> *mut JSContext>;
#[repr(i32)]
#[derive(Copy, Clone)]
pub enum CTypesActivityType {
CTYPES_CALL_BEGIN = 0,
CTYPES_CALL_END = 1,
CTYPES_CALLBACK_BEGIN = 2,
CTYPES_CALLBACK_END = 3,
}
pub type CTypesActivityCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
_type: CTypesActivityType)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AutoCTypesActivityCallback {
pub cx: *mut JSContext,
pub callback: CTypesActivityCallback,
pub endType: CTypesActivityType,
}
impl ::std::default::Default for AutoCTypesActivityCallback {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2js26AutoCTypesActivityCallback13DoEndCallbackEv(this:
*mut AutoCTypesActivityCallback);
}
impl AutoCTypesActivityCallback {
#[inline]
pub unsafe extern "C" fn DoEndCallback(&mut self) {
_ZN2js26AutoCTypesActivityCallback13DoEndCallbackEv(&mut *self)
}
}
pub type ObjectMetadataCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
pmetadata: *mut *mut JSObject)
-> bool>;
extern "C" {
#[link_name = "_Z10JSVAL_NULL"]
pub static JSVAL_NULL: jsval;
#[link_name = "_Z10JSVAL_ZERO"]
pub static JSVAL_ZERO: jsval;
#[link_name = "_Z9JSVAL_ONE"]
pub static JSVAL_ONE: jsval;
#[link_name = "_Z11JSVAL_FALSE"]
pub static JSVAL_FALSE: jsval;
#[link_name = "_Z10JSVAL_TRUE"]
pub static JSVAL_TRUE: jsval;
#[link_name = "_Z10JSVAL_VOID"]
pub static JSVAL_VOID: jsval;
#[link_name = "_ZN2JS15NullHandleValueE"]
pub static NullHandleValue: HandleValue;
#[link_name = "_ZN2JS20UndefinedHandleValueE"]
pub static UndefinedHandleValue: HandleValue;
#[link_name = "_ZN2JS15TrueHandleValueE"]
pub static TrueHandleValue: HandleValue;
#[link_name = "_ZN2JS16FalseHandleValueE"]
pub static FalseHandleValue: HandleValue;
#[link_name = "_Z9JSID_VOID"]
pub static JSID_VOID: jsid;
#[link_name = "_Z10JSID_EMPTY"]
pub static JSID_EMPTY: jsid;
#[link_name = "_Z15JSID_VOIDHANDLE"]
pub static JSID_VOIDHANDLE: HandleId;
#[link_name = "_Z16JSID_EMPTYHANDLE"]
pub static JSID_EMPTYHANDLE: HandleId;
#[link_name = "_ZN2js16FunctionClassPtrE"]
pub static FunctionClassPtr: Class;
#[link_name = "_ZN2js14ObjectClassPtrE"]
pub static ObjectClassPtr: Class;
#[link_name = "_ZN2js6detail17Int8ArrayClassPtrE"]
pub static Int8ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail18Uint8ArrayClassPtrE"]
pub static Uint8ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail25Uint8ClampedArrayClassPtrE"]
pub static Uint8ClampedArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail18Int16ArrayClassPtrE"]
pub static Int16ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail19Uint16ArrayClassPtrE"]
pub static Uint16ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail18Int32ArrayClassPtrE"]
pub static Int32ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail19Uint32ArrayClassPtrE"]
pub static Uint32ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail20Float32ArrayClassPtrE"]
pub static Float32ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail20Float64ArrayClassPtrE"]
pub static Float64ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail23SharedInt8ArrayClassPtrE"]
pub static SharedInt8ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail24SharedUint8ArrayClassPtrE"]
pub static SharedUint8ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail31SharedUint8ClampedArrayClassPtrE"]
pub static SharedUint8ClampedArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail24SharedInt16ArrayClassPtrE"]
pub static SharedInt16ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail25SharedUint16ArrayClassPtrE"]
pub static SharedUint16ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail24SharedInt32ArrayClassPtrE"]
pub static SharedInt32ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail25SharedUint32ArrayClassPtrE"]
pub static SharedUint32ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail26SharedFloat32ArrayClassPtrE"]
pub static SharedFloat32ArrayClassPtr: *const Class;
#[link_name = "_ZN2js6detail26SharedFloat64ArrayClassPtrE"]
pub static SharedFloat64ArrayClassPtr: *const Class;
}
extern "C" {
#[link_name = "_ZN2JS18GCTraceKindToAsciiE13JSGCTraceKind"]
pub fn GCTraceKindToAscii(kind: JSGCTraceKind) -> *const ::libc::c_char;
#[link_name =
"_Z18JS_CallValueTracerP8JSTracerPN2JS4HeapINS1_5ValueEEEPKc"]
pub fn JS_CallValueTracer(trc: *mut JSTracer, valuep: *mut Heap<Value>,
name: *const ::libc::c_char);
#[link_name = "_Z15JS_CallIdTracerP8JSTracerPN2JS4HeapI4jsidEEPKc"]
pub fn JS_CallIdTracer(trc: *mut JSTracer, idp: *mut Heap<jsid>,
name: *const ::libc::c_char);
#[link_name =
"_Z19JS_CallObjectTracerP8JSTracerPN2JS4HeapIP8JSObjectEEPKc"]
pub fn JS_CallObjectTracer(trc: *mut JSTracer,
objp: *mut Heap<*mut JSObject>,
name: *const ::libc::c_char);
#[link_name =
"_Z19JS_CallStringTracerP8JSTracerPN2JS4HeapIP8JSStringEEPKc"]
pub fn JS_CallStringTracer(trc: *mut JSTracer,
strp: *mut Heap<*mut JSString>,
name: *const ::libc::c_char);
#[link_name =
"_Z19JS_CallScriptTracerP8JSTracerPN2JS4HeapIP8JSScriptEEPKc"]
pub fn JS_CallScriptTracer(trc: *mut JSTracer,
scriptp: *mut Heap<*mut JSScript>,
name: *const ::libc::c_char);
#[link_name =
"_Z21JS_CallFunctionTracerP8JSTracerPN2JS4HeapIP10JSFunctionEEPKc"]
pub fn JS_CallFunctionTracer(trc: *mut JSTracer,
funp: *mut Heap<*mut JSFunction>,
name: *const ::libc::c_char);
#[link_name =
"_Z29JS_CallUnbarrieredValueTracerP8JSTracerPN2JS5ValueEPKc"]
pub fn JS_CallUnbarrieredValueTracer(trc: *mut JSTracer,
valuep: *mut Value,
name: *const ::libc::c_char);
#[link_name = "_Z26JS_CallUnbarrieredIdTracerP8JSTracerP4jsidPKc"]
pub fn JS_CallUnbarrieredIdTracer(trc: *mut JSTracer, idp: *mut jsid,
name: *const ::libc::c_char);
#[link_name =
"_Z30JS_CallUnbarrieredObjectTracerP8JSTracerPP8JSObjectPKc"]
pub fn JS_CallUnbarrieredObjectTracer(trc: *mut JSTracer,
objp: *mut *mut JSObject,
name: *const ::libc::c_char);
#[link_name =
"_Z30JS_CallUnbarrieredStringTracerP8JSTracerPP8JSStringPKc"]
pub fn JS_CallUnbarrieredStringTracer(trc: *mut JSTracer,
strp: *mut *mut JSString,
name: *const ::libc::c_char);
#[link_name =
"_Z30JS_CallUnbarrieredScriptTracerP8JSTracerPP8JSScriptPKc"]
pub fn JS_CallUnbarrieredScriptTracer(trc: *mut JSTracer,
scriptp: *mut *mut JSScript,
name: *const ::libc::c_char);
#[link_name =
"_Z26JS_CallTenuredObjectTracerP8JSTracerPN2JS11TenuredHeapIP8JSObjectEEPKc"]
pub fn JS_CallTenuredObjectTracer(trc: *mut JSTracer,
objp: *mut TenuredHeap<*mut JSObject>,
name: *const ::libc::c_char);
#[link_name = "_Z16JS_TraceChildrenP8JSTracerPv13JSGCTraceKind"]
pub fn JS_TraceChildren(trc: *mut JSTracer, thing: *mut ::libc::c_void,
kind: JSGCTraceKind);
#[link_name = "_Z15JS_TraceRuntimeP8JSTracer"]
pub fn JS_TraceRuntime(trc: *mut JSTracer);
#[link_name = "_Z20JS_GetTraceThingInfoPcmP8JSTracerPv13JSGCTraceKindb"]
pub fn JS_GetTraceThingInfo(buf: *mut ::libc::c_char, bufsize: size_t,
trc: *mut JSTracer,
thing: *mut ::libc::c_void,
kind: JSGCTraceKind, includeDetails: bool);
#[link_name = "_ZN2js29CurrentThreadCanAccessRuntimeEP9JSRuntime"]
pub fn CurrentThreadCanAccessRuntime(rt: *mut JSRuntime) -> bool;
#[link_name = "_ZN2js26CurrentThreadCanAccessZoneEPN2JS4ZoneE"]
pub fn CurrentThreadCanAccessZone(zone: *mut Zone) -> bool;
#[link_name =
"_ZN2js2gc20AssertGCThingHasTypeEPNS0_4CellE13JSGCTraceKind"]
pub fn AssertGCThingHasType(cell: *mut Cell, kind: JSGCTraceKind);
#[link_name = "_ZN2JS13GetObjectZoneEP8JSObject"]
pub fn GetObjectZone(obj: *mut JSObject) -> *mut Zone;
#[link_name = "_ZN2JS16PrepareZoneForGCEPNS_4ZoneE"]
pub fn PrepareZoneForGC(zone: *mut Zone);
#[link_name = "_ZN2JS16PrepareForFullGCEP9JSRuntime"]
pub fn PrepareForFullGC(rt: *mut JSRuntime);
#[link_name = "_ZN2JS23PrepareForIncrementalGCEP9JSRuntime"]
pub fn PrepareForIncrementalGC(rt: *mut JSRuntime);
#[link_name = "_ZN2JS13IsGCScheduledEP9JSRuntime"]
pub fn IsGCScheduled(rt: *mut JSRuntime) -> bool;
#[link_name = "_ZN2JS13SkipZoneForGCEPNS_4ZoneE"]
pub fn SkipZoneForGC(zone: *mut Zone);
#[link_name =
"_ZN2JS11GCForReasonEP9JSRuntime18JSGCInvocationKindNS_8gcreason6ReasonE"]
pub fn GCForReason(rt: *mut JSRuntime, gckind: JSGCInvocationKind,
reason: Reason);
#[link_name =
"_ZN2JS18StartIncrementalGCEP9JSRuntime18JSGCInvocationKindNS_8gcreason6ReasonEl"]
pub fn StartIncrementalGC(rt: *mut JSRuntime, gckind: JSGCInvocationKind,
reason: Reason, millis: i64);
#[link_name =
"_ZN2JS18IncrementalGCSliceEP9JSRuntimeNS_8gcreason6ReasonEl"]
pub fn IncrementalGCSlice(rt: *mut JSRuntime, reason: Reason,
millis: i64);
#[link_name =
"_ZN2JS19FinishIncrementalGCEP9JSRuntimeNS_8gcreason6ReasonE"]
pub fn FinishIncrementalGC(rt: *mut JSRuntime, reason: Reason);
#[link_name =
"_ZN2JS18SetGCSliceCallbackEP9JSRuntimePFvS1_NS_10GCProgressERKNS_13GCDescriptionEE"]
pub fn SetGCSliceCallback(rt: *mut JSRuntime, callback: GCSliceCallback)
-> GCSliceCallback;
#[link_name = "_ZN2JS20DisableIncrementalGCEP9JSRuntime"]
pub fn DisableIncrementalGC(rt: *mut JSRuntime);
#[link_name = "_ZN2JS22IsIncrementalGCEnabledEP9JSRuntime"]
pub fn IsIncrementalGCEnabled(rt: *mut JSRuntime) -> bool;
#[link_name = "_ZN2JS25IsIncrementalGCInProgressEP9JSRuntime"]
pub fn IsIncrementalGCInProgress(rt: *mut JSRuntime) -> bool;
#[link_name = "_ZN2JS26IsIncrementalBarrierNeededEP9JSRuntime"]
pub fn IsIncrementalBarrierNeeded(rt: *mut JSRuntime) -> bool;
#[link_name = "_ZN2JS26IsIncrementalBarrierNeededEP9JSContext"]
pub fn IsIncrementalBarrierNeeded1(cx: *mut JSContext) -> bool;
#[link_name = "_ZN2JS27IncrementalReferenceBarrierENS_9GCCellPtrE"]
pub fn IncrementalReferenceBarrier(thing: GCCellPtr);
#[link_name = "_ZN2JS23IncrementalValueBarrierERKNS_5ValueE"]
pub fn IncrementalValueBarrier(v: &Value);
#[link_name = "_ZN2JS24IncrementalObjectBarrierEP8JSObject"]
pub fn IncrementalObjectBarrier(obj: *mut JSObject);
#[link_name = "_ZN2JS16WasIncrementalGCEP9JSRuntime"]
pub fn WasIncrementalGC(rt: *mut JSRuntime) -> bool;
#[link_name = "_ZN2JS23IsGenerationalGCEnabledEP9JSRuntime"]
pub fn IsGenerationalGCEnabled(rt: *mut JSRuntime) -> bool;
#[link_name = "_ZN2JS11GetGCNumberEv"]
pub fn GetGCNumber() -> size_t;
#[link_name = "_ZN2JS15ShrinkGCBuffersEP9JSRuntime"]
pub fn ShrinkGCBuffers(rt: *mut JSRuntime);
#[link_name = "_ZN2JS28UnmarkGrayGCThingRecursivelyENS_9GCCellPtrE"]
pub fn UnmarkGrayGCThingRecursively(thing: GCCellPtr) -> bool;
#[link_name = "_ZN2JS6PokeGCEP9JSRuntime"]
pub fn PokeGC(rt: *mut JSRuntime);
#[link_name = "_ZN2JS14NotifyDidPaintEP9JSRuntime"]
pub fn NotifyDidPaint(rt: *mut JSRuntime);
#[link_name = "_ZN2JS11isGCEnabledEv"]
pub fn isGCEnabled() -> bool;
#[link_name = "_ZN2JS19HeapCellPostBarrierEPPN2js2gc4CellE"]
pub fn HeapCellPostBarrier(cellp: *mut *mut Cell);
#[link_name = "_ZN2JS16HeapCellRelocateEPPN2js2gc4CellE"]
pub fn HeapCellRelocate(cellp: *mut *mut Cell);
#[link_name = "_ZN2JS26AssertGCThingMustBeTenuredEP8JSObject"]
pub fn AssertGCThingMustBeTenured(obj: *mut JSObject);
#[link_name = "_ZN2JS20HeapValuePostBarrierEPNS_5ValueE"]
pub fn HeapValuePostBarrier(valuep: *mut Value);
#[link_name = "_ZN2JS17HeapValueRelocateEPNS_5ValueE"]
pub fn HeapValueRelocate(valuep: *mut Value);
#[link_name = "_Z14JS_ComputeThisP9JSContextPN2JS5ValueE"]
pub fn JS_ComputeThis(cx: *mut JSContext, vp: *mut Value) -> Value;
#[link_name = "_ZN2JS6detail25CheckIsValidConstructibleENS_5ValueE"]
pub fn CheckIsValidConstructible(v: Value);
#[link_name = "_Z23INTERNED_STRING_TO_JSIDP9JSContextP8JSString"]
pub fn INTERNED_STRING_TO_JSID(cx: *mut JSContext, str: *mut JSString)
-> jsid;
#[link_name = "_Z24JS_StringHasBeenInternedP9JSContextP8JSString"]
pub fn JS_StringHasBeenInterned(cx: *mut JSContext, str: *mut JSString)
-> bool;
#[link_name = "_Z11JS_CallOnceP14PRCallOnceTypePFbvE"]
pub fn JS_CallOnce(once: *mut JSCallOnceType, func: JSInitCallback)
-> bool;
#[link_name = "_Z6JS_Nowv"]
pub fn JS_Now() -> i64;
#[link_name = "_Z14JS_GetNaNValueP9JSContext"]
pub fn JS_GetNaNValue(cx: *mut JSContext) -> jsval;
#[link_name = "_Z27JS_GetNegativeInfinityValueP9JSContext"]
pub fn JS_GetNegativeInfinityValue(cx: *mut JSContext) -> jsval;
#[link_name = "_Z27JS_GetPositiveInfinityValueP9JSContext"]
pub fn JS_GetPositiveInfinityValue(cx: *mut JSContext) -> jsval;
#[link_name = "_Z22JS_GetEmptyStringValueP9JSContext"]
pub fn JS_GetEmptyStringValue(cx: *mut JSContext) -> jsval;
#[link_name = "_Z17JS_GetEmptyStringP9JSRuntime"]
pub fn JS_GetEmptyString(rt: *mut JSRuntime) -> *mut JSString;
#[link_name =
"_Z16JS_ValueToObjectP9JSContextN2JS6HandleINS1_5ValueEEENS1_13MutableHandleIP8JSObjectEE"]
pub fn JS_ValueToObject(cx: *mut JSContext, v: HandleValue,
objp: MutableHandleObject) -> bool;
#[link_name =
"_Z18JS_ValueToFunctionP9JSContextN2JS6HandleINS1_5ValueEEE"]
pub fn JS_ValueToFunction(cx: *mut JSContext, v: HandleValue)
-> *mut JSFunction;
#[link_name =
"_Z21JS_ValueToConstructorP9JSContextN2JS6HandleINS1_5ValueEEE"]
pub fn JS_ValueToConstructor(cx: *mut JSContext, v: HandleValue)
-> *mut JSFunction;
#[link_name = "_Z16JS_ValueToSourceP9JSContextN2JS6HandleINS1_5ValueEEE"]
pub fn JS_ValueToSource(cx: *mut JSContext, v: Handle<Value>)
-> *mut JSString;
#[link_name = "_Z16JS_DoubleIsInt32dPi"]
pub fn JS_DoubleIsInt32(d: f64, ip: *mut i32) -> bool;
#[link_name = "_Z14JS_TypeOfValueP9JSContextN2JS6HandleINS1_5ValueEEE"]
pub fn JS_TypeOfValue(cx: *mut JSContext, v: Handle<Value>) -> JSType;
#[link_name =
"_Z16JS_StrictlyEqualP9JSContextN2JS6HandleINS1_5ValueEEES4_Pb"]
pub fn JS_StrictlyEqual(cx: *mut JSContext, v1: Handle<Value>,
v2: Handle<Value>, equal: *mut bool) -> bool;
#[link_name =
"_Z15JS_LooselyEqualP9JSContextN2JS6HandleINS1_5ValueEEES4_Pb"]
pub fn JS_LooselyEqual(cx: *mut JSContext, v1: Handle<Value>,
v2: Handle<Value>, equal: *mut bool) -> bool;
#[link_name = "_Z12JS_SameValueP9JSContextN2JS6HandleINS1_5ValueEEES4_Pb"]
pub fn JS_SameValue(cx: *mut JSContext, v1: Handle<Value>,
v2: Handle<Value>, same: *mut bool) -> bool;
#[link_name = "_Z24JS_IsBuiltinEvalFunctionP10JSFunction"]
pub fn JS_IsBuiltinEvalFunction(fun: *mut JSFunction) -> bool;
#[link_name = "_Z31JS_IsBuiltinFunctionConstructorP10JSFunction"]
pub fn JS_IsBuiltinFunctionConstructor(fun: *mut JSFunction) -> bool;
#[link_name = "_Z7JS_Initv"]
pub fn JS_Init() -> bool;
#[link_name = "_Z11JS_ShutDownv"]
pub fn JS_ShutDown();
#[link_name = "_Z13JS_NewRuntimejjP9JSRuntime"]
pub fn JS_NewRuntime(maxbytes: u32, maxNurseryBytes: u32,
parentRuntime: *mut JSRuntime) -> *mut JSRuntime;
#[link_name = "_Z17JS_DestroyRuntimeP9JSRuntime"]
pub fn JS_DestroyRuntime(rt: *mut JSRuntime);
#[link_name = "_Z24JS_SetICUMemoryFunctionsPFPvPKvmEPFS_S1_S_mEPFvS1_S_E"]
pub fn JS_SetICUMemoryFunctions(allocFn: JS_ICUAllocFn,
reallocFn: JS_ICUReallocFn,
freeFn: JS_ICUFreeFn) -> bool;
#[link_name = "_Z20JS_GetRuntimePrivateP9JSRuntime"]
pub fn JS_GetRuntimePrivate(rt: *mut JSRuntime) -> *mut ::libc::c_void;
#[link_name = "_Z13JS_GetRuntimeP9JSContext"]
pub fn JS_GetRuntime(cx: *mut JSContext) -> *mut JSRuntime;
#[link_name = "_Z19JS_GetParentRuntimeP9JSContext"]
pub fn JS_GetParentRuntime(cx: *mut JSContext) -> *mut JSRuntime;
#[link_name = "_Z20JS_SetRuntimePrivateP9JSRuntimePv"]
pub fn JS_SetRuntimePrivate(rt: *mut JSRuntime,
data: *mut ::libc::c_void);
#[link_name = "_Z15JS_BeginRequestP9JSContext"]
pub fn JS_BeginRequest(cx: *mut JSContext);
#[link_name = "_Z13JS_EndRequestP9JSContext"]
pub fn JS_EndRequest(cx: *mut JSContext);
#[link_name = "_Z21JS_SetContextCallbackP9JSRuntimePFbP9JSContextjPvES3_"]
pub fn JS_SetContextCallback(rt: *mut JSRuntime,
cxCallback: JSContextCallback,
data: *mut ::libc::c_void);
#[link_name = "_Z13JS_NewContextP9JSRuntimem"]
pub fn JS_NewContext(rt: *mut JSRuntime, stackChunkSize: size_t)
-> *mut JSContext;
#[link_name = "_Z17JS_DestroyContextP9JSContext"]
pub fn JS_DestroyContext(cx: *mut JSContext);
#[link_name = "_Z21JS_DestroyContextNoGCP9JSContext"]
pub fn JS_DestroyContextNoGC(cx: *mut JSContext);
#[link_name = "_Z20JS_GetContextPrivateP9JSContext"]
pub fn JS_GetContextPrivate(cx: *mut JSContext) -> *mut ::libc::c_void;
#[link_name = "_Z20JS_SetContextPrivateP9JSContextPv"]
pub fn JS_SetContextPrivate(cx: *mut JSContext,
data: *mut ::libc::c_void);
#[link_name = "_Z26JS_GetSecondContextPrivateP9JSContext"]
pub fn JS_GetSecondContextPrivate(cx: *mut JSContext)
-> *mut ::libc::c_void;
#[link_name = "_Z26JS_SetSecondContextPrivateP9JSContextPv"]
pub fn JS_SetSecondContextPrivate(cx: *mut JSContext,
data: *mut ::libc::c_void);
#[link_name = "_Z18JS_ContextIteratorP9JSRuntimePP9JSContext"]
pub fn JS_ContextIterator(rt: *mut JSRuntime, iterp: *mut *mut JSContext)
-> *mut JSContext;
#[link_name = "_Z13JS_GetVersionP9JSContext"]
pub fn JS_GetVersion(cx: *mut JSContext) -> JSVersion;
#[link_name = "_Z27JS_SetVersionForCompartmentP13JSCompartment9JSVersion"]
pub fn JS_SetVersionForCompartment(compartment: *mut JSCompartment,
version: JSVersion);
#[link_name = "_Z18JS_VersionToString9JSVersion"]
pub fn JS_VersionToString(version: JSVersion) -> *const ::libc::c_char;
#[link_name = "_Z18JS_StringToVersionPKc"]
pub fn JS_StringToVersion(string: *const ::libc::c_char) -> JSVersion;
#[link_name = "_ZN2JS17RuntimeOptionsRefEP9JSRuntime"]
pub fn RuntimeOptionsRef(rt: *mut JSRuntime) -> *mut RuntimeOptions;
#[link_name = "_ZN2JS17RuntimeOptionsRefEP9JSContext"]
pub fn RuntimeOptionsRef1(cx: *mut JSContext) -> *mut RuntimeOptions;
#[link_name = "_ZN2JS17ContextOptionsRefEP9JSContext"]
pub fn ContextOptionsRef(cx: *mut JSContext) -> *mut ContextOptions;
#[link_name = "_Z27JS_GetImplementationVersionv"]
pub fn JS_GetImplementationVersion() -> *const ::libc::c_char;
#[link_name =
"_Z32JS_SetDestroyCompartmentCallbackP9JSRuntimePFvP8JSFreeOpP13JSCompartmentE"]
pub fn JS_SetDestroyCompartmentCallback(rt: *mut JSRuntime,
callback:
JSDestroyCompartmentCallback);
#[link_name = "_Z25JS_SetDestroyZoneCallbackP9JSRuntimePFvPN2JS4ZoneEE"]
pub fn JS_SetDestroyZoneCallback(rt: *mut JSRuntime,
callback: JSZoneCallback);
#[link_name = "_Z23JS_SetSweepZoneCallbackP9JSRuntimePFvPN2JS4ZoneEE"]
pub fn JS_SetSweepZoneCallback(rt: *mut JSRuntime,
callback: JSZoneCallback);
#[link_name =
"_Z29JS_SetCompartmentNameCallbackP9JSRuntimePFvS0_P13JSCompartmentPcmE"]
pub fn JS_SetCompartmentNameCallback(rt: *mut JSRuntime,
callback: JSCompartmentNameCallback);
#[link_name =
"_Z25JS_SetWrapObjectCallbacksP9JSRuntimePK21JSWrapObjectCallbacks"]
pub fn JS_SetWrapObjectCallbacks(rt: *mut JSRuntime,
callbacks: *const JSWrapObjectCallbacks);
#[link_name = "_Z24JS_SetCompartmentPrivateP13JSCompartmentPv"]
pub fn JS_SetCompartmentPrivate(compartment: *mut JSCompartment,
data: *mut ::libc::c_void);
#[link_name = "_Z24JS_GetCompartmentPrivateP13JSCompartment"]
pub fn JS_GetCompartmentPrivate(compartment: *mut JSCompartment)
-> *mut ::libc::c_void;
#[link_name = "_Z18JS_SetZoneUserDataPN2JS4ZoneEPv"]
pub fn JS_SetZoneUserData(zone: *mut Zone, data: *mut ::libc::c_void);
#[link_name = "_Z18JS_GetZoneUserDataPN2JS4ZoneE"]
pub fn JS_GetZoneUserData(zone: *mut Zone) -> *mut ::libc::c_void;
#[link_name =
"_Z13JS_WrapObjectP9JSContextN2JS13MutableHandleIP8JSObjectEE"]
pub fn JS_WrapObject(cx: *mut JSContext, objp: MutableHandleObject)
-> bool;
#[link_name =
"_Z12JS_WrapValueP9JSContextN2JS13MutableHandleINS1_5ValueEEE"]
pub fn JS_WrapValue(cx: *mut JSContext, vp: MutableHandleValue) -> bool;
#[link_name =
"_Z19JS_TransplantObjectP9JSContextN2JS6HandleIP8JSObjectEES5_"]
pub fn JS_TransplantObject(cx: *mut JSContext, origobj: HandleObject,
target: HandleObject) -> *mut JSObject;
#[link_name =
"_Z34JS_RefreshCrossCompartmentWrappersP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_RefreshCrossCompartmentWrappers(cx: *mut JSContext,
obj: Handle<*mut JSObject>)
-> bool;
#[link_name = "_Z19JS_EnterCompartmentP9JSContextP8JSObject"]
pub fn JS_EnterCompartment(cx: *mut JSContext, target: *mut JSObject)
-> *mut JSCompartment;
#[link_name = "_Z19JS_LeaveCompartmentP9JSContextP13JSCompartment"]
pub fn JS_LeaveCompartment(cx: *mut JSContext,
oldCompartment: *mut JSCompartment);
#[link_name =
"_Z22JS_IterateCompartmentsP9JSRuntimePvPFvS0_S1_P13JSCompartmentE"]
pub fn JS_IterateCompartments(rt: *mut JSRuntime,
data: *mut ::libc::c_void,
compartmentCallback:
JSIterateCompartmentCallback);
#[link_name =
"_Z22JS_InitStandardClassesP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_InitStandardClasses(cx: *mut JSContext,
obj: Handle<*mut JSObject>) -> bool;
#[link_name =
"_Z23JS_ResolveStandardClassP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEEPb"]
pub fn JS_ResolveStandardClass(cx: *mut JSContext, obj: HandleObject,
id: HandleId, resolved: *mut bool) -> bool;
#[link_name =
"_Z27JS_EnumerateStandardClassesP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_EnumerateStandardClasses(cx: *mut JSContext, obj: HandleObject)
-> bool;
#[link_name =
"_Z17JS_GetClassObjectP9JSContext10JSProtoKeyN2JS13MutableHandleIP8JSObjectEE"]
pub fn JS_GetClassObject(cx: *mut JSContext, key: JSProtoKey,
objp: MutableHandle<*mut JSObject>) -> bool;
#[link_name =
"_Z20JS_GetClassPrototypeP9JSContext10JSProtoKeyN2JS13MutableHandleIP8JSObjectEE"]
pub fn JS_GetClassPrototype(cx: *mut JSContext, key: JSProtoKey,
objp: MutableHandle<*mut JSObject>) -> bool;
#[link_name = "_ZN2JS24IdentifyStandardInstanceEP8JSObject"]
pub fn IdentifyStandardInstance(obj: *mut JSObject) -> JSProtoKey;
#[link_name = "_ZN2JS25IdentifyStandardPrototypeEP8JSObject"]
pub fn IdentifyStandardPrototype(obj: *mut JSObject) -> JSProtoKey;
#[link_name = "_ZN2JS35IdentifyStandardInstanceOrPrototypeEP8JSObject"]
pub fn IdentifyStandardInstanceOrPrototype(obj: *mut JSObject)
-> JSProtoKey;
#[link_name = "_ZN2JS27IdentifyStandardConstructorEP8JSObject"]
pub fn IdentifyStandardConstructor(obj: *mut JSObject) -> JSProtoKey;
#[link_name =
"_ZN2JS12ProtoKeyToIdEP9JSContext10JSProtoKeyNS_13MutableHandleI4jsidEE"]
pub fn ProtoKeyToId(cx: *mut JSContext, key: JSProtoKey,
idp: MutableHandleId);
#[link_name = "_Z15JS_IdToProtoKeyP9JSContextN2JS6HandleI4jsidEE"]
pub fn JS_IdToProtoKey(cx: *mut JSContext, id: HandleId) -> JSProtoKey;
#[link_name =
"_Z23JS_GetFunctionPrototypeP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_GetFunctionPrototype(cx: *mut JSContext, forObj: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z21JS_GetObjectPrototypeP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_GetObjectPrototype(cx: *mut JSContext, forObj: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z20JS_GetArrayPrototypeP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_GetArrayPrototype(cx: *mut JSContext, forObj: HandleObject)
-> *mut JSObject;
#[link_name = "_Z20JS_GetErrorPrototypeP9JSContext"]
pub fn JS_GetErrorPrototype(cx: *mut JSContext) -> *mut JSObject;
#[link_name = "_Z21JS_GetGlobalForObjectP9JSContextP8JSObject"]
pub fn JS_GetGlobalForObject(cx: *mut JSContext, obj: *mut JSObject)
-> *mut JSObject;
#[link_name = "_Z17JS_IsGlobalObjectP8JSObject"]
pub fn JS_IsGlobalObject(obj: *mut JSObject) -> bool;
#[link_name =
"_Z32JS_GetGlobalForCompartmentOrNullP9JSContextP13JSCompartment"]
pub fn JS_GetGlobalForCompartmentOrNull(cx: *mut JSContext,
c: *mut JSCompartment)
-> *mut JSObject;
#[link_name = "_ZN2JS19CurrentGlobalOrNullEP9JSContext"]
pub fn CurrentGlobalOrNull(cx: *mut JSContext) -> *mut JSObject;
#[link_name = "_Z14JS_InitReflectP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_InitReflect(cx: *mut JSContext, global: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z27JS_DefineProfilingFunctionsP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_DefineProfilingFunctions(cx: *mut JSContext, obj: HandleObject)
-> bool;
#[link_name =
"_Z23JS_DefineDebuggerObjectP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_DefineDebuggerObject(cx: *mut JSContext, obj: HandleObject)
-> bool;
#[link_name = "_Z9JS_mallocP9JSContextm"]
pub fn JS_malloc(cx: *mut JSContext, nbytes: size_t)
-> *mut ::libc::c_void;
#[link_name = "_Z10JS_reallocP9JSContextPvmm"]
pub fn JS_realloc(cx: *mut JSContext, p: *mut ::libc::c_void,
oldBytes: size_t, newBytes: size_t)
-> *mut ::libc::c_void;
#[link_name = "_Z7JS_freeP9JSContextPv"]
pub fn JS_free(cx: *mut JSContext, p: *mut ::libc::c_void);
#[link_name = "_Z9JS_freeopP8JSFreeOpPv"]
pub fn JS_freeop(fop: *mut JSFreeOp, p: *mut ::libc::c_void);
#[link_name = "_Z19JS_GetDefaultFreeOpP9JSRuntime"]
pub fn JS_GetDefaultFreeOp(rt: *mut JSRuntime) -> *mut JSFreeOp;
#[link_name = "_Z22JS_updateMallocCounterP9JSContextm"]
pub fn JS_updateMallocCounter(cx: *mut JSContext, nbytes: size_t);
#[link_name = "_Z9JS_strdupP9JSContextPKc"]
pub fn JS_strdup(cx: *mut JSContext, s: *const ::libc::c_char)
-> *mut ::libc::c_char;
#[link_name = "_Z9JS_strdupP9JSRuntimePKc"]
pub fn JS_strdup1(rt: *mut JSRuntime, s: *const ::libc::c_char)
-> *mut ::libc::c_char;
#[link_name =
"_Z24JS_AddExtraGCRootsTracerP9JSRuntimePFvP8JSTracerPvES3_"]
pub fn JS_AddExtraGCRootsTracer(rt: *mut JSRuntime,
traceOp: JSTraceDataOp,
data: *mut ::libc::c_void) -> bool;
#[link_name =
"_Z27JS_RemoveExtraGCRootsTracerP9JSRuntimePFvP8JSTracerPvES3_"]
pub fn JS_RemoveExtraGCRootsTracer(rt: *mut JSRuntime,
traceOp: JSTraceDataOp,
data: *mut ::libc::c_void);
#[link_name = "_Z5JS_GCP9JSRuntime"]
pub fn JS_GC(rt: *mut JSRuntime);
#[link_name = "_Z10JS_MaybeGCP9JSContext"]
pub fn JS_MaybeGC(cx: *mut JSContext);
#[link_name = "_Z16JS_SetGCCallbackP9JSRuntimePFvS0_10JSGCStatusPvES2_"]
pub fn JS_SetGCCallback(rt: *mut JSRuntime, cb: JSGCCallback,
data: *mut ::libc::c_void);
#[link_name =
"_Z22JS_AddFinalizeCallbackP9JSRuntimePFvP8JSFreeOp16JSFinalizeStatusbPvES4_"]
pub fn JS_AddFinalizeCallback(rt: *mut JSRuntime, cb: JSFinalizeCallback,
data: *mut ::libc::c_void) -> bool;
#[link_name =
"_Z25JS_RemoveFinalizeCallbackP9JSRuntimePFvP8JSFreeOp16JSFinalizeStatusbPvE"]
pub fn JS_RemoveFinalizeCallback(rt: *mut JSRuntime,
cb: JSFinalizeCallback);
#[link_name = "_Z20JS_IsGCMarkingTracerP8JSTracer"]
pub fn JS_IsGCMarkingTracer(trc: *mut JSTracer) -> bool;
#[link_name = "_Z25JS_AddWeakPointerCallbackP9JSRuntimePFvS0_PvES1_"]
pub fn JS_AddWeakPointerCallback(rt: *mut JSRuntime,
cb: JSWeakPointerCallback,
data: *mut ::libc::c_void) -> bool;
#[link_name = "_Z28JS_RemoveWeakPointerCallbackP9JSRuntimePFvS0_PvE"]
pub fn JS_RemoveWeakPointerCallback(rt: *mut JSRuntime,
cb: JSWeakPointerCallback);
#[link_name = "_Z27JS_UpdateWeakPointerAfterGCPN2JS4HeapIP8JSObjectEE"]
pub fn JS_UpdateWeakPointerAfterGC(objp: *mut Heap<*mut JSObject>);
#[link_name = "_Z38JS_UpdateWeakPointerAfterGCUnbarrieredPP8JSObject"]
pub fn JS_UpdateWeakPointerAfterGCUnbarriered(objp: *mut *mut JSObject);
#[link_name = "_Z17JS_SetGCParameterP9JSRuntime12JSGCParamKeyj"]
pub fn JS_SetGCParameter(rt: *mut JSRuntime, key: JSGCParamKey,
value: u32);
#[link_name = "_Z17JS_GetGCParameterP9JSRuntime12JSGCParamKey"]
pub fn JS_GetGCParameter(rt: *mut JSRuntime, key: JSGCParamKey) -> u32;
#[link_name = "_Z26JS_SetGCParameterForThreadP9JSContext12JSGCParamKeyj"]
pub fn JS_SetGCParameterForThread(cx: *mut JSContext, key: JSGCParamKey,
value: u32);
#[link_name = "_Z26JS_GetGCParameterForThreadP9JSContext12JSGCParamKey"]
pub fn JS_GetGCParameterForThread(cx: *mut JSContext, key: JSGCParamKey)
-> u32;
#[link_name = "_Z40JS_SetGCParametersBasedOnAvailableMemoryP9JSRuntimej"]
pub fn JS_SetGCParametersBasedOnAvailableMemory(rt: *mut JSRuntime,
availMem: u32);
#[link_name =
"_Z20JS_NewExternalStringP9JSContextPKDsmPK17JSStringFinalizer"]
pub fn JS_NewExternalString(cx: *mut JSContext, chars: *const u16,
length: size_t, fin: *const JSStringFinalizer)
-> *mut JSString;
#[link_name = "_Z19JS_IsExternalStringP8JSString"]
pub fn JS_IsExternalString(str: *mut JSString) -> bool;
#[link_name = "_Z29JS_GetExternalStringFinalizerP8JSString"]
pub fn JS_GetExternalStringFinalizer(str: *mut JSString)
-> *const JSStringFinalizer;
#[link_name = "_Z22JS_SetNativeStackQuotaP9JSRuntimemmm"]
pub fn JS_SetNativeStackQuota(cx: *mut JSRuntime,
systemCodeStackSize: size_t,
trustedScriptStackSize: size_t,
untrustedScriptStackSize: size_t);
#[link_name = "_Z16JS_IdArrayLengthP9JSContextP9JSIdArray"]
pub fn JS_IdArrayLength(cx: *mut JSContext, ida: *mut JSIdArray) -> i32;
#[link_name = "_Z13JS_IdArrayGetP9JSContextP9JSIdArrayj"]
pub fn JS_IdArrayGet(cx: *mut JSContext, ida: *mut JSIdArray, index: u32)
-> jsid;
#[link_name = "_Z17JS_DestroyIdArrayP9JSContextP9JSIdArray"]
pub fn JS_DestroyIdArray(cx: *mut JSContext, ida: *mut JSIdArray);
#[link_name =
"_Z12JS_ValueToIdP9JSContextN2JS6HandleINS1_5ValueEEENS1_13MutableHandleI4jsidEE"]
pub fn JS_ValueToId(cx: *mut JSContext, v: HandleValue,
idp: MutableHandleId) -> bool;
#[link_name =
"_Z13JS_StringToIdP9JSContextN2JS6HandleIP8JSStringEENS1_13MutableHandleI4jsidEE"]
pub fn JS_StringToId(cx: *mut JSContext, s: HandleString,
idp: MutableHandleId) -> bool;
#[link_name =
"_Z12JS_IdToValueP9JSContext4jsidN2JS13MutableHandleINS2_5ValueEEE"]
pub fn JS_IdToValue(cx: *mut JSContext, id: jsid,
vp: MutableHandle<Value>) -> bool;
#[link_name =
"_Z15JS_DefaultValueP9JSContextN2JS6HandleIP8JSObjectEE6JSTypeNS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_DefaultValue(cx: *mut JSContext, obj: Handle<*mut JSObject>,
hint: JSType, vp: MutableHandle<Value>) -> bool;
#[link_name =
"_Z15JS_PropertyStubP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_PropertyStub(cx: *mut JSContext, obj: HandleObject,
id: HandleId, vp: MutableHandleValue) -> bool;
#[link_name =
"_Z21JS_StrictPropertyStubP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS1_13MutableHandleINS1_5ValueEEERNS1_14ObjectOpResultE"]
pub fn JS_StrictPropertyStub(cx: *mut JSContext, obj: HandleObject,
id: HandleId, vp: MutableHandleValue,
result: &mut ObjectOpResult) -> bool;
#[link_name =
"_Z12JS_InitClassP9JSContextN2JS6HandleIP8JSObjectEES5_PK7JSClassPFbS0_jPNS1_5ValueEEjPK14JSPropertySpecPK14JSFunctionSpecSF_SI_"]
pub fn JS_InitClass(cx: *mut JSContext, obj: HandleObject,
parent_proto: HandleObject, clasp: *const JSClass,
constructor: JSNative, nargs: u32,
ps: *const JSPropertySpec, fs: *const JSFunctionSpec,
static_ps: *const JSPropertySpec,
static_fs: *const JSFunctionSpec) -> *mut JSObject;
#[link_name =
"_Z30JS_LinkConstructorAndPrototypeP9JSContextN2JS6HandleIP8JSObjectEES5_"]
pub fn JS_LinkConstructorAndPrototype(cx: *mut JSContext,
ctor: Handle<*mut JSObject>,
proto: Handle<*mut JSObject>)
-> bool;
#[link_name = "_Z11JS_GetClassP8JSObject"]
pub fn JS_GetClass(obj: *mut JSObject) -> *const JSClass;
#[link_name =
"_Z13JS_InstanceOfP9JSContextN2JS6HandleIP8JSObjectEEPK7JSClassPNS1_8CallArgsE"]
pub fn JS_InstanceOf(cx: *mut JSContext, obj: Handle<*mut JSObject>,
clasp: *const JSClass, args: *mut CallArgs) -> bool;
#[link_name =
"_Z14JS_HasInstanceP9JSContextN2JS6HandleIP8JSObjectEENS2_INS1_5ValueEEEPb"]
pub fn JS_HasInstance(cx: *mut JSContext, obj: Handle<*mut JSObject>,
v: Handle<Value>, bp: *mut bool) -> bool;
#[link_name = "_Z13JS_GetPrivateP8JSObject"]
pub fn JS_GetPrivate(obj: *mut JSObject) -> *mut ::libc::c_void;
#[link_name = "_Z13JS_SetPrivateP8JSObjectPv"]
pub fn JS_SetPrivate(obj: *mut JSObject, data: *mut ::libc::c_void);
#[link_name =
"_Z21JS_GetInstancePrivateP9JSContextN2JS6HandleIP8JSObjectEEPK7JSClassPNS1_8CallArgsE"]
pub fn JS_GetInstancePrivate(cx: *mut JSContext,
obj: Handle<*mut JSObject>,
clasp: *const JSClass, args: *mut CallArgs)
-> *mut ::libc::c_void;
#[link_name =
"_Z15JS_GetPrototypeP9JSContextN2JS6HandleIP8JSObjectEENS1_13MutableHandleIS4_EE"]
pub fn JS_GetPrototype(cx: *mut JSContext, obj: HandleObject,
protop: MutableHandleObject) -> bool;
#[link_name = "_Z15JS_SetPrototypeP9JSContextN2JS6HandleIP8JSObjectEES5_"]
pub fn JS_SetPrototype(cx: *mut JSContext, obj: HandleObject,
proto: HandleObject) -> bool;
#[link_name = "_Z17JS_GetConstructorP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_GetConstructor(cx: *mut JSContext, proto: Handle<*mut JSObject>)
-> *mut JSObject;
#[link_name = "_ZN2JS21CompartmentOptionsRefEP13JSCompartment"]
pub fn CompartmentOptionsRef(compartment: *mut JSCompartment)
-> *mut CompartmentOptions;
#[link_name = "_ZN2JS21CompartmentOptionsRefEP8JSObject"]
pub fn CompartmentOptionsRef1(obj: *mut JSObject)
-> *mut CompartmentOptions;
#[link_name = "_ZN2JS21CompartmentOptionsRefEP9JSContext"]
pub fn CompartmentOptionsRef2(cx: *mut JSContext)
-> *mut CompartmentOptions;
#[link_name =
"_Z18JS_NewGlobalObjectP9JSContextPK7JSClassP12JSPrincipalsN2JS21OnNewGlobalHookOptionERKNS6_18CompartmentOptionsE"]
pub fn JS_NewGlobalObject(cx: *mut JSContext, clasp: *const JSClass,
principals: *mut JSPrincipals,
hookOption: OnNewGlobalHookOption,
options: &CompartmentOptions) -> *mut JSObject;
#[link_name = "_Z24JS_GlobalObjectTraceHookP8JSTracerP8JSObject"]
pub fn JS_GlobalObjectTraceHook(trc: *mut JSTracer,
global: *mut JSObject);
#[link_name =
"_Z24JS_FireOnNewGlobalObjectP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_FireOnNewGlobalObject(cx: *mut JSContext, global: HandleObject);
#[link_name = "_Z12JS_NewObjectP9JSContextPK7JSClass"]
pub fn JS_NewObject(cx: *mut JSContext, clasp: *const JSClass)
-> *mut JSObject;
#[link_name = "_Z15JS_IsExtensibleP9JSContextN2JS6HandleIP8JSObjectEEPb"]
pub fn JS_IsExtensible(cx: *mut JSContext, obj: HandleObject,
extensible: *mut bool) -> bool;
#[link_name = "_Z11JS_IsNativeP8JSObject"]
pub fn JS_IsNative(obj: *mut JSObject) -> bool;
#[link_name = "_Z19JS_GetObjectRuntimeP8JSObject"]
pub fn JS_GetObjectRuntime(obj: *mut JSObject) -> *mut JSRuntime;
#[link_name =
"_Z26JS_NewObjectWithGivenProtoP9JSContextPK7JSClassN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewObjectWithGivenProto(cx: *mut JSContext,
clasp: *const JSClass,
proto: Handle<*mut JSObject>)
-> *mut JSObject;
#[link_name = "_Z17JS_NewPlainObjectP9JSContext"]
pub fn JS_NewPlainObject(cx: *mut JSContext) -> *mut JSObject;
#[link_name =
"_Z19JS_DeepFreezeObjectP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_DeepFreezeObject(cx: *mut JSContext, obj: Handle<*mut JSObject>)
-> bool;
#[link_name = "_Z15JS_FreezeObjectP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_FreezeObject(cx: *mut JSContext, obj: Handle<*mut JSObject>)
-> bool;
#[link_name =
"_Z20JS_PreventExtensionsP9JSContextN2JS6HandleIP8JSObjectEERNS1_14ObjectOpResultE"]
pub fn JS_PreventExtensions(cx: *mut JSContext, obj: HandleObject,
result: &mut ObjectOpResult) -> bool;
#[link_name =
"_Z6JS_NewP9JSContextN2JS6HandleIP8JSObjectEERKNS1_16HandleValueArrayE"]
pub fn JS_New(cx: *mut JSContext, ctor: HandleObject,
args: &HandleValueArray) -> *mut JSObject;
#[link_name =
"_ZN2JS34ObjectToCompletePropertyDescriptorEP9JSContextNS_6HandleIP8JSObjectEENS2_INS_5ValueEEENS_13MutableHandleI20JSPropertyDescriptorEE"]
pub fn ObjectToCompletePropertyDescriptor(cx: *mut JSContext,
obj: HandleObject,
descriptor: HandleValue,
desc:
MutableHandle<JSPropertyDescriptor>)
-> bool;
#[link_name =
"_Z17JS_DefinePropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcNS2_INS1_5ValueEEEjPFbS0_jPS8_ESC_"]
pub fn JS_DefineProperty(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char, value: HandleValue,
attrs: u32, getter: JSNative, setter: JSNative)
-> bool;
#[link_name =
"_Z17JS_DefinePropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcS5_jPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefineProperty1(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char,
value: HandleObject, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z17JS_DefinePropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcNS2_IP8JSStringEEjPFbS0_jPNS1_5ValueEESE_"]
pub fn JS_DefineProperty2(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char,
value: HandleString, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z17JS_DefinePropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcijPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefineProperty3(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char, value: i32,
attrs: u32, getter: JSNative, setter: JSNative)
-> bool;
#[link_name =
"_Z17JS_DefinePropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcjjPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefineProperty4(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char, value: u32,
attrs: u32, getter: JSNative, setter: JSNative)
-> bool;
#[link_name =
"_Z17JS_DefinePropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcdjPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefineProperty5(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char, value: f64,
attrs: u32, getter: JSNative, setter: JSNative)
-> bool;
#[link_name =
"_Z21JS_DefinePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS2_INS1_5ValueEEEjPFbS0_jPS8_ESC_"]
pub fn JS_DefinePropertyById(cx: *mut JSContext, obj: HandleObject,
id: HandleId, value: HandleValue, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z21JS_DefinePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEES5_jPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefinePropertyById1(cx: *mut JSContext, obj: HandleObject,
id: HandleId, value: HandleObject,
attrs: u32, getter: JSNative,
setter: JSNative) -> bool;
#[link_name =
"_Z21JS_DefinePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS2_IP8JSStringEEjPFbS0_jPNS1_5ValueEESE_"]
pub fn JS_DefinePropertyById2(cx: *mut JSContext, obj: HandleObject,
id: HandleId, value: HandleString,
attrs: u32, getter: JSNative,
setter: JSNative) -> bool;
#[link_name =
"_Z21JS_DefinePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEEijPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefinePropertyById3(cx: *mut JSContext, obj: HandleObject,
id: HandleId, value: i32, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z21JS_DefinePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEEjjPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefinePropertyById4(cx: *mut JSContext, obj: HandleObject,
id: HandleId, value: u32, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z21JS_DefinePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEEdjPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefinePropertyById5(cx: *mut JSContext, obj: HandleObject,
id: HandleId, value: f64, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z21JS_DefinePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS2_I20JSPropertyDescriptorEERNS1_14ObjectOpResultE"]
pub fn JS_DefinePropertyById6(cx: *mut JSContext, obj: HandleObject,
id: HandleId,
desc: Handle<JSPropertyDescriptor>,
result: &mut ObjectOpResult) -> bool;
#[link_name =
"_Z21JS_DefinePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS2_I20JSPropertyDescriptorEE"]
pub fn JS_DefinePropertyById7(cx: *mut JSContext, obj: HandleObject,
id: HandleId,
desc: Handle<JSPropertyDescriptor>) -> bool;
#[link_name =
"_Z15JS_DefineObjectP9JSContextN2JS6HandleIP8JSObjectEEPKcPK7JSClassj"]
pub fn JS_DefineObject(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char, clasp: *const JSClass,
attrs: u32) -> *mut JSObject;
#[link_name =
"_Z21JS_DefineConstDoublesP9JSContextN2JS6HandleIP8JSObjectEEPK17JSConstScalarSpecIdE"]
pub fn JS_DefineConstDoubles(cx: *mut JSContext, obj: HandleObject,
cds: *const JSConstDoubleSpec) -> bool;
#[link_name =
"_Z22JS_DefineConstIntegersP9JSContextN2JS6HandleIP8JSObjectEEPK17JSConstScalarSpecIiE"]
pub fn JS_DefineConstIntegers(cx: *mut JSContext, obj: HandleObject,
cis: *const JSConstIntegerSpec) -> bool;
#[link_name =
"_Z19JS_DefinePropertiesP9JSContextN2JS6HandleIP8JSObjectEEPK14JSPropertySpec"]
pub fn JS_DefineProperties(cx: *mut JSContext, obj: HandleObject,
ps: *const JSPropertySpec) -> bool;
#[link_name =
"_Z24JS_AlreadyHasOwnPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcPb"]
pub fn JS_AlreadyHasOwnProperty(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char,
foundp: *mut bool) -> bool;
#[link_name =
"_Z28JS_AlreadyHasOwnPropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEEPb"]
pub fn JS_AlreadyHasOwnPropertyById(cx: *mut JSContext, obj: HandleObject,
id: HandleId, foundp: *mut bool)
-> bool;
#[link_name =
"_Z14JS_HasPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcPb"]
pub fn JS_HasProperty(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char, foundp: *mut bool)
-> bool;
#[link_name =
"_Z18JS_HasPropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEEPb"]
pub fn JS_HasPropertyById(cx: *mut JSContext, obj: HandleObject,
id: HandleId, foundp: *mut bool) -> bool;
#[link_name =
"_Z31JS_GetOwnPropertyDescriptorByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS1_13MutableHandleI20JSPropertyDescriptorEE"]
pub fn JS_GetOwnPropertyDescriptorById(cx: *mut JSContext,
obj: HandleObject, id: HandleId,
desc:
MutableHandle<JSPropertyDescriptor>)
-> bool;
#[link_name =
"_Z27JS_GetOwnPropertyDescriptorP9JSContextN2JS6HandleIP8JSObjectEEPKcNS1_13MutableHandleI20JSPropertyDescriptorEE"]
pub fn JS_GetOwnPropertyDescriptor(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char,
desc:
MutableHandle<JSPropertyDescriptor>)
-> bool;
#[link_name =
"_Z29JS_GetOwnUCPropertyDescriptorP9JSContextN2JS6HandleIP8JSObjectEEPKDsNS1_13MutableHandleI20JSPropertyDescriptorEE"]
pub fn JS_GetOwnUCPropertyDescriptor(cx: *mut JSContext,
obj: HandleObject, name: *const u16,
desc:
MutableHandle<JSPropertyDescriptor>)
-> bool;
#[link_name =
"_Z28JS_GetPropertyDescriptorByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS1_13MutableHandleI20JSPropertyDescriptorEE"]
pub fn JS_GetPropertyDescriptorById(cx: *mut JSContext, obj: HandleObject,
id: HandleId,
desc:
MutableHandle<JSPropertyDescriptor>)
-> bool;
#[link_name =
"_Z24JS_GetPropertyDescriptorP9JSContextN2JS6HandleIP8JSObjectEEPKcNS1_13MutableHandleI20JSPropertyDescriptorEE"]
pub fn JS_GetPropertyDescriptor(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char,
desc: MutableHandle<JSPropertyDescriptor>)
-> bool;
#[link_name =
"_Z14JS_GetPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcNS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_GetProperty(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char, vp: MutableHandleValue)
-> bool;
#[link_name =
"_Z18JS_GetPropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_GetPropertyById(cx: *mut JSContext, obj: HandleObject,
id: HandleId, vp: MutableHandleValue) -> bool;
#[link_name =
"_Z23JS_ForwardGetPropertyToP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEES5_NS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_ForwardGetPropertyTo(cx: *mut JSContext, obj: HandleObject,
id: HandleId, onBehalfOf: HandleObject,
vp: MutableHandleValue) -> bool;
#[link_name =
"_Z14JS_SetPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcNS2_INS1_5ValueEEE"]
pub fn JS_SetProperty(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char, v: HandleValue)
-> bool;
#[link_name =
"_Z18JS_SetPropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS2_INS1_5ValueEEE"]
pub fn JS_SetPropertyById(cx: *mut JSContext, obj: HandleObject,
id: HandleId, v: HandleValue) -> bool;
#[link_name =
"_Z23JS_ForwardSetPropertyToP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS2_INS1_5ValueEEES9_RNS1_14ObjectOpResultE"]
pub fn JS_ForwardSetPropertyTo(cx: *mut JSContext, obj: HandleObject,
id: HandleId, v: HandleValue,
receiver: HandleValue,
result: &mut ObjectOpResult) -> bool;
#[link_name =
"_Z17JS_DeletePropertyP9JSContextN2JS6HandleIP8JSObjectEEPKc"]
pub fn JS_DeleteProperty(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char) -> bool;
#[link_name =
"_Z17JS_DeletePropertyP9JSContextN2JS6HandleIP8JSObjectEEPKcRNS1_14ObjectOpResultE"]
pub fn JS_DeleteProperty1(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char,
result: &mut ObjectOpResult) -> bool;
#[link_name =
"_Z21JS_DeletePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEE4jsid"]
pub fn JS_DeletePropertyById(cx: *mut JSContext, obj: HandleObject,
id: jsid) -> bool;
#[link_name =
"_Z21JS_DeletePropertyByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEERNS1_14ObjectOpResultE"]
pub fn JS_DeletePropertyById1(cx: *mut JSContext, obj: HandleObject,
id: HandleId, result: &mut ObjectOpResult)
-> bool;
#[link_name =
"_Z19JS_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmNS2_INS1_5ValueEEEjPFbS0_jPS8_ESC_"]
pub fn JS_DefineUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
value: HandleValue, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z19JS_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmS5_jPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefineUCProperty1(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
value: HandleObject, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z19JS_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmNS2_IP8JSStringEEjPFbS0_jPNS1_5ValueEESE_"]
pub fn JS_DefineUCProperty2(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
value: HandleString, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z19JS_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmijPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefineUCProperty3(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t, value: i32,
attrs: u32, getter: JSNative,
setter: JSNative) -> bool;
#[link_name =
"_Z19JS_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmjjPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefineUCProperty4(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t, value: u32,
attrs: u32, getter: JSNative,
setter: JSNative) -> bool;
#[link_name =
"_Z19JS_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmdjPFbS0_jPNS1_5ValueEESB_"]
pub fn JS_DefineUCProperty5(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t, value: f64,
attrs: u32, getter: JSNative,
setter: JSNative) -> bool;
#[link_name =
"_Z19JS_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmNS2_I20JSPropertyDescriptorEERNS1_14ObjectOpResultE"]
pub fn JS_DefineUCProperty6(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
desc: Handle<JSPropertyDescriptor>,
result: &mut ObjectOpResult) -> bool;
#[link_name =
"_Z19JS_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmNS2_I20JSPropertyDescriptorEE"]
pub fn JS_DefineUCProperty7(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
desc: Handle<JSPropertyDescriptor>) -> bool;
#[link_name =
"_Z26JS_AlreadyHasOwnUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmPb"]
pub fn JS_AlreadyHasOwnUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
foundp: *mut bool) -> bool;
#[link_name =
"_Z16JS_HasUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmPb"]
pub fn JS_HasUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t, vp: *mut bool)
-> bool;
#[link_name =
"_Z16JS_GetUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmNS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_GetUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
vp: MutableHandleValue) -> bool;
#[link_name =
"_Z16JS_SetUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmNS2_INS1_5ValueEEE"]
pub fn JS_SetUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t, v: HandleValue)
-> bool;
#[link_name =
"_Z19JS_DeleteUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsmRNS1_14ObjectOpResultE"]
pub fn JS_DeleteUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
result: &mut ObjectOpResult) -> bool;
#[link_name = "_Z17JS_NewArrayObjectP9JSContextRKN2JS16HandleValueArrayE"]
pub fn JS_NewArrayObject(cx: *mut JSContext, contents: &HandleValueArray)
-> *mut JSObject;
#[link_name = "_Z17JS_NewArrayObjectP9JSContextm"]
pub fn JS_NewArrayObject1(cx: *mut JSContext, length: size_t)
-> *mut JSObject;
#[link_name = "_Z16JS_IsArrayObjectP9JSContextN2JS6HandleINS1_5ValueEEE"]
pub fn JS_IsArrayObject(cx: *mut JSContext, value: HandleValue) -> bool;
#[link_name = "_Z16JS_IsArrayObjectP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_IsArrayObject1(cx: *mut JSContext, obj: HandleObject) -> bool;
#[link_name =
"_Z17JS_GetArrayLengthP9JSContextN2JS6HandleIP8JSObjectEEPj"]
pub fn JS_GetArrayLength(cx: *mut JSContext, obj: Handle<*mut JSObject>,
lengthp: *mut u32) -> bool;
#[link_name = "_Z17JS_SetArrayLengthP9JSContextN2JS6HandleIP8JSObjectEEj"]
pub fn JS_SetArrayLength(cx: *mut JSContext, obj: Handle<*mut JSObject>,
length: u32) -> bool;
#[link_name =
"_Z16JS_DefineElementP9JSContextN2JS6HandleIP8JSObjectEEjNS2_INS1_5ValueEEEjPFbS0_jPS6_ESA_"]
pub fn JS_DefineElement(cx: *mut JSContext, obj: HandleObject, index: u32,
value: HandleValue, attrs: u32, getter: JSNative,
setter: JSNative) -> bool;
#[link_name =
"_Z16JS_DefineElementP9JSContextN2JS6HandleIP8JSObjectEEjS5_jPFbS0_jPNS1_5ValueEES9_"]
pub fn JS_DefineElement1(cx: *mut JSContext, obj: HandleObject,
index: u32, value: HandleObject, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z16JS_DefineElementP9JSContextN2JS6HandleIP8JSObjectEEjNS2_IP8JSStringEEjPFbS0_jPNS1_5ValueEESC_"]
pub fn JS_DefineElement2(cx: *mut JSContext, obj: HandleObject,
index: u32, value: HandleString, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z16JS_DefineElementP9JSContextN2JS6HandleIP8JSObjectEEjijPFbS0_jPNS1_5ValueEES9_"]
pub fn JS_DefineElement3(cx: *mut JSContext, obj: HandleObject,
index: u32, value: i32, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z16JS_DefineElementP9JSContextN2JS6HandleIP8JSObjectEEjjjPFbS0_jPNS1_5ValueEES9_"]
pub fn JS_DefineElement4(cx: *mut JSContext, obj: HandleObject,
index: u32, value: u32, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z16JS_DefineElementP9JSContextN2JS6HandleIP8JSObjectEEjdjPFbS0_jPNS1_5ValueEES9_"]
pub fn JS_DefineElement5(cx: *mut JSContext, obj: HandleObject,
index: u32, value: f64, attrs: u32,
getter: JSNative, setter: JSNative) -> bool;
#[link_name =
"_Z23JS_AlreadyHasOwnElementP9JSContextN2JS6HandleIP8JSObjectEEjPb"]
pub fn JS_AlreadyHasOwnElement(cx: *mut JSContext, obj: HandleObject,
index: u32, foundp: *mut bool) -> bool;
#[link_name = "_Z13JS_HasElementP9JSContextN2JS6HandleIP8JSObjectEEjPb"]
pub fn JS_HasElement(cx: *mut JSContext, obj: HandleObject, index: u32,
foundp: *mut bool) -> bool;
#[link_name =
"_Z13JS_GetElementP9JSContextN2JS6HandleIP8JSObjectEEjNS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_GetElement(cx: *mut JSContext, obj: HandleObject, index: u32,
vp: MutableHandleValue) -> bool;
#[link_name =
"_Z22JS_ForwardGetElementToP9JSContextN2JS6HandleIP8JSObjectEEjS5_NS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_ForwardGetElementTo(cx: *mut JSContext, obj: HandleObject,
index: u32, onBehalfOf: HandleObject,
vp: MutableHandleValue) -> bool;
#[link_name =
"_Z13JS_SetElementP9JSContextN2JS6HandleIP8JSObjectEEjNS2_INS1_5ValueEEE"]
pub fn JS_SetElement(cx: *mut JSContext, obj: HandleObject, index: u32,
v: HandleValue) -> bool;
#[link_name = "_Z13JS_SetElementP9JSContextN2JS6HandleIP8JSObjectEEjS5_"]
pub fn JS_SetElement1(cx: *mut JSContext, obj: HandleObject, index: u32,
v: HandleObject) -> bool;
#[link_name =
"_Z13JS_SetElementP9JSContextN2JS6HandleIP8JSObjectEEjNS2_IP8JSStringEE"]
pub fn JS_SetElement2(cx: *mut JSContext, obj: HandleObject, index: u32,
v: HandleString) -> bool;
#[link_name = "_Z13JS_SetElementP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_SetElement3(cx: *mut JSContext, obj: HandleObject, index: u32,
v: i32) -> bool;
#[link_name = "_Z13JS_SetElementP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_SetElement4(cx: *mut JSContext, obj: HandleObject, index: u32,
v: u32) -> bool;
#[link_name = "_Z13JS_SetElementP9JSContextN2JS6HandleIP8JSObjectEEjd"]
pub fn JS_SetElement5(cx: *mut JSContext, obj: HandleObject, index: u32,
v: f64) -> bool;
#[link_name = "_Z16JS_DeleteElementP9JSContextN2JS6HandleIP8JSObjectEEj"]
pub fn JS_DeleteElement(cx: *mut JSContext, obj: HandleObject, index: u32)
-> bool;
#[link_name =
"_Z16JS_DeleteElementP9JSContextN2JS6HandleIP8JSObjectEEjRNS1_14ObjectOpResultE"]
pub fn JS_DeleteElement1(cx: *mut JSContext, obj: HandleObject,
index: u32, result: &mut ObjectOpResult) -> bool;
#[link_name =
"_Z36JS_SetAllNonReservedSlotsToUndefinedP9JSContextP8JSObject"]
pub fn JS_SetAllNonReservedSlotsToUndefined(cx: *mut JSContext,
objArg: *mut JSObject);
#[link_name = "_Z29JS_NewArrayBufferWithContentsP9JSContextmPv"]
pub fn JS_NewArrayBufferWithContents(cx: *mut JSContext, nbytes: size_t,
contents: *mut ::libc::c_void)
-> *mut JSObject;
#[link_name =
"_Z27JS_StealArrayBufferContentsP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_StealArrayBufferContents(cx: *mut JSContext, obj: HandleObject)
-> *mut ::libc::c_void;
#[link_name = "_Z35JS_NewMappedArrayBufferWithContentsP9JSContextmPv"]
pub fn JS_NewMappedArrayBufferWithContents(cx: *mut JSContext,
nbytes: size_t,
contents: *mut ::libc::c_void)
-> *mut JSObject;
#[link_name = "_Z34JS_CreateMappedArrayBufferContentsimm"]
pub fn JS_CreateMappedArrayBufferContents(fd: i32, offset: size_t,
length: size_t)
-> *mut ::libc::c_void;
#[link_name = "_Z35JS_ReleaseMappedArrayBufferContentsPvm"]
pub fn JS_ReleaseMappedArrayBufferContents(contents: *mut ::libc::c_void,
length: size_t);
#[link_name = "_Z12JS_EnumerateP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_Enumerate(cx: *mut JSContext, obj: HandleObject)
-> *mut JSIdArray;
#[link_name = "_Z18JS_GetReservedSlotP8JSObjectj"]
pub fn JS_GetReservedSlot(obj: *mut JSObject, index: u32) -> jsval;
#[link_name = "_Z18JS_SetReservedSlotP8JSObjectjN2JS5ValueE"]
pub fn JS_SetReservedSlot(obj: *mut JSObject, index: u32, v: jsval);
#[link_name = "_Z14JS_NewFunctionP9JSContextPFbS0_jPN2JS5ValueEEjjPKc"]
pub fn JS_NewFunction(cx: *mut JSContext, call: JSNative, nargs: u32,
flags: u32, name: *const ::libc::c_char)
-> *mut JSFunction;
#[link_name =
"_Z18JS_NewFunctionByIdP9JSContextPFbS0_jPN2JS5ValueEEjjNS1_6HandleI4jsidEE"]
pub fn JS_NewFunctionById(cx: *mut JSContext, call: JSNative, nargs: u32,
flags: u32, id: Handle<jsid>)
-> *mut JSFunction;
#[link_name =
"_ZN2JS21GetSelfHostedFunctionEP9JSContextPKcNS_6HandleI4jsidEEj"]
pub fn GetSelfHostedFunction(cx: *mut JSContext,
selfHostedName: *const ::libc::c_char,
id: Handle<jsid>, nargs: u32)
-> *mut JSFunction;
#[link_name = "_Z20JS_GetFunctionObjectP10JSFunction"]
pub fn JS_GetFunctionObject(fun: *mut JSFunction) -> *mut JSObject;
#[link_name = "_Z16JS_GetFunctionIdP10JSFunction"]
pub fn JS_GetFunctionId(fun: *mut JSFunction) -> *mut JSString;
#[link_name = "_Z23JS_GetFunctionDisplayIdP10JSFunction"]
pub fn JS_GetFunctionDisplayId(fun: *mut JSFunction) -> *mut JSString;
#[link_name = "_Z19JS_GetFunctionArityP10JSFunction"]
pub fn JS_GetFunctionArity(fun: *mut JSFunction) -> u16;
#[link_name = "_ZN2JS10IsCallableEP8JSObject"]
pub fn IsCallable(obj: *mut JSObject) -> bool;
#[link_name = "_ZN2JS13IsConstructorEP8JSObject"]
pub fn IsConstructor(obj: *mut JSObject) -> bool;
#[link_name = "_Z19JS_ObjectIsFunctionP9JSContextP8JSObject"]
pub fn JS_ObjectIsFunction(cx: *mut JSContext, obj: *mut JSObject)
-> bool;
#[link_name =
"_Z19JS_IsNativeFunctionP8JSObjectPFbP9JSContextjPN2JS5ValueEE"]
pub fn JS_IsNativeFunction(funobj: *mut JSObject, call: JSNative) -> bool;
#[link_name = "_Z16JS_IsConstructorP10JSFunction"]
pub fn JS_IsConstructor(fun: *mut JSFunction) -> bool;
#[link_name = "_Z15JS_BindCallableP9JSContextN2JS6HandleIP8JSObjectEES5_"]
pub fn JS_BindCallable(cx: *mut JSContext,
callable: Handle<*mut JSObject>,
newThis: Handle<*mut JSObject>) -> *mut JSObject;
#[link_name =
"_Z18JS_DefineFunctionsP9JSContextN2JS6HandleIP8JSObjectEEPK14JSFunctionSpec26PropertyDefinitionBehavior"]
pub fn JS_DefineFunctions(cx: *mut JSContext, obj: Handle<*mut JSObject>,
fs: *const JSFunctionSpec,
behavior: PropertyDefinitionBehavior) -> bool;
#[link_name =
"_Z17JS_DefineFunctionP9JSContextN2JS6HandleIP8JSObjectEEPKcPFbS0_jPNS1_5ValueEEjj"]
pub fn JS_DefineFunction(cx: *mut JSContext, obj: Handle<*mut JSObject>,
name: *const ::libc::c_char, call: JSNative,
nargs: u32, attrs: u32) -> *mut JSFunction;
#[link_name =
"_Z19JS_DefineUCFunctionP9JSContextN2JS6HandleIP8JSObjectEEPKDsmPFbS0_jPNS1_5ValueEEjj"]
pub fn JS_DefineUCFunction(cx: *mut JSContext, obj: Handle<*mut JSObject>,
name: *const u16, namelen: size_t,
call: JSNative, nargs: u32, attrs: u32)
-> *mut JSFunction;
#[link_name =
"_Z21JS_DefineFunctionByIdP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEEPFbS0_jPNS1_5ValueEEjj"]
pub fn JS_DefineFunctionById(cx: *mut JSContext,
obj: Handle<*mut JSObject>, id: Handle<jsid>,
call: JSNative, nargs: u32, attrs: u32)
-> *mut JSFunction;
#[link_name =
"_ZN2JS19CloneFunctionObjectEP9JSContextNS_6HandleIP8JSObjectEE"]
pub fn CloneFunctionObject(cx: *mut JSContext, funobj: HandleObject)
-> *mut JSObject;
#[link_name =
"_ZN2JS19CloneFunctionObjectEP9JSContextNS_6HandleIP8JSObjectEERNS_16AutoObjectVectorE"]
pub fn CloneFunctionObject1(cx: *mut JSContext, funobj: HandleObject,
scopeChain: &mut AutoObjectVector)
-> *mut JSObject;
#[link_name =
"_Z25JS_BufferIsCompilableUnitP9JSContextN2JS6HandleIP8JSObjectEEPKcm"]
pub fn JS_BufferIsCompilableUnit(cx: *mut JSContext,
obj: Handle<*mut JSObject>,
utf8: *const ::libc::c_char,
length: size_t) -> bool;
#[link_name =
"_Z16JS_CompileScriptP9JSContextPKcmRKN2JS14CompileOptionsENS3_13MutableHandleIP8JSScriptEE"]
pub fn JS_CompileScript(cx: *mut JSContext, ascii: *const ::libc::c_char,
length: size_t, options: &CompileOptions,
script: MutableHandleScript) -> bool;
#[link_name =
"_Z18JS_CompileUCScriptP9JSContextPKDsmRKN2JS14CompileOptionsENS3_13MutableHandleIP8JSScriptEE"]
pub fn JS_CompileUCScript(cx: *mut JSContext, chars: *const u16,
length: size_t, options: &CompileOptions,
script: MutableHandleScript) -> bool;
#[link_name = "_Z22JS_GetGlobalFromScriptP8JSScript"]
pub fn JS_GetGlobalFromScript(script: *mut JSScript) -> *mut JSObject;
#[link_name = "_Z20JS_GetScriptFilenameP8JSScript"]
pub fn JS_GetScriptFilename(script: *mut JSScript)
-> *const ::libc::c_char;
#[link_name = "_Z26JS_GetScriptBaseLineNumberP9JSContextP8JSScript"]
pub fn JS_GetScriptBaseLineNumber(cx: *mut JSContext,
script: *mut JSScript) -> u32;
#[link_name =
"_Z20JS_GetFunctionScriptP9JSContextN2JS6HandleIP10JSFunctionEE"]
pub fn JS_GetFunctionScript(cx: *mut JSContext, fun: HandleFunction)
-> *mut JSScript;
#[link_name =
"_ZN2JS7CompileEP9JSContextRKNS_22ReadOnlyCompileOptionsERNS_18SourceBufferHolderENS_13MutableHandleIP8JSScriptEE"]
pub fn Compile(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
srcBuf: &mut SourceBufferHolder,
script: MutableHandleScript) -> bool;
#[link_name =
"_ZN2JS7CompileEP9JSContextRKNS_22ReadOnlyCompileOptionsEPKcmNS_13MutableHandleIP8JSScriptEE"]
pub fn Compile1(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
bytes: *const ::libc::c_char, length: size_t,
script: MutableHandleScript) -> bool;
#[link_name =
"_ZN2JS7CompileEP9JSContextRKNS_22ReadOnlyCompileOptionsEPKDsmNS_13MutableHandleIP8JSScriptEE"]
pub fn Compile2(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
chars: *const u16, length: size_t,
script: MutableHandleScript) -> bool;
#[link_name =
"_ZN2JS7CompileEP9JSContextRKNS_22ReadOnlyCompileOptionsEP8_IO_FILENS_13MutableHandleIP8JSScriptEE"]
pub fn Compile3(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
file: *mut FILE, script: MutableHandleScript) -> bool;
#[link_name =
"_ZN2JS7CompileEP9JSContextRKNS_22ReadOnlyCompileOptionsEPKcNS_13MutableHandleIP8JSScriptEE"]
pub fn Compile4(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
filename: *const ::libc::c_char,
script: MutableHandleScript) -> bool;
#[link_name =
"_ZN2JS19CanCompileOffThreadEP9JSContextRKNS_22ReadOnlyCompileOptionsEm"]
pub fn CanCompileOffThread(cx: *mut JSContext,
options: &ReadOnlyCompileOptions,
length: size_t) -> bool;
#[link_name =
"_ZN2JS16CompileOffThreadEP9JSContextRKNS_22ReadOnlyCompileOptionsEPKDsmPFvPvS7_ES7_"]
pub fn CompileOffThread(cx: *mut JSContext,
options: &ReadOnlyCompileOptions,
chars: *const u16, length: size_t,
callback: OffThreadCompileCallback,
callbackData: *mut ::libc::c_void) -> bool;
#[link_name = "_ZN2JS21FinishOffThreadScriptEP9JSContextP9JSRuntimePv"]
pub fn FinishOffThreadScript(maybecx: *mut JSContext, rt: *mut JSRuntime,
token: *mut ::libc::c_void) -> *mut JSScript;
#[link_name =
"_ZN2JS15CompileFunctionEP9JSContextRNS_16AutoObjectVectorERKNS_22ReadOnlyCompileOptionsEPKcjPKS8_PKDsmNS_13MutableHandleIP10JSFunctionEE"]
pub fn CompileFunction(cx: *mut JSContext,
scopeChain: &mut AutoObjectVector,
options: &ReadOnlyCompileOptions,
name: *const ::libc::c_char, nargs: u32,
argnames: *const *const ::libc::c_char,
chars: *const u16, length: size_t,
fun: MutableHandleFunction) -> bool;
#[link_name =
"_ZN2JS15CompileFunctionEP9JSContextRNS_16AutoObjectVectorERKNS_22ReadOnlyCompileOptionsEPKcjPKS8_RNS_18SourceBufferHolderENS_13MutableHandleIP10JSFunctionEE"]
pub fn CompileFunction1(cx: *mut JSContext,
scopeChain: &mut AutoObjectVector,
options: &ReadOnlyCompileOptions,
name: *const ::libc::c_char, nargs: u32,
argnames: *const *const ::libc::c_char,
srcBuf: &mut SourceBufferHolder,
fun: MutableHandleFunction) -> bool;
#[link_name =
"_ZN2JS15CompileFunctionEP9JSContextRNS_16AutoObjectVectorERKNS_22ReadOnlyCompileOptionsEPKcjPKS8_S8_mNS_13MutableHandleIP10JSFunctionEE"]
pub fn CompileFunction2(cx: *mut JSContext,
scopeChain: &mut AutoObjectVector,
options: &ReadOnlyCompileOptions,
name: *const ::libc::c_char, nargs: u32,
argnames: *const *const ::libc::c_char,
bytes: *const ::libc::c_char, length: size_t,
fun: MutableHandleFunction) -> bool;
#[link_name =
"_Z18JS_DecompileScriptP9JSContextN2JS6HandleIP8JSScriptEEPKcj"]
pub fn JS_DecompileScript(cx: *mut JSContext,
script: Handle<*mut JSScript>,
name: *const ::libc::c_char, indent: u32)
-> *mut JSString;
#[link_name =
"_Z20JS_DecompileFunctionP9JSContextN2JS6HandleIP10JSFunctionEEj"]
pub fn JS_DecompileFunction(cx: *mut JSContext,
fun: Handle<*mut JSFunction>, indent: u32)
-> *mut JSString;
#[link_name =
"_Z24JS_DecompileFunctionBodyP9JSContextN2JS6HandleIP10JSFunctionEEj"]
pub fn JS_DecompileFunctionBody(cx: *mut JSContext,
fun: Handle<*mut JSFunction>, indent: u32)
-> *mut JSString;
#[link_name =
"_Z16JS_ExecuteScriptP9JSContextN2JS6HandleIP8JSScriptEENS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_ExecuteScript(cx: *mut JSContext, script: HandleScript,
rval: MutableHandleValue) -> bool;
#[link_name = "_Z16JS_ExecuteScriptP9JSContextN2JS6HandleIP8JSScriptEE"]
pub fn JS_ExecuteScript1(cx: *mut JSContext, script: HandleScript)
-> bool;
#[link_name =
"_Z16JS_ExecuteScriptP9JSContextRN2JS16AutoObjectVectorENS1_6HandleIP8JSScriptEENS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_ExecuteScript2(cx: *mut JSContext,
scopeChain: &mut AutoObjectVector,
script: HandleScript, rval: MutableHandleValue)
-> bool;
#[link_name =
"_Z16JS_ExecuteScriptP9JSContextRN2JS16AutoObjectVectorENS1_6HandleIP8JSScriptEE"]
pub fn JS_ExecuteScript3(cx: *mut JSContext,
scopeChain: &mut AutoObjectVector,
script: HandleScript) -> bool;
#[link_name =
"_ZN2JS21CloneAndExecuteScriptEP9JSContextNS_6HandleIP8JSScriptEE"]
pub fn CloneAndExecuteScript(cx: *mut JSContext,
script: Handle<*mut JSScript>) -> bool;
#[link_name =
"_ZN2JS8EvaluateEP9JSContextRKNS_22ReadOnlyCompileOptionsERNS_18SourceBufferHolderENS_13MutableHandleINS_5ValueEEE"]
pub fn Evaluate(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
srcBuf: &mut SourceBufferHolder, rval: MutableHandleValue)
-> bool;
#[link_name =
"_ZN2JS8EvaluateEP9JSContextRNS_16AutoObjectVectorERKNS_22ReadOnlyCompileOptionsERNS_18SourceBufferHolderENS_13MutableHandleINS_5ValueEEE"]
pub fn Evaluate1(cx: *mut JSContext, scopeChain: &mut AutoObjectVector,
options: &ReadOnlyCompileOptions,
srcBuf: &mut SourceBufferHolder,
rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS8EvaluateEP9JSContextRKNS_22ReadOnlyCompileOptionsEPKDsmNS_13MutableHandleINS_5ValueEEE"]
pub fn Evaluate2(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
chars: *const u16, length: size_t,
rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS8EvaluateEP9JSContextRNS_16AutoObjectVectorERKNS_22ReadOnlyCompileOptionsEPKDsmNS_13MutableHandleINS_5ValueEEE"]
pub fn Evaluate3(cx: *mut JSContext, scopeChain: &mut AutoObjectVector,
options: &ReadOnlyCompileOptions, chars: *const u16,
length: size_t, rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS8EvaluateEP9JSContextRKNS_22ReadOnlyCompileOptionsEPKcmNS_13MutableHandleINS_5ValueEEE"]
pub fn Evaluate4(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
bytes: *const ::libc::c_char, length: size_t,
rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS8EvaluateEP9JSContextRKNS_22ReadOnlyCompileOptionsEPKcNS_13MutableHandleINS_5ValueEEE"]
pub fn Evaluate5(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
filename: *const ::libc::c_char,
rval: MutableHandleValue) -> bool;
#[link_name =
"_Z15JS_CallFunctionP9JSContextN2JS6HandleIP8JSObjectEENS2_IP10JSFunctionEERKNS1_16HandleValueArrayENS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_CallFunction(cx: *mut JSContext, obj: HandleObject,
fun: HandleFunction, args: &HandleValueArray,
rval: MutableHandleValue) -> bool;
#[link_name =
"_Z19JS_CallFunctionNameP9JSContextN2JS6HandleIP8JSObjectEEPKcRKNS1_16HandleValueArrayENS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_CallFunctionName(cx: *mut JSContext, obj: HandleObject,
name: *const ::libc::c_char,
args: &HandleValueArray,
rval: MutableHandleValue) -> bool;
#[link_name =
"_Z20JS_CallFunctionValueP9JSContextN2JS6HandleIP8JSObjectEENS2_INS1_5ValueEEERKNS1_16HandleValueArrayENS1_13MutableHandleIS6_EE"]
pub fn JS_CallFunctionValue(cx: *mut JSContext, obj: HandleObject,
fval: HandleValue, args: &HandleValueArray,
rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS4CallEP9JSContextNS_6HandleINS_5ValueEEES4_RKNS_16HandleValueArrayENS_13MutableHandleIS3_EE"]
pub fn Call(cx: *mut JSContext, thisv: HandleValue, fun: HandleValue,
args: &HandleValueArray, rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS9ConstructEP9JSContextNS_6HandleINS_5ValueEEERKNS_16HandleValueArrayENS_13MutableHandleIS3_EE"]
pub fn Construct(cx: *mut JSContext, fun: HandleValue,
args: &HandleValueArray, rval: MutableHandleValue)
-> bool;
#[link_name = "_Z23JS_SetInterruptCallbackP9JSRuntimePFbP9JSContextE"]
pub fn JS_SetInterruptCallback(rt: *mut JSRuntime,
callback: JSInterruptCallback)
-> JSInterruptCallback;
#[link_name = "_Z23JS_GetInterruptCallbackP9JSRuntime"]
pub fn JS_GetInterruptCallback(rt: *mut JSRuntime) -> JSInterruptCallback;
#[link_name = "_Z27JS_RequestInterruptCallbackP9JSRuntime"]
pub fn JS_RequestInterruptCallback(rt: *mut JSRuntime);
#[link_name = "_Z12JS_IsRunningP9JSContext"]
pub fn JS_IsRunning(cx: *mut JSContext) -> bool;
#[link_name = "_Z17JS_SaveFrameChainP9JSContext"]
pub fn JS_SaveFrameChain(cx: *mut JSContext) -> bool;
#[link_name = "_Z20JS_RestoreFrameChainP9JSContext"]
pub fn JS_RestoreFrameChain(cx: *mut JSContext);
#[link_name = "_Z17JS_NewStringCopyNP9JSContextPKcm"]
pub fn JS_NewStringCopyN(cx: *mut JSContext, s: *const ::libc::c_char,
n: size_t) -> *mut JSString;
#[link_name = "_Z17JS_NewStringCopyZP9JSContextPKc"]
pub fn JS_NewStringCopyZ(cx: *mut JSContext, s: *const ::libc::c_char)
-> *mut JSString;
#[link_name = "_Z17JS_InternJSStringP9JSContextN2JS6HandleIP8JSStringEE"]
pub fn JS_InternJSString(cx: *mut JSContext, str: HandleString)
-> *mut JSString;
#[link_name = "_Z16JS_InternStringNP9JSContextPKcm"]
pub fn JS_InternStringN(cx: *mut JSContext, s: *const ::libc::c_char,
length: size_t) -> *mut JSString;
#[link_name = "_Z15JS_InternStringP9JSContextPKc"]
pub fn JS_InternString(cx: *mut JSContext, s: *const ::libc::c_char)
-> *mut JSString;
#[link_name = "_Z14JS_NewUCStringP9JSContextPDsm"]
pub fn JS_NewUCString(cx: *mut JSContext, chars: *mut u16, length: size_t)
-> *mut JSString;
#[link_name = "_Z19JS_NewUCStringCopyNP9JSContextPKDsm"]
pub fn JS_NewUCStringCopyN(cx: *mut JSContext, s: *const u16, n: size_t)
-> *mut JSString;
#[link_name = "_Z19JS_NewUCStringCopyZP9JSContextPKDs"]
pub fn JS_NewUCStringCopyZ(cx: *mut JSContext, s: *const u16)
-> *mut JSString;
#[link_name = "_Z18JS_InternUCStringNP9JSContextPKDsm"]
pub fn JS_InternUCStringN(cx: *mut JSContext, s: *const u16,
length: size_t) -> *mut JSString;
#[link_name = "_Z17JS_InternUCStringP9JSContextPKDs"]
pub fn JS_InternUCString(cx: *mut JSContext, s: *const u16)
-> *mut JSString;
#[link_name = "_Z17JS_CompareStringsP9JSContextP8JSStringS2_Pi"]
pub fn JS_CompareStrings(cx: *mut JSContext, str1: *mut JSString,
str2: *mut JSString, result: *mut i32) -> bool;
#[link_name = "_Z20JS_StringEqualsAsciiP9JSContextP8JSStringPKcPb"]
pub fn JS_StringEqualsAscii(cx: *mut JSContext, str: *mut JSString,
asciiBytes: *const ::libc::c_char,
_match: *mut bool) -> bool;
#[link_name = "_Z19JS_PutEscapedStringP9JSContextPcmP8JSStringc"]
pub fn JS_PutEscapedString(cx: *mut JSContext,
buffer: *mut ::libc::c_char, size: size_t,
str: *mut JSString, quote: ::libc::c_char)
-> size_t;
#[link_name = "_Z20JS_FileEscapedStringP8_IO_FILEP8JSStringc"]
pub fn JS_FileEscapedString(fp: *mut FILE, str: *mut JSString,
quote: ::libc::c_char) -> bool;
#[link_name = "_Z18JS_GetStringLengthP8JSString"]
pub fn JS_GetStringLength(str: *mut JSString) -> size_t;
#[link_name = "_Z15JS_StringIsFlatP8JSString"]
pub fn JS_StringIsFlat(str: *mut JSString) -> bool;
#[link_name = "_Z23JS_StringHasLatin1CharsP8JSString"]
pub fn JS_StringHasLatin1Chars(str: *mut JSString) -> bool;
#[link_name =
"_Z32JS_GetLatin1StringCharsAndLengthP9JSContextRKN2JS17AutoCheckCannotGCEP8JSStringPm"]
pub fn JS_GetLatin1StringCharsAndLength(cx: *mut JSContext,
nogc: &AutoCheckCannotGC,
str: *mut JSString,
length: *mut size_t)
-> *const Latin1Char;
#[link_name =
"_Z33JS_GetTwoByteStringCharsAndLengthP9JSContextRKN2JS17AutoCheckCannotGCEP8JSStringPm"]
pub fn JS_GetTwoByteStringCharsAndLength(cx: *mut JSContext,
nogc: &AutoCheckCannotGC,
str: *mut JSString,
length: *mut size_t)
-> *const u16;
#[link_name = "_Z18JS_GetStringCharAtP9JSContextP8JSStringmPDs"]
pub fn JS_GetStringCharAt(cx: *mut JSContext, str: *mut JSString,
index: size_t, res: *mut u16) -> bool;
#[link_name = "_Z22JS_GetFlatStringCharAtP12JSFlatStringm"]
pub fn JS_GetFlatStringCharAt(str: *mut JSFlatString, index: size_t)
-> u16;
#[link_name = "_Z32JS_GetTwoByteExternalStringCharsP8JSString"]
pub fn JS_GetTwoByteExternalStringChars(str: *mut JSString) -> *const u16;
#[link_name =
"_Z18JS_CopyStringCharsP9JSContextN7mozilla5RangeIDsEEP8JSString"]
pub fn JS_CopyStringChars(cx: *mut JSContext, dest: Range<u16>,
str: *mut JSString) -> bool;
#[link_name =
"_Z31JS_GetLatin1InternedStringCharsRKN2JS17AutoCheckCannotGCEP8JSString"]
pub fn JS_GetLatin1InternedStringChars(nogc: &AutoCheckCannotGC,
str: *mut JSString)
-> *const Latin1Char;
#[link_name =
"_Z32JS_GetTwoByteInternedStringCharsRKN2JS17AutoCheckCannotGCEP8JSString"]
pub fn JS_GetTwoByteInternedStringChars(nogc: &AutoCheckCannotGC,
str: *mut JSString) -> *const u16;
#[link_name = "_Z16JS_FlattenStringP9JSContextP8JSString"]
pub fn JS_FlattenString(cx: *mut JSContext, str: *mut JSString)
-> *mut JSFlatString;
#[link_name =
"_Z27JS_GetLatin1FlatStringCharsRKN2JS17AutoCheckCannotGCEP12JSFlatString"]
pub fn JS_GetLatin1FlatStringChars(nogc: &AutoCheckCannotGC,
str: *mut JSFlatString)
-> *const Latin1Char;
#[link_name =
"_Z28JS_GetTwoByteFlatStringCharsRKN2JS17AutoCheckCannotGCEP12JSFlatString"]
pub fn JS_GetTwoByteFlatStringChars(nogc: &AutoCheckCannotGC,
str: *mut JSFlatString) -> *const u16;
#[link_name = "_Z24JS_FlatStringEqualsAsciiP12JSFlatStringPKc"]
pub fn JS_FlatStringEqualsAscii(str: *mut JSFlatString,
asciiBytes: *const ::libc::c_char)
-> bool;
#[link_name = "_Z23JS_PutEscapedFlatStringPcmP12JSFlatStringc"]
pub fn JS_PutEscapedFlatString(buffer: *mut ::libc::c_char, size: size_t,
str: *mut JSFlatString,
quote: ::libc::c_char) -> size_t;
#[link_name =
"_Z21JS_NewDependentStringP9JSContextN2JS6HandleIP8JSStringEEmm"]
pub fn JS_NewDependentString(cx: *mut JSContext, str: HandleString,
start: size_t, length: size_t)
-> *mut JSString;
#[link_name =
"_Z16JS_ConcatStringsP9JSContextN2JS6HandleIP8JSStringEES5_"]
pub fn JS_ConcatStrings(cx: *mut JSContext, left: HandleString,
right: HandleString) -> *mut JSString;
#[link_name = "_Z14JS_DecodeBytesP9JSContextPKcmPDsPm"]
pub fn JS_DecodeBytes(cx: *mut JSContext, src: *const ::libc::c_char,
srclen: size_t, dst: *mut u16, dstlenp: *mut size_t)
-> bool;
#[link_name = "_Z15JS_EncodeStringP9JSContextP8JSString"]
pub fn JS_EncodeString(cx: *mut JSContext, str: *mut JSString)
-> *mut ::libc::c_char;
#[link_name =
"_Z21JS_EncodeStringToUTF8P9JSContextN2JS6HandleIP8JSStringEE"]
pub fn JS_EncodeStringToUTF8(cx: *mut JSContext, str: HandleString)
-> *mut ::libc::c_char;
#[link_name = "_Z26JS_GetStringEncodingLengthP9JSContextP8JSString"]
pub fn JS_GetStringEncodingLength(cx: *mut JSContext, str: *mut JSString)
-> size_t;
#[link_name = "_Z23JS_EncodeStringToBufferP9JSContextP8JSStringPcm"]
pub fn JS_EncodeStringToBuffer(cx: *mut JSContext, str: *mut JSString,
buffer: *mut ::libc::c_char,
length: size_t) -> size_t;
#[link_name = "_ZN2JS10NewAddonIdEP9JSContextNS_6HandleIP8JSStringEE"]
pub fn NewAddonId(cx: *mut JSContext, str: HandleString)
-> *mut JSAddonId;
#[link_name = "_ZN2JS15StringOfAddonIdEP9JSAddonId"]
pub fn StringOfAddonId(id: *mut JSAddonId) -> *mut JSString;
#[link_name = "_ZN2JS15AddonIdOfObjectEP8JSObject"]
pub fn AddonIdOfObject(obj: *mut JSObject) -> *mut JSAddonId;
#[link_name = "_ZN2JS9NewSymbolEP9JSContextNS_6HandleIP8JSStringEE"]
pub fn NewSymbol(cx: *mut JSContext, description: HandleString)
-> *mut Symbol;
#[link_name = "_ZN2JS12GetSymbolForEP9JSContextNS_6HandleIP8JSStringEE"]
pub fn GetSymbolFor(cx: *mut JSContext, key: HandleString) -> *mut Symbol;
#[link_name = "_ZN2JS20GetSymbolDescriptionENS_6HandleIPNS_6SymbolEEE"]
pub fn GetSymbolDescription(symbol: HandleSymbol) -> *mut JSString;
#[link_name = "_ZN2JS13GetSymbolCodeENS_6HandleIPNS_6SymbolEEE"]
pub fn GetSymbolCode(symbol: Handle<*mut Symbol>) -> SymbolCode;
#[link_name = "_ZN2JS18GetWellKnownSymbolEP9JSContextNS_10SymbolCodeE"]
pub fn GetWellKnownSymbol(cx: *mut JSContext, which: SymbolCode)
-> *mut Symbol;
#[link_name = "_ZN2JS24PropertySpecNameEqualsIdEPKcNS_6HandleI4jsidEE"]
pub fn PropertySpecNameEqualsId(name: *const ::libc::c_char, id: HandleId)
-> bool;
#[link_name =
"_ZN2JS29PropertySpecNameToPermanentIdEP9JSContextPKcP4jsid"]
pub fn PropertySpecNameToPermanentId(cx: *mut JSContext,
name: *const ::libc::c_char,
idp: *mut jsid) -> bool;
#[link_name =
"_Z12JS_StringifyP9JSContextN2JS13MutableHandleINS1_5ValueEEENS1_6HandleIP8JSObjectEENS5_IS3_EEPFbPKDsjPvESC_"]
pub fn JS_Stringify(cx: *mut JSContext, value: MutableHandleValue,
replacer: HandleObject, space: HandleValue,
callback: JSONWriteCallback,
data: *mut ::libc::c_void) -> bool;
#[link_name =
"_Z12JS_ParseJSONP9JSContextPKDsjN2JS13MutableHandleINS3_5ValueEEE"]
pub fn JS_ParseJSON(cx: *mut JSContext, chars: *const u16, len: u32,
vp: MutableHandleValue) -> bool;
#[link_name =
"_Z12JS_ParseJSONP9JSContextN2JS6HandleIP8JSStringEENS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_ParseJSON1(cx: *mut JSContext, str: HandleString,
vp: MutableHandleValue) -> bool;
#[link_name =
"_Z23JS_ParseJSONWithReviverP9JSContextPKDsjN2JS6HandleINS3_5ValueEEENS3_13MutableHandleIS5_EE"]
pub fn JS_ParseJSONWithReviver(cx: *mut JSContext, chars: *const u16,
len: u32, reviver: HandleValue,
vp: MutableHandleValue) -> bool;
#[link_name =
"_Z23JS_ParseJSONWithReviverP9JSContextN2JS6HandleIP8JSStringEENS2_INS1_5ValueEEENS1_13MutableHandleIS6_EE"]
pub fn JS_ParseJSONWithReviver1(cx: *mut JSContext, str: HandleString,
reviver: HandleValue,
vp: MutableHandleValue) -> bool;
#[link_name = "_Z19JS_SetDefaultLocaleP9JSRuntimePKc"]
pub fn JS_SetDefaultLocale(rt: *mut JSRuntime,
locale: *const ::libc::c_char) -> bool;
#[link_name = "_Z21JS_ResetDefaultLocaleP9JSRuntime"]
pub fn JS_ResetDefaultLocale(rt: *mut JSRuntime);
#[link_name = "_Z21JS_SetLocaleCallbacksP9JSRuntimePK17JSLocaleCallbacks"]
pub fn JS_SetLocaleCallbacks(rt: *mut JSRuntime,
callbacks: *const JSLocaleCallbacks);
#[link_name = "_Z21JS_GetLocaleCallbacksP9JSRuntime"]
pub fn JS_GetLocaleCallbacks(rt: *mut JSRuntime)
-> *const JSLocaleCallbacks;
#[link_name = "_Z14JS_ReportErrorP9JSContextPKcz"]
pub fn JS_ReportError(cx: *mut JSContext,
format: *const ::libc::c_char, ...);
#[link_name =
"_Z20JS_ReportErrorNumberP9JSContextPFPK19JSErrorFormatStringPvjES4_jz"]
pub fn JS_ReportErrorNumber(cx: *mut JSContext,
errorCallback: JSErrorCallback,
userRef: *mut ::libc::c_void,
errorNumber: u32, ...);
#[link_name =
"_Z22JS_ReportErrorNumberVAP9JSContextPFPK19JSErrorFormatStringPvjES4_jP13__va_list_tag"]
pub fn JS_ReportErrorNumberVA(cx: *mut JSContext,
errorCallback: JSErrorCallback,
userRef: *mut ::libc::c_void,
errorNumber: u32, ap: va_list);
#[link_name =
"_Z22JS_ReportErrorNumberUCP9JSContextPFPK19JSErrorFormatStringPvjES4_jz"]
pub fn JS_ReportErrorNumberUC(cx: *mut JSContext,
errorCallback: JSErrorCallback,
userRef: *mut ::libc::c_void,
errorNumber: u32, ...);
#[link_name =
"_Z27JS_ReportErrorNumberUCArrayP9JSContextPFPK19JSErrorFormatStringPvjES4_jPPKDs"]
pub fn JS_ReportErrorNumberUCArray(cx: *mut JSContext,
errorCallback: JSErrorCallback,
userRef: *mut ::libc::c_void,
errorNumber: u32,
args: *mut *const u16);
#[link_name = "_Z16JS_ReportWarningP9JSContextPKcz"]
pub fn JS_ReportWarning(cx: *mut JSContext,
format: *const ::libc::c_char, ...) -> bool;
#[link_name =
"_Z28JS_ReportErrorFlagsAndNumberP9JSContextjPFPK19JSErrorFormatStringPvjES4_jz"]
pub fn JS_ReportErrorFlagsAndNumber(cx: *mut JSContext, flags: u32,
errorCallback: JSErrorCallback,
userRef: *mut ::libc::c_void,
errorNumber: u32, ...) -> bool;
#[link_name =
"_Z30JS_ReportErrorFlagsAndNumberUCP9JSContextjPFPK19JSErrorFormatStringPvjES4_jz"]
pub fn JS_ReportErrorFlagsAndNumberUC(cx: *mut JSContext, flags: u32,
errorCallback: JSErrorCallback,
userRef: *mut ::libc::c_void,
errorNumber: u32, ...) -> bool;
#[link_name = "_Z20JS_ReportOutOfMemoryP9JSContext"]
pub fn JS_ReportOutOfMemory(cx: *mut JSContext);
#[link_name = "_Z27JS_ReportAllocationOverflowP9JSContext"]
pub fn JS_ReportAllocationOverflow(cx: *mut JSContext);
#[link_name = "_Z19JS_GetErrorReporterP9JSRuntime"]
pub fn JS_GetErrorReporter(rt: *mut JSRuntime) -> JSErrorReporter;
#[link_name =
"_Z19JS_SetErrorReporterP9JSRuntimePFvP9JSContextPKcP13JSErrorReportE"]
pub fn JS_SetErrorReporter(rt: *mut JSRuntime, er: JSErrorReporter)
-> JSErrorReporter;
#[link_name =
"_ZN2JS11CreateErrorEP9JSContext9JSExnTypeNS_6HandleIP8JSStringEES6_jjP13JSErrorReportS6_NS_13MutableHandleINS_5ValueEEE"]
pub fn CreateError(cx: *mut JSContext, _type: JSExnType,
stack: HandleString, fileName: HandleString,
lineNumber: u32, columnNumber: u32,
report: *mut JSErrorReport, message: HandleString,
rval: MutableHandleValue) -> bool;
#[link_name = "_ZN2JS16NewWeakMapObjectEP9JSContext"]
pub fn NewWeakMapObject(cx: *mut JSContext) -> *mut JSObject;
#[link_name = "_ZN2JS15IsWeakMapObjectEP8JSObject"]
pub fn IsWeakMapObject(obj: *mut JSObject) -> bool;
#[link_name =
"_ZN2JS15GetWeakMapEntryEP9JSContextNS_6HandleIP8JSObjectEES5_NS_13MutableHandleINS_5ValueEEE"]
pub fn GetWeakMapEntry(cx: *mut JSContext, mapObj: HandleObject,
key: HandleObject, val: MutableHandleValue)
-> bool;
#[link_name =
"_ZN2JS15SetWeakMapEntryEP9JSContextNS_6HandleIP8JSObjectEES5_NS2_INS_5ValueEEE"]
pub fn SetWeakMapEntry(cx: *mut JSContext, mapObj: HandleObject,
key: HandleObject, val: HandleValue) -> bool;
#[link_name = "_ZN2JS12NewMapObjectEP9JSContext"]
pub fn NewMapObject(cx: *mut JSContext) -> *mut JSObject;
#[link_name = "_ZN2JS7MapSizeEP9JSContextNS_6HandleIP8JSObjectEE"]
pub fn MapSize(cx: *mut JSContext, obj: HandleObject) -> u32;
#[link_name =
"_ZN2JS6MapGetEP9JSContextNS_6HandleIP8JSObjectEENS2_INS_5ValueEEENS_13MutableHandleIS6_EE"]
pub fn MapGet(cx: *mut JSContext, obj: HandleObject, key: HandleValue,
rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS6MapHasEP9JSContextNS_6HandleIP8JSObjectEENS2_INS_5ValueEEEPb"]
pub fn MapHas(cx: *mut JSContext, obj: HandleObject, key: HandleValue,
rval: *mut bool) -> bool;
#[link_name =
"_ZN2JS6MapSetEP9JSContextNS_6HandleIP8JSObjectEENS2_INS_5ValueEEES7_"]
pub fn MapSet(cx: *mut JSContext, obj: HandleObject, key: HandleValue,
val: HandleValue) -> bool;
#[link_name = "_ZN2JS8MapClearEP9JSContextNS_6HandleIP8JSObjectEE"]
pub fn MapClear(cx: *mut JSContext, obj: HandleObject) -> bool;
#[link_name =
"_ZN2JS7MapKeysEP9JSContextNS_6HandleIP8JSObjectEENS_13MutableHandleINS_5ValueEEE"]
pub fn MapKeys(cx: *mut JSContext, obj: HandleObject,
rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS9MapValuesEP9JSContextNS_6HandleIP8JSObjectEENS_13MutableHandleINS_5ValueEEE"]
pub fn MapValues(cx: *mut JSContext, obj: HandleObject,
rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS10MapEntriesEP9JSContextNS_6HandleIP8JSObjectEENS_13MutableHandleINS_5ValueEEE"]
pub fn MapEntries(cx: *mut JSContext, obj: HandleObject,
rval: MutableHandleValue) -> bool;
#[link_name = "_Z16JS_NewDateObjectP9JSContextiiiiii"]
pub fn JS_NewDateObject(cx: *mut JSContext, year: i32, mon: i32,
mday: i32, hour: i32, min: i32, sec: i32)
-> *mut JSObject;
#[link_name = "_Z20JS_NewDateObjectMsecP9JSContextd"]
pub fn JS_NewDateObjectMsec(cx: *mut JSContext, msec: f64)
-> *mut JSObject;
#[link_name = "_Z15JS_ObjectIsDateP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_ObjectIsDate(cx: *mut JSContext, obj: HandleObject) -> bool;
#[link_name = "_Z18JS_ClearDateCachesP9JSContext"]
pub fn JS_ClearDateCaches(cx: *mut JSContext);
#[link_name =
"_Z18JS_NewRegExpObjectP9JSContextN2JS6HandleIP8JSObjectEEPKcmj"]
pub fn JS_NewRegExpObject(cx: *mut JSContext, obj: HandleObject,
bytes: *const ::libc::c_char, length: size_t,
flags: u32) -> *mut JSObject;
#[link_name =
"_Z20JS_NewUCRegExpObjectP9JSContextN2JS6HandleIP8JSObjectEEPKDsmj"]
pub fn JS_NewUCRegExpObject(cx: *mut JSContext, obj: HandleObject,
chars: *const u16, length: size_t, flags: u32)
-> *mut JSObject;
#[link_name =
"_Z17JS_SetRegExpInputP9JSContextN2JS6HandleIP8JSObjectEENS2_IP8JSStringEEb"]
pub fn JS_SetRegExpInput(cx: *mut JSContext, obj: HandleObject,
input: HandleString, multiline: bool) -> bool;
#[link_name =
"_Z21JS_ClearRegExpStaticsP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_ClearRegExpStatics(cx: *mut JSContext, obj: HandleObject)
-> bool;
#[link_name =
"_Z16JS_ExecuteRegExpP9JSContextN2JS6HandleIP8JSObjectEES5_PDsmPmbNS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_ExecuteRegExp(cx: *mut JSContext, obj: HandleObject,
reobj: HandleObject, chars: *mut u16,
length: size_t, indexp: *mut size_t, test: bool,
rval: MutableHandleValue) -> bool;
#[link_name = "_Z27JS_NewRegExpObjectNoStaticsP9JSContextPcmj"]
pub fn JS_NewRegExpObjectNoStatics(cx: *mut JSContext,
bytes: *mut ::libc::c_char,
length: size_t, flags: u32)
-> *mut JSObject;
#[link_name = "_Z29JS_NewUCRegExpObjectNoStaticsP9JSContextPDsmj"]
pub fn JS_NewUCRegExpObjectNoStatics(cx: *mut JSContext, chars: *mut u16,
length: size_t, flags: u32)
-> *mut JSObject;
#[link_name =
"_Z25JS_ExecuteRegExpNoStaticsP9JSContextN2JS6HandleIP8JSObjectEEPDsmPmbNS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_ExecuteRegExpNoStatics(cx: *mut JSContext, reobj: HandleObject,
chars: *mut u16, length: size_t,
indexp: *mut size_t, test: bool,
rval: MutableHandleValue) -> bool;
#[link_name = "_Z17JS_ObjectIsRegExpP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_ObjectIsRegExp(cx: *mut JSContext, obj: HandleObject) -> bool;
#[link_name = "_Z17JS_GetRegExpFlagsP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_GetRegExpFlags(cx: *mut JSContext, obj: HandleObject) -> u32;
#[link_name = "_Z18JS_GetRegExpSourceP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_GetRegExpSource(cx: *mut JSContext, obj: HandleObject)
-> *mut JSString;
#[link_name = "_Z21JS_IsExceptionPendingP9JSContext"]
pub fn JS_IsExceptionPending(cx: *mut JSContext) -> bool;
#[link_name =
"_Z22JS_GetPendingExceptionP9JSContextN2JS13MutableHandleINS1_5ValueEEE"]
pub fn JS_GetPendingException(cx: *mut JSContext, vp: MutableHandleValue)
-> bool;
#[link_name =
"_Z22JS_SetPendingExceptionP9JSContextN2JS6HandleINS1_5ValueEEE"]
pub fn JS_SetPendingException(cx: *mut JSContext, v: HandleValue);
#[link_name = "_Z24JS_ClearPendingExceptionP9JSContext"]
pub fn JS_ClearPendingException(cx: *mut JSContext);
#[link_name = "_Z25JS_ReportPendingExceptionP9JSContext"]
pub fn JS_ReportPendingException(cx: *mut JSContext) -> bool;
#[link_name = "_Z21JS_SaveExceptionStateP9JSContext"]
pub fn JS_SaveExceptionState(cx: *mut JSContext) -> *mut JSExceptionState;
#[link_name =
"_Z24JS_RestoreExceptionStateP9JSContextP16JSExceptionState"]
pub fn JS_RestoreExceptionState(cx: *mut JSContext,
state: *mut JSExceptionState);
#[link_name = "_Z21JS_DropExceptionStateP9JSContextP16JSExceptionState"]
pub fn JS_DropExceptionState(cx: *mut JSContext,
state: *mut JSExceptionState);
#[link_name =
"_Z21JS_ErrorFromExceptionP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_ErrorFromException(cx: *mut JSContext, obj: HandleObject)
-> *mut JSErrorReport;
#[link_name = "_Z21JS_ThrowStopIterationP9JSContext"]
pub fn JS_ThrowStopIteration(cx: *mut JSContext) -> bool;
#[link_name = "_Z18JS_IsStopIterationN2JS5ValueE"]
pub fn JS_IsStopIteration(v: jsval) -> bool;
#[link_name = "_Z19JS_GetCurrentThreadv"]
pub fn JS_GetCurrentThread() -> intptr_t;
#[link_name = "_Z21JS_AbortIfWrongThreadP9JSRuntime"]
pub fn JS_AbortIfWrongThread(rt: *mut JSRuntime);
#[link_name =
"_Z26JS_NewObjectForConstructorP9JSContextPK7JSClassRKN2JS8CallArgsE"]
pub fn JS_NewObjectForConstructor(cx: *mut JSContext,
clasp: *const JSClass, args: &CallArgs)
-> *mut JSObject;
#[link_name = "_Z12JS_GetGCZealP9JSContextPhPjS2_"]
pub fn JS_GetGCZeal(cx: *mut JSContext, zeal: *mut u8,
frequency: *mut u32, nextScheduled: *mut u32);
#[link_name = "_Z12JS_SetGCZealP9JSContexthj"]
pub fn JS_SetGCZeal(cx: *mut JSContext, zeal: u8, frequency: u32);
#[link_name = "_Z13JS_ScheduleGCP9JSContextj"]
pub fn JS_ScheduleGC(cx: *mut JSContext, count: u32);
#[link_name = "_Z28JS_SetParallelParsingEnabledP9JSRuntimeb"]
pub fn JS_SetParallelParsingEnabled(rt: *mut JSRuntime, enabled: bool);
#[link_name = "_Z36JS_SetOffthreadIonCompilationEnabledP9JSRuntimeb"]
pub fn JS_SetOffthreadIonCompilationEnabled(rt: *mut JSRuntime,
enabled: bool);
#[link_name =
"_Z29JS_SetGlobalJitCompilerOptionP9JSRuntime19JSJitCompilerOptionj"]
pub fn JS_SetGlobalJitCompilerOption(rt: *mut JSRuntime,
opt: JSJitCompilerOption,
value: u32);
#[link_name =
"_Z29JS_GetGlobalJitCompilerOptionP9JSRuntime19JSJitCompilerOption"]
pub fn JS_GetGlobalJitCompilerOption(rt: *mut JSRuntime,
opt: JSJitCompilerOption) -> i32;
#[link_name = "_Z12JS_IndexToIdP9JSContextjN2JS13MutableHandleI4jsidEE"]
pub fn JS_IndexToId(cx: *mut JSContext, index: u32, arg1: MutableHandleId)
-> bool;
#[link_name =
"_Z12JS_CharsToIdP9JSContextN2JS12TwoByteCharsENS1_13MutableHandleI4jsidEE"]
pub fn JS_CharsToId(cx: *mut JSContext, chars: TwoByteChars,
arg1: MutableHandleId) -> bool;
#[link_name = "_Z15JS_IsIdentifierP9JSContextN2JS6HandleIP8JSStringEEPb"]
pub fn JS_IsIdentifier(cx: *mut JSContext, str: HandleString,
isIdentifier: *mut bool) -> bool;
#[link_name = "_Z15JS_IsIdentifierPKDsm"]
pub fn JS_IsIdentifier1(chars: *const u16, length: size_t) -> bool;
#[link_name =
"_ZN2JS22DescribeScriptedCallerEP9JSContextPNS_12AutoFilenameEPj"]
pub fn DescribeScriptedCaller(cx: *mut JSContext,
filename: *mut AutoFilename,
lineno: *mut u32) -> bool;
#[link_name = "_ZN2JS23GetScriptedCallerGlobalEP9JSContext"]
pub fn GetScriptedCallerGlobal(cx: *mut JSContext) -> *mut JSObject;
#[link_name = "_ZN2JS18HideScriptedCallerEP9JSContext"]
pub fn HideScriptedCaller(cx: *mut JSContext);
#[link_name = "_ZN2JS20UnhideScriptedCallerEP9JSContext"]
pub fn UnhideScriptedCaller(cx: *mut JSContext);
#[link_name = "_Z15JS_EncodeScriptP9JSContextN2JS6HandleIP8JSScriptEEPj"]
pub fn JS_EncodeScript(cx: *mut JSContext, script: HandleScript,
lengthp: *mut u32) -> *mut ::libc::c_void;
#[link_name =
"_Z28JS_EncodeInterpretedFunctionP9JSContextN2JS6HandleIP8JSObjectEEPj"]
pub fn JS_EncodeInterpretedFunction(cx: *mut JSContext,
funobj: HandleObject,
lengthp: *mut u32)
-> *mut ::libc::c_void;
#[link_name = "_Z15JS_DecodeScriptP9JSContextPKvj"]
pub fn JS_DecodeScript(cx: *mut JSContext, data: *const ::libc::c_void,
length: u32) -> *mut JSScript;
#[link_name = "_Z28JS_DecodeInterpretedFunctionP9JSContextPKvj"]
pub fn JS_DecodeInterpretedFunction(cx: *mut JSContext,
data: *const ::libc::c_void,
length: u32) -> *mut JSObject;
#[link_name = "_ZN2JS16SetAsmJSCacheOpsEP9JSRuntimePKNS_13AsmJSCacheOpsE"]
pub fn SetAsmJSCacheOps(rt: *mut JSRuntime,
callbacks: *const AsmJSCacheOps);
#[link_name =
"_ZN2JS33SetLargeAllocationFailureCallbackEP9JSRuntimePFvPvES2_"]
pub fn SetLargeAllocationFailureCallback(rt: *mut JSRuntime,
afc:
LargeAllocationFailureCallback,
data: *mut ::libc::c_void);
#[link_name =
"_ZN2JS22SetOutOfMemoryCallbackEP9JSRuntimePFvP9JSContextPvES4_"]
pub fn SetOutOfMemoryCallback(rt: *mut JSRuntime, cb: OutOfMemoryCallback,
data: *mut ::libc::c_void);
#[link_name =
"_ZN2JS19CaptureCurrentStackEP9JSContextNS_13MutableHandleIP8JSObjectEEj"]
pub fn CaptureCurrentStack(cx: *mut JSContext,
stackp: MutableHandleObject,
maxFrameCount: u32) -> bool;
#[link_name =
"_ZN2JS19GetSavedFrameSourceEP9JSContextNS_6HandleIP8JSObjectEENS_13MutableHandleIP8JSStringEE"]
pub fn GetSavedFrameSource(cx: *mut JSContext, savedFrame: HandleObject,
sourcep: MutableHandleString)
-> SavedFrameResult;
#[link_name =
"_ZN2JS17GetSavedFrameLineEP9JSContextNS_6HandleIP8JSObjectEEPj"]
pub fn GetSavedFrameLine(cx: *mut JSContext, savedFrame: HandleObject,
linep: *mut u32) -> SavedFrameResult;
#[link_name =
"_ZN2JS19GetSavedFrameColumnEP9JSContextNS_6HandleIP8JSObjectEEPj"]
pub fn GetSavedFrameColumn(cx: *mut JSContext, savedFrame: HandleObject,
columnp: *mut u32) -> SavedFrameResult;
#[link_name =
"_ZN2JS32GetSavedFrameFunctionDisplayNameEP9JSContextNS_6HandleIP8JSObjectEENS_13MutableHandleIP8JSStringEE"]
pub fn GetSavedFrameFunctionDisplayName(cx: *mut JSContext,
savedFrame: HandleObject,
namep: MutableHandleString)
-> SavedFrameResult;
#[link_name =
"_ZN2JS23GetSavedFrameAsyncCauseEP9JSContextNS_6HandleIP8JSObjectEENS_13MutableHandleIP8JSStringEE"]
pub fn GetSavedFrameAsyncCause(cx: *mut JSContext,
savedFrame: HandleObject,
asyncCausep: MutableHandleString)
-> SavedFrameResult;
#[link_name =
"_ZN2JS24GetSavedFrameAsyncParentEP9JSContextNS_6HandleIP8JSObjectEENS_13MutableHandleIS4_EE"]
pub fn GetSavedFrameAsyncParent(cx: *mut JSContext,
savedFrame: HandleObject,
asyncParentp: MutableHandleObject)
-> SavedFrameResult;
#[link_name =
"_ZN2JS19GetSavedFrameParentEP9JSContextNS_6HandleIP8JSObjectEENS_13MutableHandleIS4_EE"]
pub fn GetSavedFrameParent(cx: *mut JSContext, savedFrame: HandleObject,
parentp: MutableHandleObject)
-> SavedFrameResult;
#[link_name =
"_ZN2JS24StringifySavedFrameStackEP9JSContextNS_6HandleIP8JSObjectEENS_13MutableHandleIP8JSStringEE"]
pub fn StringifySavedFrameStack(cx: *mut JSContext, stack: HandleObject,
stringp: MutableHandleString) -> bool;
#[link_name = "_Z23JS_SetGrayGCRootsTracerP9JSRuntimePFvP8JSTracerPvES3_"]
pub fn JS_SetGrayGCRootsTracer(rt: *mut JSRuntime, traceOp: JSTraceDataOp,
data: *mut ::libc::c_void);
#[link_name = "_Z21JS_GetAnonymousStringP9JSRuntime"]
pub fn JS_GetAnonymousString(rt: *mut JSRuntime) -> *mut JSString;
#[link_name =
"_Z23JS_FindCompilationScopeP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_FindCompilationScope(cx: *mut JSContext, obj: HandleObject)
-> *mut JSObject;
#[link_name = "_Z20JS_GetObjectFunctionP8JSObject"]
pub fn JS_GetObjectFunction(obj: *mut JSObject) -> *mut JSFunction;
#[link_name =
"_Z18JS_SplicePrototypeP9JSContextN2JS6HandleIP8JSObjectEES5_"]
pub fn JS_SplicePrototype(cx: *mut JSContext, obj: HandleObject,
proto: HandleObject) -> bool;
#[link_name =
"_Z26JS_NewObjectWithUniqueTypeP9JSContextPK7JSClassN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewObjectWithUniqueType(cx: *mut JSContext,
clasp: *const JSClass,
proto: HandleObject) -> *mut JSObject;
#[link_name =
"_Z27JS_NewObjectWithoutMetadataP9JSContextPK7JSClassN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewObjectWithoutMetadata(cx: *mut JSContext,
clasp: *const JSClass,
proto: Handle<*mut JSObject>)
-> *mut JSObject;
#[link_name = "_Z26JS_ObjectCountDynamicSlotsN2JS6HandleIP8JSObjectEE"]
pub fn JS_ObjectCountDynamicSlots(obj: HandleObject) -> u32;
#[link_name = "_Z17JS_SetProtoCalledP9JSContext"]
pub fn JS_SetProtoCalled(cx: *mut JSContext) -> size_t;
#[link_name = "_Z25JS_GetCustomIteratorCountP9JSContext"]
pub fn JS_GetCustomIteratorCount(cx: *mut JSContext) -> size_t;
#[link_name =
"_Z33JS_NondeterministicGetWeakMapKeysP9JSContextN2JS6HandleIP8JSObjectEENS1_13MutableHandleIS4_EE"]
pub fn JS_NondeterministicGetWeakMapKeys(cx: *mut JSContext,
obj: HandleObject,
ret: MutableHandleObject)
-> bool;
#[link_name = "_Z17JS_PCToLineNumberP8JSScriptPhPj"]
pub fn JS_PCToLineNumber(script: *mut JSScript, pc: *mut jsbytecode,
columnp: *mut u32) -> u32;
#[link_name = "_Z16JS_IsDeadWrapperP8JSObject"]
pub fn JS_IsDeadWrapper(obj: *mut JSObject) -> bool;
#[link_name =
"_Z35JS_TraceShapeCycleCollectorChildrenP8JSTracerN2JS9GCCellPtrE"]
pub fn JS_TraceShapeCycleCollectorChildren(trc: *mut JSTracer,
shape: GCCellPtr);
#[link_name = "_Z33JS_SetAccumulateTelemetryCallbackP9JSRuntimePFvijPKcE"]
pub fn JS_SetAccumulateTelemetryCallback(rt: *mut JSRuntime,
callback:
JSAccumulateTelemetryDataCallback);
#[link_name = "_Z27JS_GetCompartmentPrincipalsP13JSCompartment"]
pub fn JS_GetCompartmentPrincipals(compartment: *mut JSCompartment)
-> *mut JSPrincipals;
#[link_name =
"_Z27JS_SetCompartmentPrincipalsP13JSCompartmentP12JSPrincipals"]
pub fn JS_SetCompartmentPrincipals(compartment: *mut JSCompartment,
principals: *mut JSPrincipals);
#[link_name = "_Z22JS_GetScriptPrincipalsP8JSScript"]
pub fn JS_GetScriptPrincipals(script: *mut JSScript) -> *mut JSPrincipals;
#[link_name = "_Z23JS_ScriptHasMutedErrorsP8JSScript"]
pub fn JS_ScriptHasMutedErrors(script: *mut JSScript) -> bool;
#[link_name =
"_Z22JS_ObjectToInnerObjectP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_ObjectToInnerObject(cx: *mut JSContext, obj: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z22JS_ObjectToOuterObjectP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_ObjectToOuterObject(cx: *mut JSContext, obj: HandleObject)
-> *mut JSObject;
#[link_name = "_Z14JS_CloneObjectP9JSContextN2JS6HandleIP8JSObjectEES5_"]
pub fn JS_CloneObject(cx: *mut JSContext, obj: HandleObject,
proto: HandleObject) -> *mut JSObject;
#[link_name =
"_Z49JS_InitializePropertiesFromCompatibleNativeObjectP9JSContextN2JS6HandleIP8JSObjectEES5_"]
pub fn JS_InitializePropertiesFromCompatibleNativeObject(cx:
*mut JSContext,
dst:
HandleObject,
src:
HandleObject)
-> bool;
#[link_name =
"_Z22JS_BasicObjectToStringP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_BasicObjectToString(cx: *mut JSContext, obj: HandleObject)
-> *mut JSString;
#[link_name =
"_ZN2js13ObjectClassIsEP9JSContextN2JS6HandleIP8JSObjectEENS_12ESClassValueE"]
pub fn ObjectClassIs(cx: *mut JSContext, obj: HandleObject,
classValue: ESClassValue) -> bool;
#[link_name =
"_ZN2js15ObjectClassNameEP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn ObjectClassName(cx: *mut JSContext, obj: HandleObject)
-> *const ::libc::c_char;
#[link_name = "_ZN2js18ReportOverRecursedEP9JSContext"]
pub fn ReportOverRecursed(maybecx: *mut JSContext);
#[link_name = "_ZN2js15AddRawValueRootEP9JSContextPN2JS5ValueEPKc"]
pub fn AddRawValueRoot(cx: *mut JSContext, vp: *mut Value,
name: *const ::libc::c_char) -> bool;
#[link_name = "_ZN2js18RemoveRawValueRootEP9JSContextPN2JS5ValueE"]
pub fn RemoveRawValueRoot(cx: *mut JSContext, vp: *mut Value);
#[link_name = "_ZN2js10DumpStringEP8JSString"]
pub fn DumpString(str: *mut JSString);
#[link_name = "_ZN2js8DumpAtomEP6JSAtom"]
pub fn DumpAtom(atom: *mut JSAtom);
#[link_name = "_ZN2js10DumpObjectEP8JSObject"]
pub fn DumpObject(obj: *mut JSObject);
#[link_name = "_ZN2js9DumpCharsEPKDsm"]
pub fn DumpChars(s: *const u16, n: size_t);
#[link_name = "_ZN2js9DumpValueERKN2JS5ValueE"]
pub fn DumpValue(val: &Value);
#[link_name = "_ZN2js6DumpIdE4jsid"]
pub fn DumpId(id: jsid);
#[link_name =
"_ZN2js20DumpInterpreterFrameEP9JSContextPNS_16InterpreterFrameE"]
pub fn DumpInterpreterFrame(cx: *mut JSContext,
start: *mut InterpreterFrame);
#[link_name = "_ZN2js6DumpPCEP9JSContext"]
pub fn DumpPC(cx: *mut JSContext) -> bool;
#[link_name = "_ZN2js10DumpScriptEP9JSContextP8JSScript"]
pub fn DumpScript(cx: *mut JSContext, scriptArg: *mut JSScript) -> bool;
#[link_name = "_ZN2js13DumpBacktraceEP9JSContext"]
pub fn DumpBacktrace(cx: *mut JSContext);
#[link_name = "_ZN2JS15FormatStackDumpEP9JSContextPcbbb"]
pub fn FormatStackDump(cx: *mut JSContext, buf: *mut ::libc::c_char,
showArgs: bool, showLocals: bool,
showThisProps: bool) -> *mut ::libc::c_char;
#[link_name =
"_Z21JS_CopyPropertiesFromP9JSContextN2JS6HandleIP8JSObjectEES5_"]
pub fn JS_CopyPropertiesFrom(cx: *mut JSContext, target: HandleObject,
obj: HandleObject) -> bool;
#[link_name =
"_Z19JS_CopyPropertyFromP9JSContextN2JS6HandleI4jsidEENS2_IP8JSObjectEES7_20PropertyCopyBehavior"]
pub fn JS_CopyPropertyFrom(cx: *mut JSContext, id: HandleId,
target: HandleObject, obj: HandleObject,
copyBehavior: PropertyCopyBehavior) -> bool;
#[link_name =
"_Z25JS_WrapPropertyDescriptorP9JSContextN2JS13MutableHandleI20JSPropertyDescriptorEE"]
pub fn JS_WrapPropertyDescriptor(cx: *mut JSContext,
desc:
MutableHandle<JSPropertyDescriptor>)
-> bool;
#[link_name =
"_Z26JS_DefineFunctionsWithHelpP9JSContextN2JS6HandleIP8JSObjectEEPK22JSFunctionSpecWithHelp"]
pub fn JS_DefineFunctionsWithHelp(cx: *mut JSContext, obj: HandleObject,
fs: *const JSFunctionSpecWithHelp)
-> bool;
#[link_name =
"_ZN2js20proxy_LookupPropertyEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEENS2_13MutableHandleIS5_EENS9_IPNS_5ShapeEEE"]
pub fn proxy_LookupProperty(cx: *mut JSContext, obj: HandleObject,
id: HandleId, objp: MutableHandleObject,
propp: MutableHandle<*mut Shape>) -> bool;
#[link_name =
"_ZN2js20proxy_DefinePropertyEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEENS3_INS2_5ValueEEEPFbS1_S6_S8_NS2_13MutableHandleIS9_EEEPFbS1_S6_S8_SC_RNS2_14ObjectOpResultEEjSG_"]
pub fn proxy_DefineProperty(cx: *mut JSContext, obj: HandleObject,
id: HandleId, value: HandleValue,
getter: JSGetterOp, setter: JSSetterOp,
attrs: u32, result: &mut ObjectOpResult)
-> bool;
#[link_name =
"_ZN2js17proxy_HasPropertyEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEEPb"]
pub fn proxy_HasProperty(cx: *mut JSContext, obj: HandleObject,
id: HandleId, foundp: *mut bool) -> bool;
#[link_name =
"_ZN2js17proxy_GetPropertyEP9JSContextN2JS6HandleIP8JSObjectEES6_NS3_I4jsidEENS2_13MutableHandleINS2_5ValueEEE"]
pub fn proxy_GetProperty(cx: *mut JSContext, obj: HandleObject,
receiver: HandleObject, id: HandleId,
vp: MutableHandleValue) -> bool;
#[link_name =
"_ZN2js17proxy_SetPropertyEP9JSContextN2JS6HandleIP8JSObjectEES6_NS3_I4jsidEENS2_13MutableHandleINS2_5ValueEEERNS2_14ObjectOpResultE"]
pub fn proxy_SetProperty(cx: *mut JSContext, obj: HandleObject,
receiver: HandleObject, id: HandleId,
bp: MutableHandleValue,
result: &mut ObjectOpResult) -> bool;
#[link_name =
"_ZN2js30proxy_GetOwnPropertyDescriptorEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEENS2_13MutableHandleI20JSPropertyDescriptorEE"]
pub fn proxy_GetOwnPropertyDescriptor(cx: *mut JSContext,
obj: HandleObject, id: HandleId,
desc:
MutableHandle<JSPropertyDescriptor>)
-> bool;
#[link_name =
"_ZN2js20proxy_DeletePropertyEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEERNS2_14ObjectOpResultE"]
pub fn proxy_DeleteProperty(cx: *mut JSContext, obj: HandleObject,
id: HandleId, result: &mut ObjectOpResult)
-> bool;
#[link_name = "_ZN2js11proxy_TraceEP8JSTracerP8JSObject"]
pub fn proxy_Trace(trc: *mut JSTracer, obj: *mut JSObject);
#[link_name = "_ZN2js24proxy_WeakmapKeyDelegateEP8JSObject"]
pub fn proxy_WeakmapKeyDelegate(obj: *mut JSObject) -> *mut JSObject;
#[link_name =
"_ZN2js13proxy_ConvertEP9JSContextN2JS6HandleIP8JSObjectEE6JSTypeNS2_13MutableHandleINS2_5ValueEEE"]
pub fn proxy_Convert(cx: *mut JSContext, proxy: HandleObject,
hint: JSType, vp: MutableHandleValue) -> bool;
#[link_name = "_ZN2js14proxy_FinalizeEPNS_6FreeOpEP8JSObject"]
pub fn proxy_Finalize(fop: *mut FreeOp, obj: *mut JSObject);
#[link_name = "_ZN2js17proxy_ObjectMovedEP8JSObjectPKS0_"]
pub fn proxy_ObjectMoved(obj: *mut JSObject, old: *const JSObject);
#[link_name =
"_ZN2js17proxy_HasInstanceEP9JSContextN2JS6HandleIP8JSObjectEENS2_13MutableHandleINS2_5ValueEEEPb"]
pub fn proxy_HasInstance(cx: *mut JSContext, proxy: HandleObject,
v: MutableHandleValue, bp: *mut bool) -> bool;
#[link_name = "_ZN2js10proxy_CallEP9JSContextjPN2JS5ValueE"]
pub fn proxy_Call(cx: *mut JSContext, argc: u32, vp: *mut Value) -> bool;
#[link_name = "_ZN2js15proxy_ConstructEP9JSContextjPN2JS5ValueE"]
pub fn proxy_Construct(cx: *mut JSContext, argc: u32, vp: *mut Value)
-> bool;
#[link_name = "_ZN2js17proxy_innerObjectEP8JSObject"]
pub fn proxy_innerObject(obj: *mut JSObject) -> *mut JSObject;
#[link_name =
"_ZN2js11proxy_WatchEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEES6_"]
pub fn proxy_Watch(cx: *mut JSContext, obj: HandleObject, id: HandleId,
callable: HandleObject) -> bool;
#[link_name =
"_ZN2js13proxy_UnwatchEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEE"]
pub fn proxy_Unwatch(cx: *mut JSContext, obj: HandleObject, id: HandleId)
-> bool;
#[link_name =
"_ZN2js17proxy_GetElementsEP9JSContextN2JS6HandleIP8JSObjectEEjjPNS_12ElementAdderE"]
pub fn proxy_GetElements(cx: *mut JSContext, proxy: HandleObject,
begin: u32, end: u32, adder: *mut ElementAdder)
-> bool;
#[link_name = "_ZN2js18GetCompartmentZoneEP13JSCompartment"]
pub fn GetCompartmentZone(comp: *mut JSCompartment) -> *mut Zone;
#[link_name =
"_ZN2js16DumpHeapCompleteEP9JSRuntimeP8_IO_FILENS_24DumpHeapNurseryBehaviourE"]
pub fn DumpHeapComplete(rt: *mut JSRuntime, fp: *mut FILE,
nurseryBehaviour: DumpHeapNurseryBehaviour);
#[link_name = "_ZN2js16obj_defineGetterEP9JSContextjPN2JS5ValueE"]
pub fn obj_defineGetter(cx: *mut JSContext, argc: u32, vp: *mut Value)
-> bool;
#[link_name = "_ZN2js16obj_defineSetterEP9JSContextjPN2JS5ValueE"]
pub fn obj_defineSetter(cx: *mut JSContext, argc: u32, vp: *mut Value)
-> bool;
#[link_name = "_ZN2js19IsSystemCompartmentEP13JSCompartment"]
pub fn IsSystemCompartment(comp: *mut JSCompartment) -> bool;
#[link_name = "_ZN2js12IsSystemZoneEPN2JS4ZoneE"]
pub fn IsSystemZone(zone: *mut Zone) -> bool;
#[link_name = "_ZN2js18IsAtomsCompartmentEP13JSCompartment"]
pub fn IsAtomsCompartment(comp: *mut JSCompartment) -> bool;
#[link_name = "_ZN2js24IsInNonStrictPropertySetEP9JSContext"]
pub fn IsInNonStrictPropertySet(cx: *mut JSContext) -> bool;
#[link_name = "_ZN2js13TraceWeakMapsEPNS_13WeakMapTracerE"]
pub fn TraceWeakMaps(trc: *mut WeakMapTracer);
#[link_name = "_ZN2js18AreGCGrayBitsValidEP9JSRuntime"]
pub fn AreGCGrayBitsValid(rt: *mut JSRuntime) -> bool;
#[link_name = "_ZN2js21ZoneGlobalsAreAllGrayEPN2JS4ZoneE"]
pub fn ZoneGlobalsAreAllGray(zone: *mut Zone) -> bool;
#[link_name =
"_ZN2js23VisitGrayWrapperTargetsEPN2JS4ZoneEPFvPvNS0_9GCCellPtrEES3_"]
pub fn VisitGrayWrapperTargets(zone: *mut Zone, callback: GCThingCallback,
closure: *mut ::libc::c_void);
#[link_name = "_ZN2js21GetWeakmapKeyDelegateEP8JSObject"]
pub fn GetWeakmapKeyDelegate(key: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js16GCThingTraceKindEPv"]
pub fn GCThingTraceKind(thing: *mut ::libc::c_void) -> JSGCTraceKind;
#[link_name =
"_ZN2js18IterateGrayObjectsEPN2JS4ZoneEPFvPvNS0_9GCCellPtrEES3_"]
pub fn IterateGrayObjects(zone: *mut Zone, cellCallback: GCThingCallback,
data: *mut ::libc::c_void);
#[link_name = "_ZN2js23GetAnyCompartmentInZoneEPN2JS4ZoneE"]
pub fn GetAnyCompartmentInZone(zone: *mut Zone) -> *mut JSCompartment;
#[link_name = "_ZN2js15ProtoKeyToClassE10JSProtoKey"]
pub fn ProtoKeyToClass(key: JSProtoKey) -> *const Class;
#[link_name = "_ZN2js16IsFunctionObjectEP8JSObject"]
pub fn IsFunctionObject(obj: *mut JSObject) -> bool;
#[link_name = "_ZN2js13IsScopeObjectEP8JSObject"]
pub fn IsScopeObject(obj: *mut JSObject) -> bool;
#[link_name = "_ZN2js12IsCallObjectEP8JSObject"]
pub fn IsCallObject(obj: *mut JSObject) -> bool;
#[link_name = "_ZN2js20CanAccessObjectShapeEP8JSObject"]
pub fn CanAccessObjectShape(obj: *mut JSObject) -> bool;
#[link_name = "_ZN2js34GetGlobalForObjectCrossCompartmentEP8JSObject"]
pub fn GetGlobalForObjectCrossCompartment(obj: *mut JSObject)
-> *mut JSObject;
#[link_name = "_ZN2js19GetPrototypeNoProxyEP8JSObject"]
pub fn GetPrototypeNoProxy(obj: *mut JSObject) -> *mut JSObject;
#[link_name =
"_ZN2js31SetPendingExceptionCrossContextEP9JSContextN2JS6HandleINS2_5ValueEEE"]
pub fn SetPendingExceptionCrossContext(cx: *mut JSContext,
v: HandleValue);
#[link_name = "_ZN2js21AssertSameCompartmentEP9JSContextP8JSObject"]
pub fn AssertSameCompartment(cx: *mut JSContext, obj: *mut JSObject);
#[link_name = "_ZN2js21AssertSameCompartmentEP8JSObjectS1_"]
pub fn AssertSameCompartment1(objA: *mut JSObject, objB: *mut JSObject);
#[link_name = "_ZN2js23NotifyAnimationActivityEP8JSObject"]
pub fn NotifyAnimationActivity(obj: *mut JSObject);
#[link_name =
"_ZN2js45GetOutermostEnclosingFunctionOfScriptedCallerEP9JSContext"]
pub fn GetOutermostEnclosingFunctionOfScriptedCaller(cx: *mut JSContext)
-> *mut JSFunction;
#[link_name =
"_ZN2js26DefineFunctionWithReservedEP9JSContextP8JSObjectPKcPFbS1_jPN2JS5ValueEEjj"]
pub fn DefineFunctionWithReserved(cx: *mut JSContext, obj: *mut JSObject,
name: *const ::libc::c_char,
call: JSNative, nargs: u32, attrs: u32)
-> *mut JSFunction;
#[link_name =
"_ZN2js23NewFunctionWithReservedEP9JSContextPFbS1_jPN2JS5ValueEEjjPKc"]
pub fn NewFunctionWithReserved(cx: *mut JSContext, call: JSNative,
nargs: u32, flags: u32,
name: *const ::libc::c_char)
-> *mut JSFunction;
#[link_name =
"_ZN2js27NewFunctionByIdWithReservedEP9JSContextPFbS1_jPN2JS5ValueEEjj4jsid"]
pub fn NewFunctionByIdWithReserved(cx: *mut JSContext, native: JSNative,
nargs: u32, flags: u32, id: jsid)
-> *mut JSFunction;
#[link_name = "_ZN2js25GetFunctionNativeReservedEP8JSObjectm"]
pub fn GetFunctionNativeReserved(fun: *mut JSObject, which: size_t)
-> *const Value;
#[link_name =
"_ZN2js25SetFunctionNativeReservedEP8JSObjectmRKN2JS5ValueE"]
pub fn SetFunctionNativeReserved(fun: *mut JSObject, which: size_t,
val: &Value);
#[link_name = "_ZN2js25FunctionHasNativeReservedEP8JSObject"]
pub fn FunctionHasNativeReserved(fun: *mut JSObject) -> bool;
#[link_name =
"_ZN2js14GetObjectProtoEP9JSContextN2JS6HandleIP8JSObjectEENS2_13MutableHandleIS5_EE"]
pub fn GetObjectProto(cx: *mut JSContext, obj: HandleObject,
proto: MutableHandleObject) -> bool;
#[link_name =
"_ZN2js15GetOriginalEvalEP9JSContextN2JS6HandleIP8JSObjectEENS2_13MutableHandleIS5_EE"]
pub fn GetOriginalEval(cx: *mut JSContext, scope: HandleObject,
eval: MutableHandleObject) -> bool;
#[link_name =
"_ZN2js40SetReservedOrProxyPrivateSlotWithBarrierEP8JSObjectmRKN2JS5ValueE"]
pub fn SetReservedOrProxyPrivateSlotWithBarrier(obj: *mut JSObject,
slot: size_t,
value: &Value);
#[link_name = "_ZN2js17GetObjectSlotSpanEP8JSObject"]
pub fn GetObjectSlotSpan(obj: *mut JSObject) -> u32;
#[link_name = "_ZN2js24StringToLinearStringSlowEP9JSContextP8JSString"]
pub fn StringToLinearStringSlow(cx: *mut JSContext, str: *mut JSString)
-> *mut JSLinearString;
#[link_name =
"_ZN2js15GetPropertyKeysEP9JSContextN2JS6HandleIP8JSObjectEEjPNS2_12AutoIdVectorE"]
pub fn GetPropertyKeys(cx: *mut JSContext, obj: HandleObject, flags: u32,
props: *mut AutoIdVector) -> bool;
#[link_name = "_ZN2js12AppendUniqueEP9JSContextRN2JS12AutoIdVectorES4_"]
pub fn AppendUnique(cx: *mut JSContext, base: &mut AutoIdVector,
others: &mut AutoIdVector) -> bool;
#[link_name =
"_ZN2js10GetGenericEP9JSContextP8JSObjectS3_4jsidPN2JS5ValueE"]
pub fn GetGeneric(cx: *mut JSContext, obj: *mut JSObject,
receiver: *mut JSObject, id: jsid, vp: *mut Value)
-> bool;
#[link_name = "_ZN2js18StringIsArrayIndexEP14JSLinearStringPj"]
pub fn StringIsArrayIndex(str: *mut JSLinearString, indexp: *mut u32)
-> bool;
#[link_name =
"_ZN2js26SetPreserveWrapperCallbackEP9JSRuntimePFbP9JSContextP8JSObjectE"]
pub fn SetPreserveWrapperCallback(rt: *mut JSRuntime,
callback: PreserveWrapperCallback);
#[link_name =
"_ZN2js28IsObjectInContextCompartmentEP8JSObjectPK9JSContext"]
pub fn IsObjectInContextCompartment(obj: *mut JSObject,
cx: *const JSContext) -> bool;
#[link_name = "_ZN2js28RunningWithTrustedPrincipalsEP9JSContext"]
pub fn RunningWithTrustedPrincipals(cx: *mut JSContext) -> bool;
#[link_name = "_ZN2js21StartPCCountProfilingEP9JSContext"]
pub fn StartPCCountProfiling(cx: *mut JSContext);
#[link_name = "_ZN2js20StopPCCountProfilingEP9JSContext"]
pub fn StopPCCountProfiling(cx: *mut JSContext);
#[link_name = "_ZN2js13PurgePCCountsEP9JSContext"]
pub fn PurgePCCounts(cx: *mut JSContext);
#[link_name = "_ZN2js21GetPCCountScriptCountEP9JSContext"]
pub fn GetPCCountScriptCount(cx: *mut JSContext) -> size_t;
#[link_name = "_ZN2js23GetPCCountScriptSummaryEP9JSContextm"]
pub fn GetPCCountScriptSummary(cx: *mut JSContext, script: size_t)
-> *mut JSString;
#[link_name = "_ZN2js24GetPCCountScriptContentsEP9JSContextm"]
pub fn GetPCCountScriptContents(cx: *mut JSContext, script: size_t)
-> *mut JSString;
#[link_name = "_ZN2js29ContextHasOutstandingRequestsEPK9JSContext"]
pub fn ContextHasOutstandingRequests(cx: *const JSContext) -> bool;
#[link_name = "_ZN2js19SetActivityCallbackEP9JSRuntimePFvPvbES2_"]
pub fn SetActivityCallback(rt: *mut JSRuntime, cb: ActivityCallback,
arg: *mut ::libc::c_void);
#[link_name = "_ZN2js34GetContextStructuredCloneCallbacksEP9JSContext"]
pub fn GetContextStructuredCloneCallbacks(cx: *mut JSContext)
-> *const JSStructuredCloneCallbacks;
#[link_name = "_ZN2js18IsContextRunningJSEP9JSContext"]
pub fn IsContextRunningJS(cx: *mut JSContext) -> bool;
#[link_name = "_ZN2js15SetDOMCallbacksEP9JSRuntimePKNS_14JSDOMCallbacksE"]
pub fn SetDOMCallbacks(rt: *mut JSRuntime,
callbacks: *const DOMCallbacks);
#[link_name = "_ZN2js15GetDOMCallbacksEP9JSRuntime"]
pub fn GetDOMCallbacks(rt: *mut JSRuntime) -> *const DOMCallbacks;
#[link_name = "_ZN2js19GetTestingFunctionsEP9JSContext"]
pub fn GetTestingFunctions(cx: *mut JSContext) -> *mut JSObject;
#[link_name = "_ZN2js16GetErrorTypeNameEP9JSRuntimes"]
pub fn GetErrorTypeName(rt: *mut JSRuntime, exnType: i16)
-> *mut JSFlatString;
#[link_name = "_ZN2js24GetEnterCompartmentDepthEP9JSContext"]
pub fn GetEnterCompartmentDepth(cx: *mut JSContext) -> u32;
#[link_name =
"_ZN2js23RegExpToSharedNonInlineEP9JSContextN2JS6HandleIP8JSObjectEEPNS_11RegExpGuardE"]
pub fn RegExpToSharedNonInline(cx: *mut JSContext, regexp: HandleObject,
shared: *mut RegExpGuard) -> bool;
#[link_name =
"_ZN2js28NukeCrossCompartmentWrappersEP9JSContextRKNS_17CompartmentFilterES4_NS_22NukeReferencesToWindowE"]
pub fn NukeCrossCompartmentWrappers(cx: *mut JSContext,
sourceFilter: &CompartmentFilter,
targetFilter: &CompartmentFilter,
nukeReferencesToWindow:
NukeReferencesToWindow) -> bool;
#[link_name =
"_ZN2js22SetDOMProxyInformationEPKvjPFNS_21DOMProxyShadowsResultEP9JSContextN2JS6HandleIP8JSObjectEENS6_I4jsidEEE"]
pub fn SetDOMProxyInformation(domProxyHandlerFamily:
*const ::libc::c_void,
domProxyExpandoSlot: u32,
domProxyShadowsCheck: DOMProxyShadowsCheck);
#[link_name = "_ZN2js11DateIsValidEP9JSContextP8JSObject"]
pub fn DateIsValid(cx: *mut JSContext, obj: *mut JSObject) -> bool;
#[link_name = "_ZN2js21DateGetMsecSinceEpochEP9JSContextP8JSObject"]
pub fn DateGetMsecSinceEpoch(cx: *mut JSContext, obj: *mut JSObject)
-> f64;
#[link_name = "_ZN2js15GetErrorMessageEPvj"]
pub fn GetErrorMessage(userRef: *mut ::libc::c_void, errorNumber: u32)
-> *const JSErrorFormatString;
#[link_name = "_ZN2js19ErrorReportToStringEP9JSContextP13JSErrorReport"]
pub fn ErrorReportToString(cx: *mut JSContext,
reportp: *mut JSErrorReport) -> *mut JSString;
#[link_name = "_ZN2js11GetSCOffsetEP23JSStructuredCloneWriter"]
pub fn GetSCOffset(writer: *mut JSStructuredCloneWriter) -> u64;
#[link_name = "_Z15JS_NewInt8ArrayP9JSContextj"]
pub fn JS_NewInt8Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z16JS_NewUint8ArrayP9JSContextj"]
pub fn JS_NewUint8Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z23JS_NewUint8ClampedArrayP9JSContextj"]
pub fn JS_NewUint8ClampedArray(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z16JS_NewInt16ArrayP9JSContextj"]
pub fn JS_NewInt16Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z17JS_NewUint16ArrayP9JSContextj"]
pub fn JS_NewUint16Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z16JS_NewInt32ArrayP9JSContextj"]
pub fn JS_NewInt32Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z17JS_NewUint32ArrayP9JSContextj"]
pub fn JS_NewUint32Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z18JS_NewFloat32ArrayP9JSContextj"]
pub fn JS_NewFloat32Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z18JS_NewFloat64ArrayP9JSContextj"]
pub fn JS_NewFloat64Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z21JS_NewSharedInt8ArrayP9JSContextj"]
pub fn JS_NewSharedInt8Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z22JS_NewSharedUint8ArrayP9JSContextj"]
pub fn JS_NewSharedUint8Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z29JS_NewSharedUint8ClampedArrayP9JSContextj"]
pub fn JS_NewSharedUint8ClampedArray(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z22JS_NewSharedInt16ArrayP9JSContextj"]
pub fn JS_NewSharedInt16Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z23JS_NewSharedUint16ArrayP9JSContextj"]
pub fn JS_NewSharedUint16Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z22JS_NewSharedInt32ArrayP9JSContextj"]
pub fn JS_NewSharedInt32Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z23JS_NewSharedUint32ArrayP9JSContextj"]
pub fn JS_NewSharedUint32Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z24JS_NewSharedFloat32ArrayP9JSContextj"]
pub fn JS_NewSharedFloat32Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name = "_Z24JS_NewSharedFloat64ArrayP9JSContextj"]
pub fn JS_NewSharedFloat64Array(cx: *mut JSContext, nelements: u32)
-> *mut JSObject;
#[link_name =
"_Z24JS_NewInt8ArrayFromArrayP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewInt8ArrayFromArray(cx: *mut JSContext, array: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z25JS_NewUint8ArrayFromArrayP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewUint8ArrayFromArray(cx: *mut JSContext, array: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z32JS_NewUint8ClampedArrayFromArrayP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewUint8ClampedArrayFromArray(cx: *mut JSContext,
array: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z25JS_NewInt16ArrayFromArrayP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewInt16ArrayFromArray(cx: *mut JSContext, array: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z26JS_NewUint16ArrayFromArrayP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewUint16ArrayFromArray(cx: *mut JSContext, array: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z25JS_NewInt32ArrayFromArrayP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewInt32ArrayFromArray(cx: *mut JSContext, array: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z26JS_NewUint32ArrayFromArrayP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewUint32ArrayFromArray(cx: *mut JSContext, array: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z27JS_NewFloat32ArrayFromArrayP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewFloat32ArrayFromArray(cx: *mut JSContext,
array: HandleObject) -> *mut JSObject;
#[link_name =
"_Z27JS_NewFloat64ArrayFromArrayP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_NewFloat64ArrayFromArray(cx: *mut JSContext,
array: HandleObject) -> *mut JSObject;
#[link_name =
"_Z25JS_NewInt8ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_NewInt8ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: i32)
-> *mut JSObject;
#[link_name =
"_Z26JS_NewUint8ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_NewUint8ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: i32)
-> *mut JSObject;
#[link_name =
"_Z33JS_NewUint8ClampedArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_NewUint8ClampedArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: i32)
-> *mut JSObject;
#[link_name =
"_Z26JS_NewInt16ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_NewInt16ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: i32)
-> *mut JSObject;
#[link_name =
"_Z27JS_NewUint16ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_NewUint16ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: i32)
-> *mut JSObject;
#[link_name =
"_Z26JS_NewInt32ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_NewInt32ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: i32)
-> *mut JSObject;
#[link_name =
"_Z27JS_NewUint32ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_NewUint32ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: i32)
-> *mut JSObject;
#[link_name =
"_Z28JS_NewFloat32ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_NewFloat32ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: i32)
-> *mut JSObject;
#[link_name =
"_Z28JS_NewFloat64ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEji"]
pub fn JS_NewFloat64ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: i32)
-> *mut JSObject;
#[link_name =
"_Z31JS_NewSharedInt8ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_NewSharedInt8ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: u32)
-> *mut JSObject;
#[link_name =
"_Z32JS_NewSharedUint8ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_NewSharedUint8ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: u32)
-> *mut JSObject;
#[link_name =
"_Z39JS_NewSharedUint8ClampedArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_NewSharedUint8ClampedArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32,
length: u32)
-> *mut JSObject;
#[link_name =
"_Z32JS_NewSharedInt16ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_NewSharedInt16ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: u32)
-> *mut JSObject;
#[link_name =
"_Z33JS_NewSharedUint16ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_NewSharedUint16ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: u32)
-> *mut JSObject;
#[link_name =
"_Z32JS_NewSharedInt32ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_NewSharedInt32ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: u32)
-> *mut JSObject;
#[link_name =
"_Z33JS_NewSharedUint32ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_NewSharedUint32ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: u32)
-> *mut JSObject;
#[link_name =
"_Z34JS_NewSharedFloat32ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_NewSharedFloat32ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: u32)
-> *mut JSObject;
#[link_name =
"_Z34JS_NewSharedFloat64ArrayWithBufferP9JSContextN2JS6HandleIP8JSObjectEEjj"]
pub fn JS_NewSharedFloat64ArrayWithBuffer(cx: *mut JSContext,
arrayBuffer: HandleObject,
byteOffset: u32, length: u32)
-> *mut JSObject;
#[link_name = "_Z17JS_NewArrayBufferP9JSContextj"]
pub fn JS_NewArrayBuffer(cx: *mut JSContext, nbytes: u32)
-> *mut JSObject;
#[link_name = "_Z21JS_IsTypedArrayObjectP8JSObject"]
pub fn JS_IsTypedArrayObject(obj: *mut JSObject) -> bool;
#[link_name = "_Z27JS_IsSharedTypedArrayObjectP8JSObject"]
pub fn JS_IsSharedTypedArrayObject(obj: *mut JSObject) -> bool;
#[link_name = "_Z26JS_IsArrayBufferViewObjectP8JSObject"]
pub fn JS_IsArrayBufferViewObject(obj: *mut JSObject) -> bool;
#[link_name = "_Z14JS_IsInt8ArrayP8JSObject"]
pub fn JS_IsInt8Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z15JS_IsUint8ArrayP8JSObject"]
pub fn JS_IsUint8Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z22JS_IsUint8ClampedArrayP8JSObject"]
pub fn JS_IsUint8ClampedArray(obj: *mut JSObject) -> bool;
#[link_name = "_Z15JS_IsInt16ArrayP8JSObject"]
pub fn JS_IsInt16Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z16JS_IsUint16ArrayP8JSObject"]
pub fn JS_IsUint16Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z15JS_IsInt32ArrayP8JSObject"]
pub fn JS_IsInt32Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z16JS_IsUint32ArrayP8JSObject"]
pub fn JS_IsUint32Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z17JS_IsFloat32ArrayP8JSObject"]
pub fn JS_IsFloat32Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z17JS_IsFloat64ArrayP8JSObject"]
pub fn JS_IsFloat64Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z20JS_IsSharedInt8ArrayP8JSObject"]
pub fn JS_IsSharedInt8Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z21JS_IsSharedUint8ArrayP8JSObject"]
pub fn JS_IsSharedUint8Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z28JS_IsSharedUint8ClampedArrayP8JSObject"]
pub fn JS_IsSharedUint8ClampedArray(obj: *mut JSObject) -> bool;
#[link_name = "_Z21JS_IsSharedInt16ArrayP8JSObject"]
pub fn JS_IsSharedInt16Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z22JS_IsSharedUint16ArrayP8JSObject"]
pub fn JS_IsSharedUint16Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z21JS_IsSharedInt32ArrayP8JSObject"]
pub fn JS_IsSharedInt32Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z22JS_IsSharedUint32ArrayP8JSObject"]
pub fn JS_IsSharedUint32Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z23JS_IsSharedFloat32ArrayP8JSObject"]
pub fn JS_IsSharedFloat32Array(obj: *mut JSObject) -> bool;
#[link_name = "_Z23JS_IsSharedFloat64ArrayP8JSObject"]
pub fn JS_IsSharedFloat64Array(obj: *mut JSObject) -> bool;
#[link_name = "_ZN2js15UnwrapInt8ArrayEP8JSObject"]
pub fn UnwrapInt8Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js16UnwrapUint8ArrayEP8JSObject"]
pub fn UnwrapUint8Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js23UnwrapUint8ClampedArrayEP8JSObject"]
pub fn UnwrapUint8ClampedArray(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js16UnwrapInt16ArrayEP8JSObject"]
pub fn UnwrapInt16Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js17UnwrapUint16ArrayEP8JSObject"]
pub fn UnwrapUint16Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js16UnwrapInt32ArrayEP8JSObject"]
pub fn UnwrapInt32Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js17UnwrapUint32ArrayEP8JSObject"]
pub fn UnwrapUint32Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js18UnwrapFloat32ArrayEP8JSObject"]
pub fn UnwrapFloat32Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js18UnwrapFloat64ArrayEP8JSObject"]
pub fn UnwrapFloat64Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js17UnwrapArrayBufferEP8JSObject"]
pub fn UnwrapArrayBuffer(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js21UnwrapArrayBufferViewEP8JSObject"]
pub fn UnwrapArrayBufferView(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js21UnwrapSharedInt8ArrayEP8JSObject"]
pub fn UnwrapSharedInt8Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js22UnwrapSharedUint8ArrayEP8JSObject"]
pub fn UnwrapSharedUint8Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js29UnwrapSharedUint8ClampedArrayEP8JSObject"]
pub fn UnwrapSharedUint8ClampedArray(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js22UnwrapSharedInt16ArrayEP8JSObject"]
pub fn UnwrapSharedInt16Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js23UnwrapSharedUint16ArrayEP8JSObject"]
pub fn UnwrapSharedUint16Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js22UnwrapSharedInt32ArrayEP8JSObject"]
pub fn UnwrapSharedInt32Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js23UnwrapSharedUint32ArrayEP8JSObject"]
pub fn UnwrapSharedUint32Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js24UnwrapSharedFloat32ArrayEP8JSObject"]
pub fn UnwrapSharedFloat32Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js24UnwrapSharedFloat64ArrayEP8JSObject"]
pub fn UnwrapSharedFloat64Array(obj: *mut JSObject) -> *mut JSObject;
#[link_name = "_ZN2js31GetArrayBufferViewLengthAndDataEP8JSObjectPjPPh"]
pub fn GetArrayBufferViewLengthAndData(obj: *mut JSObject,
length: *mut u32,
data: *mut *mut u8);
#[link_name = "_ZN2js27GetArrayBufferLengthAndDataEP8JSObjectPjPPh"]
pub fn GetArrayBufferLengthAndData(obj: *mut JSObject, length: *mut u32,
data: *mut *mut u8);
#[link_name = "_Z23JS_GetObjectAsInt8ArrayP8JSObjectPjPPa"]
pub fn JS_GetObjectAsInt8Array(obj: *mut JSObject, length: *mut u32,
data: *mut *mut i8) -> *mut JSObject;
#[link_name = "_Z24JS_GetObjectAsUint8ArrayP8JSObjectPjPPh"]
pub fn JS_GetObjectAsUint8Array(obj: *mut JSObject, length: *mut u32,
data: *mut *mut u8) -> *mut JSObject;
#[link_name = "_Z31JS_GetObjectAsUint8ClampedArrayP8JSObjectPjPPh"]
pub fn JS_GetObjectAsUint8ClampedArray(obj: *mut JSObject,
length: *mut u32,
data: *mut *mut u8)
-> *mut JSObject;
#[link_name = "_Z24JS_GetObjectAsInt16ArrayP8JSObjectPjPPs"]
pub fn JS_GetObjectAsInt16Array(obj: *mut JSObject, length: *mut u32,
data: *mut *mut i16) -> *mut JSObject;
#[link_name = "_Z25JS_GetObjectAsUint16ArrayP8JSObjectPjPPt"]
pub fn JS_GetObjectAsUint16Array(obj: *mut JSObject, length: *mut u32,
data: *mut *mut u16) -> *mut JSObject;
#[link_name = "_Z24JS_GetObjectAsInt32ArrayP8JSObjectPjPPi"]
pub fn JS_GetObjectAsInt32Array(obj: *mut JSObject, length: *mut u32,
data: *mut *mut i32) -> *mut JSObject;
#[link_name = "_Z25JS_GetObjectAsUint32ArrayP8JSObjectPjPS1_"]
pub fn JS_GetObjectAsUint32Array(obj: *mut JSObject, length: *mut u32,
data: *mut *mut u32) -> *mut JSObject;
#[link_name = "_Z26JS_GetObjectAsFloat32ArrayP8JSObjectPjPPf"]
pub fn JS_GetObjectAsFloat32Array(obj: *mut JSObject, length: *mut u32,
data: *mut *mut f32) -> *mut JSObject;
#[link_name = "_Z26JS_GetObjectAsFloat64ArrayP8JSObjectPjPPd"]
pub fn JS_GetObjectAsFloat64Array(obj: *mut JSObject, length: *mut u32,
data: *mut *mut f64) -> *mut JSObject;
#[link_name = "_Z29JS_GetObjectAsArrayBufferViewP8JSObjectPjPPh"]
pub fn JS_GetObjectAsArrayBufferView(obj: *mut JSObject, length: *mut u32,
data: *mut *mut u8) -> *mut JSObject;
#[link_name = "_Z25JS_GetObjectAsArrayBufferP8JSObjectPjPPh"]
pub fn JS_GetObjectAsArrayBuffer(obj: *mut JSObject, length: *mut u32,
data: *mut *mut u8) -> *mut JSObject;
#[link_name = "_Z25JS_GetArrayBufferViewTypeP8JSObject"]
pub fn JS_GetArrayBufferViewType(obj: *mut JSObject) -> Type;
#[link_name = "_Z22JS_IsArrayBufferObjectP8JSObject"]
pub fn JS_IsArrayBufferObject(obj: *mut JSObject) -> bool;
#[link_name = "_Z28JS_IsSharedArrayBufferObjectP8JSObject"]
pub fn JS_IsSharedArrayBufferObject(obj: *mut JSObject) -> bool;
#[link_name = "_Z27JS_GetArrayBufferByteLengthP8JSObject"]
pub fn JS_GetArrayBufferByteLength(obj: *mut JSObject) -> u32;
#[link_name = "_Z21JS_ArrayBufferHasDataP8JSObject"]
pub fn JS_ArrayBufferHasData(obj: *mut JSObject) -> bool;
#[link_name = "_Z28JS_IsMappedArrayBufferObjectP8JSObject"]
pub fn JS_IsMappedArrayBufferObject(obj: *mut JSObject) -> bool;
#[link_name = "_Z22JS_GetTypedArrayLengthP8JSObject"]
pub fn JS_GetTypedArrayLength(obj: *mut JSObject) -> u32;
#[link_name = "_Z26JS_GetTypedArrayByteOffsetP8JSObject"]
pub fn JS_GetTypedArrayByteOffset(obj: *mut JSObject) -> u32;
#[link_name = "_Z26JS_GetTypedArrayByteLengthP8JSObject"]
pub fn JS_GetTypedArrayByteLength(obj: *mut JSObject) -> u32;
#[link_name = "_Z31JS_GetArrayBufferViewByteLengthP8JSObject"]
pub fn JS_GetArrayBufferViewByteLength(obj: *mut JSObject) -> u32;
#[link_name =
"_Z21JS_GetArrayBufferDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetArrayBufferData(obj: *mut JSObject, arg1: &AutoCheckCannotGC)
-> *mut u8;
#[link_name =
"_Z19JS_GetInt8ArrayDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetInt8ArrayData(obj: *mut JSObject, arg1: &AutoCheckCannotGC)
-> *mut i8;
#[link_name =
"_Z20JS_GetUint8ArrayDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetUint8ArrayData(obj: *mut JSObject, arg1: &AutoCheckCannotGC)
-> *mut u8;
#[link_name =
"_Z27JS_GetUint8ClampedArrayDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetUint8ClampedArrayData(obj: *mut JSObject,
arg1: &AutoCheckCannotGC) -> *mut u8;
#[link_name =
"_Z20JS_GetInt16ArrayDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetInt16ArrayData(obj: *mut JSObject, arg1: &AutoCheckCannotGC)
-> *mut i16;
#[link_name =
"_Z21JS_GetUint16ArrayDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetUint16ArrayData(obj: *mut JSObject, arg1: &AutoCheckCannotGC)
-> *mut u16;
#[link_name =
"_Z20JS_GetInt32ArrayDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetInt32ArrayData(obj: *mut JSObject, arg1: &AutoCheckCannotGC)
-> *mut i32;
#[link_name =
"_Z21JS_GetUint32ArrayDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetUint32ArrayData(obj: *mut JSObject, arg1: &AutoCheckCannotGC)
-> *mut u32;
#[link_name =
"_Z22JS_GetFloat32ArrayDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetFloat32ArrayData(obj: *mut JSObject,
arg1: &AutoCheckCannotGC) -> *mut f32;
#[link_name =
"_Z22JS_GetFloat64ArrayDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetFloat64ArrayData(obj: *mut JSObject,
arg1: &AutoCheckCannotGC) -> *mut f64;
#[link_name =
"_Z25JS_GetArrayBufferViewDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetArrayBufferViewData(obj: *mut JSObject,
arg1: &AutoCheckCannotGC)
-> *mut ::libc::c_void;
#[link_name =
"_Z27JS_GetArrayBufferViewBufferP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn JS_GetArrayBufferViewBuffer(cx: *mut JSContext, obj: HandleObject)
-> *mut JSObject;
#[link_name =
"_Z20JS_NeuterArrayBufferP9JSContextN2JS6HandleIP8JSObjectEE21NeuterDataDisposition"]
pub fn JS_NeuterArrayBuffer(cx: *mut JSContext, obj: HandleObject,
changeData: NeuterDataDisposition) -> bool;
#[link_name = "_Z30JS_IsNeuteredArrayBufferObjectP8JSObject"]
pub fn JS_IsNeuteredArrayBufferObject(obj: *mut JSObject) -> bool;
#[link_name = "_Z19JS_IsDataViewObjectP8JSObject"]
pub fn JS_IsDataViewObject(obj: *mut JSObject) -> bool;
#[link_name = "_Z24JS_GetDataViewByteOffsetP8JSObject"]
pub fn JS_GetDataViewByteOffset(obj: *mut JSObject) -> u32;
#[link_name = "_Z24JS_GetDataViewByteLengthP8JSObject"]
pub fn JS_GetDataViewByteLength(obj: *mut JSObject) -> u32;
#[link_name =
"_Z18JS_GetDataViewDataP8JSObjectRKN2JS17AutoCheckCannotGCE"]
pub fn JS_GetDataViewData(obj: *mut JSObject, arg1: &AutoCheckCannotGC)
-> *mut ::libc::c_void;
#[link_name =
"_ZN2js9WatchGutsEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEES6_"]
pub fn WatchGuts(cx: *mut JSContext, obj: HandleObject, id: HandleId,
callable: HandleObject) -> bool;
#[link_name =
"_ZN2js11UnwatchGutsEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEE"]
pub fn UnwatchGuts(cx: *mut JSContext, obj: HandleObject, id: HandleId)
-> bool;
#[link_name = "_ZN2js16DefaultJSContextEP9JSRuntime"]
pub fn DefaultJSContext(rt: *mut JSRuntime) -> *mut JSContext;
#[link_name =
"_ZN2js27SetDefaultJSContextCallbackEP9JSRuntimePFP9JSContextS1_E"]
pub fn SetDefaultJSContextCallback(rt: *mut JSRuntime,
cb: DefaultJSContextCallback);
#[link_name =
"_ZN2js25SetCTypesActivityCallbackEP9JSRuntimePFvP9JSContextNS_18CTypesActivityTypeEE"]
pub fn SetCTypesActivityCallback(rt: *mut JSRuntime,
cb: CTypesActivityCallback);
#[link_name =
"_ZN2js25SetObjectMetadataCallbackEP9JSContextPFbS1_PP8JSObjectE"]
pub fn SetObjectMetadataCallback(cx: *mut JSContext,
callback: ObjectMetadataCallback);
#[link_name =
"_ZN2js17SetObjectMetadataEP9JSContextN2JS6HandleIP8JSObjectEES6_"]
pub fn SetObjectMetadata(cx: *mut JSContext, obj: HandleObject,
metadata: HandleObject) -> bool;
#[link_name = "_ZN2js17GetObjectMetadataEP8JSObject"]
pub fn GetObjectMetadata(obj: *mut JSObject) -> *mut JSObject;
#[link_name =
"_ZN2js20GetElementsWithAdderEP9JSContextN2JS6HandleIP8JSObjectEES6_jjPNS_12ElementAdderE"]
pub fn GetElementsWithAdder(cx: *mut JSContext, obj: HandleObject,
receiver: HandleObject, begin: u32, end: u32,
adder: *mut ElementAdder) -> bool;
#[link_name =
"_ZN2js15ForwardToNativeEP9JSContextPFbS1_jPN2JS5ValueEERKNS2_8CallArgsE"]
pub fn ForwardToNative(cx: *mut JSContext, native: JSNative,
args: &CallArgs) -> bool;
#[link_name =
"_ZN2js30SetPropertyIgnoringNamedGetterEP9JSContextN2JS6HandleIP8JSObjectEENS3_I4jsidEENS2_13MutableHandleINS2_5ValueEEES6_NS9_I20JSPropertyDescriptorEERNS2_14ObjectOpResultE"]
pub fn SetPropertyIgnoringNamedGetter(cx: *mut JSContext,
obj: HandleObject, id: HandleId,
vp: MutableHandleValue,
receiver: HandleObject,
ownDesc:
MutableHandle<JSPropertyDescriptor>,
result: &mut ObjectOpResult)
-> bool;
#[link_name =
"_ZN2js17ReportErrorWithIdEP9JSContextPKcN2JS6HandleI4jsidEE"]
pub fn ReportErrorWithId(cx: *mut JSContext, msg: *const ::libc::c_char,
id: HandleId);
#[link_name =
"_ZN2js29ExecuteInGlobalAndReturnScopeEP9JSContextN2JS6HandleIP8JSObjectEENS3_IP8JSScriptEENS2_13MutableHandleIS5_EE"]
pub fn ExecuteInGlobalAndReturnScope(cx: *mut JSContext,
obj: HandleObject,
script: HandleScript,
scope: MutableHandleObject) -> bool;
#[link_name =
"_ZN2js37GetObjectEnvironmentObjectForFunctionEP10JSFunction"]
pub fn GetObjectEnvironmentObjectForFunction(fun: *mut JSFunction)
-> *mut JSObject;
#[link_name = "_ZN2js23GetSavedFramePrincipalsEN2JS6HandleIP8JSObjectEE"]
pub fn GetSavedFramePrincipals(savedFrame: HandleObject)
-> *mut JSPrincipals;
#[link_name =
"_ZN2js26GetFirstSubsumedSavedFrameEP9JSContextN2JS6HandleIP8JSObjectEE"]
pub fn GetFirstSubsumedSavedFrame(cx: *mut JSContext,
savedFrame: HandleObject)
-> *mut JSObject;
#[link_name =
"_ZN2js19ReportIsNotFunctionEP9JSContextN2JS6HandleINS2_5ValueEEE"]
pub fn ReportIsNotFunction(cx: *mut JSContext, v: HandleValue) -> bool;
#[link_name =
"_ZN2js17DefineOwnPropertyEP9JSContextP8JSObject4jsidN2JS6HandleI20JSPropertyDescriptorEERNS5_14ObjectOpResultE"]
pub fn DefineOwnProperty(cx: *mut JSContext, objArg: *mut JSObject,
idArg: jsid,
descriptor: Handle<JSPropertyDescriptor>,
result: &mut ObjectOpResult) -> bool;
#[link_name =
"_Z33JS_StoreObjectPostBarrierCallbackP9JSContextPFvP8JSTracerP8JSObjectPvES4_S5_"]
pub fn JS_StoreObjectPostBarrierCallback(cx: *mut JSContext,
callback:
::std::option::Option<unsafe extern "C" fn(trc:
*mut JSTracer,
key:
*mut JSObject,
data:
*mut ::libc::c_void)>,
key: *mut JSObject,
data: *mut ::libc::c_void);
#[link_name =
"_Z33JS_StoreStringPostBarrierCallbackP9JSContextPFvP8JSTracerP8JSStringPvES4_S5_"]
pub fn JS_StoreStringPostBarrierCallback(cx: *mut JSContext,
callback:
::std::option::Option<unsafe extern "C" fn(trc:
*mut JSTracer,
key:
*mut JSString,
data:
*mut ::libc::c_void)>,
key: *mut JSString,
data: *mut ::libc::c_void);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment