Skip to content

Instantly share code, notes, and snippets.

@michaelwu
Created September 14, 2015 19:11
Show Gist options
  • Save michaelwu/6d1e7e15dce82b72ff88 to your computer and use it in GitHub Desktop.
Save michaelwu/6d1e7e15dce82b72ff88 to your computer and use it in GitHub Desktop.
jsapi.rs (link_name)
/* automatically generated by rust-bindgen */
/**
* Helper class used as a base for various type traits, exposed publicly
* because <type_traits> exposes it as well.
*/#[repr(C)]
#[derive(Copy)]
pub struct IntegralConstant<T>;
pub type TrueType = IntegralConstant;
pub type FalseType = IntegralConstant;
#[repr(C)]
#[derive(Copy)]
pub struct IsVoidHelper<T> {
pub _base: FalseType,
}
/**
* IsVoid determines whether a type is void.
*
* mozilla::IsVoid<int>::value is false;
* mozilla::IsVoid<void>::value is true;
* mozilla::IsVoid<void*>::value is false;
* mozilla::IsVoid<volatile void>::value is true.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsVoid<T> {
pub _base: IsVoidHelper<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct IsIntegralHelper<T> {
pub _base: FalseType,
}
/**
* IsIntegral determines whether a type is an integral type.
*
* mozilla::IsIntegral<int>::value is true;
* mozilla::IsIntegral<unsigned short>::value is true;
* mozilla::IsIntegral<const long>::value is true;
* mozilla::IsIntegral<int*>::value is false;
* mozilla::IsIntegral<double>::value is false;
*
* Note that the behavior of IsIntegral on char16_t and char32_t is
* unspecified.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsIntegral<T> {
pub _base: IsIntegralHelper<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct IsFloatingPointHelper<T> {
pub _base: IntegralConstant<T>,
}
/**
* IsFloatingPoint determines whether a type is a floating point type (float,
* double, long double).
*
* mozilla::IsFloatingPoint<int>::value is false;
* mozilla::IsFloatingPoint<const float>::value is true;
* mozilla::IsFloatingPoint<long double>::value is true;
* mozilla::IsFloatingPoint<double*>::value is false.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsFloatingPoint<T> {
pub _base: IsFloatingPointHelper<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct IsArrayHelper<T> {
pub _base: FalseType,
}
/**
* IsArray determines whether a type is an array type, of known or unknown
* length.
*
* mozilla::IsArray<int>::value is false;
* mozilla::IsArray<int[]>::value is true;
* mozilla::IsArray<int[5]>::value is true.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsArray<T> {
pub _base: IsArrayHelper<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct IsPointerHelper<T> {
pub _base: FalseType,
}
/**
* IsPointer determines whether a type is a possibly-CV-qualified pointer type
* (but not a pointer-to-member type).
*
* mozilla::IsPointer<struct S*>::value is true;
* mozilla::IsPointer<int*>::value is true;
* mozilla::IsPointer<int**>::value is true;
* mozilla::IsPointer<const int*>::value is true;
* mozilla::IsPointer<int* const>::value is true;
* mozilla::IsPointer<int* volatile>::value is true;
* mozilla::IsPointer<void (*)(void)>::value is true;
* mozilla::IsPointer<int>::value is false;
* mozilla::IsPointer<struct S>::value is false.
* mozilla::IsPointer<int(struct S::*)>::value is false
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsPointer<T> {
pub _base: IsPointerHelper<T>,
}
/**
* IsLvalueReference determines whether a type is an lvalue reference.
*
* mozilla::IsLvalueReference<struct S*>::value is false;
* mozilla::IsLvalueReference<int**>::value is false;
* mozilla::IsLvalueReference<void (*)(void)>::value is false;
* mozilla::IsLvalueReference<int>::value is false;
* mozilla::IsLvalueReference<struct S>::value is false;
* mozilla::IsLvalueReference<struct S*&>::value is true;
* mozilla::IsLvalueReference<struct S&&>::value is false.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsLvalueReference<T> {
pub _base: FalseType,
}
/**
* IsRvalueReference determines whether a type is an rvalue reference.
*
* mozilla::IsRvalueReference<struct S*>::value is false;
* mozilla::IsRvalueReference<int**>::value is false;
* mozilla::IsRvalueReference<void (*)(void)>::value is false;
* mozilla::IsRvalueReference<int>::value is false;
* mozilla::IsRvalueReference<struct S>::value is false;
* mozilla::IsRvalueReference<struct S*&>::value is false;
* mozilla::IsRvalueReference<struct S&&>::value is true.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsRvalueReference<T> {
pub _base: FalseType,
}
#[repr(C)]
#[derive(Copy)]
pub struct IsEnumHelper<T> {
pub _base: IntegralConstant<T>,
}
/**
* IsEnum determines whether a type is an enum type.
*
* mozilla::IsEnum<enum S>::value is true;
* mozilla::IsEnum<enum S*>::value is false;
* mozilla::IsEnum<int>::value is false;
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsEnum<T> {
pub _base: IsEnumHelper<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct IsClassHelper<T> {
pub _base: IntegralConstant<T>,
}
/**
* IsClass determines whether a type is a class type (but not a union).
*
* struct S {};
* union U {};
* mozilla::IsClass<int>::value is false;
* mozilla::IsClass<const S>::value is true;
* mozilla::IsClass<U>::value is false;
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsClass<T> {
pub _base: IsClassHelper<T>,
}
/**
* IsReference determines whether a type is an lvalue or rvalue reference.
*
* mozilla::IsReference<struct S*>::value is false;
* mozilla::IsReference<int**>::value is false;
* mozilla::IsReference<int&>::value is true;
* mozilla::IsReference<void (*)(void)>::value is false;
* mozilla::IsReference<const int&>::value is true;
* mozilla::IsReference<int>::value is false;
* mozilla::IsReference<struct S>::value is false;
* mozilla::IsReference<struct S&>::value is true;
* mozilla::IsReference<struct S*&>::value is true;
* mozilla::IsReference<struct S&&>::value is true.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsReference<T> {
pub _base: IntegralConstant<T>,
}
/**
* IsArithmetic determines whether a type is arithmetic. A type is arithmetic
* iff it is an integral type or a floating point type.
*
* mozilla::IsArithmetic<int>::value is true;
* mozilla::IsArithmetic<double>::value is true;
* mozilla::IsArithmetic<long double*>::value is false.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsArithmetic<T> {
pub _base: IntegralConstant<T>,
}
/**
* IsConst determines whether a type is const or not.
*
* mozilla::IsConst<int>::value is false;
* mozilla::IsConst<void* const>::value is true;
* mozilla::IsConst<const char*>::value is false.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsConst<T> {
pub _base: FalseType,
}
/**
* IsVolatile determines whether a type is volatile or not.
*
* mozilla::IsVolatile<int>::value is false;
* mozilla::IsVolatile<void* volatile>::value is true;
* mozilla::IsVolatile<volatile char*>::value is false.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsVolatile<T> {
pub _base: FalseType,
}
/**
* Traits class for identifying POD types. Until C++11 there's no automatic
* way to detect PODs, so for the moment this is done manually. Users may
* define specializations of this class that inherit from mozilla::TrueType and
* mozilla::FalseType (or equivalently mozilla::IntegralConstant<bool, true or
* false>, or conveniently from mozilla::IsPod for composite types) as needed to
* ensure correct IsPod behavior.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsPod<T> {
pub _base: FalseType,
}
#[repr(C)]
#[derive(Copy)]
pub struct IsEmptyHelper<T> {
pub _base: IntegralConstant<T>,
}
/**
* IsEmpty determines whether a type is a class (but not a union) that is empty.
*
* A class is empty iff it and all its base classes have no non-static data
* members (except bit-fields of length 0) and no virtual member functions, and
* no base class is empty or a virtual base class.
*
* Intuitively, empty classes don't have any data that has to be stored in
* instances of those classes. (The size of the class must still be non-zero,
* because distinct array elements of any type must have different addresses.
* However, if the Empty Base Optimization is implemented by the compiler [most
* compilers implement it, and in certain cases C++11 requires it], the size of
* a class inheriting from an empty |Base| class need not be inflated by
* |sizeof(Base)|.) And intuitively, non-empty classes have data members and/or
* vtable pointers that must be stored in each instance for proper behavior.
*
* static_assert(!mozilla::IsEmpty<int>::value, "not a class => not empty");
* union U1 { int x; };
* static_assert(!mozilla::IsEmpty<U1>::value, "not a class => not empty");
* struct E1 {};
* struct E2 { int : 0 };
* struct E3 : E1 {};
* struct E4 : E2 {};
* static_assert(mozilla::IsEmpty<E1>::value &&
* mozilla::IsEmpty<E2>::value &&
* mozilla::IsEmpty<E3>::value &&
* mozilla::IsEmpty<E4>::value,
* "all empty");
* union U2 { E1 e1; };
* static_assert(!mozilla::IsEmpty<U2>::value, "not a class => not empty");
* struct NE1 { int x; };
* struct NE2 : virtual E1 {};
* struct NE3 : E2 { virtual ~NE3() {} };
* struct NE4 { virtual void f() {} };
* static_assert(!mozilla::IsEmpty<NE1>::value &&
* !mozilla::IsEmpty<NE2>::value &&
* !mozilla::IsEmpty<NE3>::value &&
* !mozilla::IsEmpty<NE4>::value,
* "all empty");
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsEmpty<T> {
pub _base: IsEmptyHelper<T>,
}
pub enum IsSignedHelper { }
/**
* IsSigned determines whether a type is a signed arithmetic type. |char| is
* considered a signed type if it has the same representation as |signed char|.
*
* mozilla::IsSigned<int>::value is true;
* mozilla::IsSigned<const unsigned int>::value is false;
* mozilla::IsSigned<unsigned char>::value is false;
* mozilla::IsSigned<float>::value is true.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsSigned<T> {
pub _base: IsSignedHelper,
}
pub enum IsUnsignedHelper { }
/**
* IsUnsigned determines whether a type is an unsigned arithmetic type.
*
* mozilla::IsUnsigned<int>::value is false;
* mozilla::IsUnsigned<const unsigned int>::value is true;
* mozilla::IsUnsigned<unsigned char>::value is true;
* mozilla::IsUnsigned<float>::value is false.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsUnsigned<T> {
pub _base: IsUnsignedHelper,
}
/**
* IsSame tests whether two types are the same type.
*
* mozilla::IsSame<int, int>::value is true;
* mozilla::IsSame<int*, int*>::value is true;
* mozilla::IsSame<int, unsigned int>::value is false;
* mozilla::IsSame<void, void>::value is true;
* mozilla::IsSame<const int, int>::value is false;
* mozilla::IsSame<struct S, struct S>::value is true.
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsSame<T, U> {
pub _base: FalseType,
}
#[repr(C)]
#[derive(Copy)]
pub struct BaseOfTester<Base, Derived> {
pub _base: IntegralConstant<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct IsBaseOf<Base, Derived> {
pub _base: IntegralConstant<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct ConvertibleTester<From, To>;
/**
* IsConvertible determines whether a value of type From will implicitly convert
* to a value of type To. For example:
*
* struct A {};
* struct B : public A {};
* struct C {};
*
* mozilla::IsConvertible<A, A>::value is true;
* mozilla::IsConvertible<A*, A*>::value is true;
* mozilla::IsConvertible<B, A>::value is true;
* mozilla::IsConvertible<B*, A*>::value is true;
* mozilla::IsConvertible<C, A>::value is false;
* mozilla::IsConvertible<A, C>::value is false;
* mozilla::IsConvertible<A*, C*>::value is false;
* mozilla::IsConvertible<C*, A*>::value is false.
*
* For obscure reasons, you can't use IsConvertible when the types being tested
* are related through private inheritance, and you'll get a compile error if
* you try. Just don't do it!
*/
#[repr(C)]
#[derive(Copy)]
pub struct IsConvertible<From, To> {
pub _base: IntegralConstant<T>,
}
/**
* RemoveConst removes top-level const qualifications on a type.
*
* mozilla::RemoveConst<int>::Type is int;
* mozilla::RemoveConst<const int>::Type is int;
* mozilla::RemoveConst<const int*>::Type is const int*;
* mozilla::RemoveConst<int* const>::Type is int*.
*/
#[repr(C)]
#[derive(Copy)]
pub struct RemoveConst<T>;
/**
* RemoveVolatile removes top-level volatile qualifications on a type.
*
* mozilla::RemoveVolatile<int>::Type is int;
* mozilla::RemoveVolatile<volatile int>::Type is int;
* mozilla::RemoveVolatile<volatile int*>::Type is volatile int*;
* mozilla::RemoveVolatile<int* volatile>::Type is int*.
*/
#[repr(C)]
#[derive(Copy)]
pub struct RemoveVolatile<T>;
/**
* RemoveCV removes top-level const and volatile qualifications on a type.
*
* mozilla::RemoveCV<int>::Type is int;
* mozilla::RemoveCV<const int>::Type is int;
* mozilla::RemoveCV<volatile int>::Type is int;
* mozilla::RemoveCV<int* const volatile>::Type is int*.
*/
#[repr(C)]
#[derive(Copy)]
pub struct RemoveCV<T>;
/**
* Converts reference types to the underlying types.
*
* mozilla::RemoveReference<T>::Type is T;
* mozilla::RemoveReference<T&>::Type is T;
* mozilla::RemoveReference<T&&>::Type is T;
*/
#[repr(C)]
#[derive(Copy)]
pub struct RemoveReference<T>;
#[repr(i32)]
#[derive(Copy)]
pub enum Voidness { TIsVoid = 0, TIsNotVoid = 1, }
pub enum AddLvalueReferenceHelper { }
/**
* AddLvalueReference adds an lvalue & reference to T if one isn't already
* present. (Note: adding an lvalue reference to an rvalue && reference in
* essence replaces the && with a &&, per C+11 reference collapsing rules. For
* example, int&& would become int&.)
*
* The final computed type will only *not* be an lvalue reference if T is void.
*
* mozilla::AddLvalueReference<int>::Type is int&;
* mozilla::AddLvalueRference<volatile int&>::Type is volatile int&;
* mozilla::AddLvalueReference<void*>::Type is void*&;
* mozilla::AddLvalueReference<void>::Type is void;
* mozilla::AddLvalueReference<struct S&&>::Type is struct S&.
*/
#[repr(C)]
#[derive(Copy)]
pub struct AddLvalueReference<T> {
pub _base: AddLvalueReferenceHelper,
}
#[repr(C)]
#[derive(Copy)]
pub struct WithC<T> {
pub _base: Conditional<A, B>,
}
#[repr(C)]
#[derive(Copy)]
pub struct WithV<T> {
pub _base: Conditional<A, B>,
}
#[repr(C)]
#[derive(Copy)]
pub struct WithCV<T> {
pub _base: WithC<T>,
}
pub enum CorrespondingSigned { }
#[repr(C)]
#[derive(Copy)]
pub struct CorrespondingSigned;
impl ::std::clone::Clone for CorrespondingSigned {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CorrespondingSigned {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub enum MakeSigned { }
/**
* MakeSigned produces the corresponding signed integer type for a given
* integral type T, with the const/volatile qualifiers of T. T must be a
* possibly-const/volatile-qualified integral type that isn't bool.
*
* If T is already a signed integer type (not including char!), then T is
* produced.
*
* Otherwise, if T is an unsigned integer type, the signed variety of T, with
* T's const/volatile qualifiers, is produced.
*
* Otherwise, the integral type of the same size as T, with the lowest rank,
* with T's const/volatile qualifiers, is produced. (This basically only acts
* to produce signed char when T = char.)
*
* mozilla::MakeSigned<unsigned long>::Type is signed long;
* mozilla::MakeSigned<volatile int>::Type is volatile int;
* mozilla::MakeSigned<const unsigned short>::Type is const signed short;
* mozilla::MakeSigned<const char>::Type is const signed char;
* mozilla::MakeSigned<bool> is an error;
* mozilla::MakeSigned<void*> is an error.
*/
#[repr(C)]
#[derive(Copy)]
pub struct MakeSigned<T> {
pub _base: EnableIf<IsIntegral<T>::value && !IsSame<bool, typename RemoveCV<T>::Type>::value, typename detail::MakeSigned<T> >::Type,
}
pub enum CorrespondingUnsigned { }
#[repr(C)]
#[derive(Copy)]
pub struct CorrespondingUnsigned;
impl ::std::clone::Clone for CorrespondingUnsigned {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CorrespondingUnsigned {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub enum MakeUnsigned { }
/**
* MakeUnsigned produces the corresponding unsigned integer type for a given
* integral type T, with the const/volatile qualifiers of T. T must be a
* possibly-const/volatile-qualified integral type that isn't bool.
*
* If T is already an unsigned integer type (not including char!), then T is
* produced.
*
* Otherwise, if T is an signed integer type, the unsigned variety of T, with
* T's const/volatile qualifiers, is produced.
*
* Otherwise, the unsigned integral type of the same size as T, with the lowest
* rank, with T's const/volatile qualifiers, is produced. (This basically only
* acts to produce unsigned char when T = char.)
*
* mozilla::MakeUnsigned<signed long>::Type is unsigned long;
* mozilla::MakeUnsigned<volatile unsigned int>::Type is volatile unsigned int;
* mozilla::MakeUnsigned<const signed short>::Type is const unsigned short;
* mozilla::MakeUnsigned<const char>::Type is const unsigned char;
* mozilla::MakeUnsigned<bool> is an error;
* mozilla::MakeUnsigned<void*> is an error.
*/
#[repr(C)]
#[derive(Copy)]
pub struct MakeUnsigned<T> {
pub _base: EnableIf<IsIntegral<T>::value && !IsSame<bool, typename RemoveCV<T>::Type>::value, typename detail::MakeUnsigned<T> >::Type,
}
/**
* RemoveExtent produces either the type of the elements of the array T, or T
* itself.
*
* mozilla::RemoveExtent<int>::Type is int;
* mozilla::RemoveExtent<const int[]>::Type is const int;
* mozilla::RemoveExtent<volatile int[5]>::Type is volatile int;
* mozilla::RemoveExtent<long[][17]>::Type is long[17].
*/
#[repr(C)]
#[derive(Copy)]
pub struct RemoveExtent<T>;
#[repr(C)]
#[derive(Copy)]
pub struct RemovePointerHelper<T, CVRemoved>;
/**
* Produces the pointed-to type if a pointer is provided, else returns the input
* type. Note that this does not dereference pointer-to-member pointers.
*
* struct S { bool m; void f(); };
* mozilla::RemovePointer<int>::Type is int;
* mozilla::RemovePointer<int*>::Type is int;
* mozilla::RemovePointer<int* const>::Type is int;
* mozilla::RemovePointer<int* volatile>::Type is int;
* mozilla::RemovePointer<const long*>::Type is const long;
* mozilla::RemovePointer<void* const>::Type is void;
* mozilla::RemovePointer<void (S::*)()>::Type is void (S::*)();
* mozilla::RemovePointer<void (*)()>::Type is void();
* mozilla::RemovePointer<bool S::*>::Type is bool S::*.
*/
#[repr(C)]
#[derive(Copy)]
pub struct RemovePointer<T> {
pub _base: RemovePointerHelper<T, CVRemoved>,
}
/**
* EnableIf is a struct containing a typedef of T if and only if B is true.
*
* mozilla::EnableIf<true, int>::Type is int;
* mozilla::EnableIf<false, int>::Type is a compile-time error.
*
* Use this template to implement SFINAE-style (Substitution Failure Is not An
* Error) requirements. For example, you might use it to impose a restriction
* on a template parameter:
*
* template<typename T>
* class PodVector // vector optimized to store POD (memcpy-able) types
* {
* EnableIf<IsPod<T>::value, T>::Type* vector;
* size_t length;
* ...
* };
*/
#[repr(C)]
#[derive(Copy)]
pub struct EnableIf<T>;
/**
* Conditional selects a class between two, depending on a given boolean value.
*
* mozilla::Conditional<true, A, B>::Type is A;
* mozilla::Conditional<false, A, B>::Type is B;
*/
#[repr(C)]
#[derive(Copy)]
pub struct Conditional<A, B>;
#[repr(C)]
#[derive(Copy)]
pub struct IsFunction<T>;
#[repr(C)]
#[derive(Copy)]
pub struct AssertionConditionType<T>;
#[repr(i32)]
#[derive(Copy)]
pub enum ToSignedness { ToIsSigned = 0, ToIsUnsigned = 1, }
#[repr(i32)]
#[derive(Copy)]
pub enum FromSignedness { FromIsSigned = 0, FromIsUnsigned = 1, }
pub enum BoundsCheckImpl { }
#[repr(i32)]
#[derive(Copy)]
pub enum UUComparison { FromIsBigger = 0, FromIsNotBigger = 1, }
pub enum UnsignedUnsignedCheck { }
#[repr(i32)]
#[derive(Copy)]
pub enum USComparison { FromIsSmaller = 0, FromIsNotSmaller = 1, }
pub enum UnsignedSignedCheck { }
pub enum BoundsChecker { }
pub type MallocSizeOf =
::std::option::Option<unsafe extern "C" fn(p: *const ::libc::c_void)
-> size_t>;
pub type MozMallocSizeOf =
::std::option::Option<unsafe extern "C" fn(p: *const ::libc::c_void)
-> size_t>;
#[repr(i32)]
#[derive(Copy)]
pub enum StorageType { AsBase = 0, AsMember = 1, }
pub enum PairHelper { }
/**
* Pair is the logical concatenation of an instance of A with an instance B.
* Space is conserved when possible. Neither A nor B may be a final class.
*
* It's typically clearer to have individual A and B member fields. Except if
* you want the space-conserving qualities of Pair, you're probably better off
* not using this!
*
* No guarantees are provided about the memory layout of A and B, the order of
* initialization or destruction of A and B, and so on. (This is approximately
* required to optimize space usage.) The first/second names are merely
* conceptual!
*/
#[repr(C)]
#[derive(Copy)]
pub struct Pair<A, B> {
pub _base: PairHelper,
}
/**
* UniquePtr is a smart pointer that wholly owns a resource. Ownership may be
* transferred out of a UniquePtr through explicit action, but otherwise the
* resource is destroyed when the UniquePtr is destroyed.
*
* UniquePtr is similar to C++98's std::auto_ptr, but it improves upon auto_ptr
* in one crucial way: it's impossible to copy a UniquePtr. Copying an auto_ptr
* obviously *can't* copy ownership of its singly-owned resource. So what
* happens if you try to copy one? Bizarrely, ownership is implicitly
* *transferred*, preserving single ownership but breaking code that assumes a
* copy of an object is identical to the original. (This is why auto_ptr is
* prohibited in STL containers.)
*
* UniquePtr solves this problem by being *movable* rather than copyable.
* Instead of passing a |UniquePtr u| directly to the constructor or assignment
* operator, you pass |Move(u)|. In doing so you indicate that you're *moving*
* ownership out of |u|, into the target of the construction/assignment. After
* the transfer completes, |u| contains |nullptr| and may be safely destroyed.
* This preserves single ownership but also allows UniquePtr to be moved by
* algorithms that have been made move-safe. (Note: if |u| is instead a
* temporary expression, don't use |Move()|: just pass the expression, because
* it's already move-ready. For more information see Move.h.)
*
* UniquePtr is also better than std::auto_ptr in that the deletion operation is
* customizable. An optional second template parameter specifies a class that
* (through its operator()(T*)) implements the desired deletion policy. If no
* policy is specified, mozilla::DefaultDelete<T> is used -- which will either
* |delete| or |delete[]| the resource, depending whether the resource is an
* array. Custom deletion policies ideally should be empty classes (no member
* fields, no member fields in base classes, no virtual methods/inheritance),
* because then UniquePtr can be just as efficient as a raw pointer.
*
* Use of UniquePtr proceeds like so:
*
* UniquePtr<int> g1; // initializes to nullptr
* g1.reset(new int); // switch resources using reset()
* g1 = nullptr; // clears g1, deletes the int
*
* UniquePtr<int> g2(new int); // owns that int
* int* p = g2.release(); // g2 leaks its int -- still requires deletion
* delete p; // now freed
*
* struct S { int x; S(int x) : x(x) {} };
* UniquePtr<S> g3, g4(new S(5));
* g3 = Move(g4); // g3 owns the S, g4 cleared
* S* p = g3.get(); // g3 still owns |p|
* assert(g3->x == 5); // operator-> works (if .get() != nullptr)
* assert((*g3).x == 5); // also operator* (again, if not cleared)
* Swap(g3, g4); // g4 now owns the S, g3 cleared
* g3.swap(g4); // g3 now owns the S, g4 cleared
* UniquePtr<S> g5(Move(g3)); // g5 owns the S, g3 cleared
* g5.reset(); // deletes the S, g5 cleared
*
* struct FreePolicy { void operator()(void* p) { free(p); } };
* UniquePtr<int, FreePolicy> g6(static_cast<int*>(malloc(sizeof(int))));
* int* ptr = g6.get();
* g6 = nullptr; // calls free(ptr)
*
* Now, carefully note a few things you *can't* do:
*
* UniquePtr<int> b1;
* b1 = new int; // BAD: can only assign another UniquePtr
* int* ptr = b1; // BAD: no auto-conversion to pointer, use get()
*
* UniquePtr<int> b2(b1); // BAD: can't copy a UniquePtr
* UniquePtr<int> b3 = b1; // BAD: can't copy-assign a UniquePtr
*
* (Note that changing a UniquePtr to store a direct |new| expression is
* permitted, but usually you should use MakeUnique, defined at the end of this
* header.)
*
* A few miscellaneous notes:
*
* UniquePtr, when not instantiated for an array type, can be move-constructed
* and move-assigned, not only from itself but from "derived" UniquePtr<U, E>
* instantiations where U converts to T and E converts to D. If you want to use
* this, you're going to have to specify a deletion policy for both UniquePtr
* instantations, and T pretty much has to have a virtual destructor. In other
* words, this doesn't work:
*
* struct Base { virtual ~Base() {} };
* struct Derived : Base {};
*
* UniquePtr<Base> b1;
* // BAD: DefaultDelete<Base> and DefaultDelete<Derived> don't interconvert
* UniquePtr<Derived> d1(Move(b));
*
* UniquePtr<Base> b2;
* UniquePtr<Derived, DefaultDelete<Base>> d2(Move(b2)); // okay
*
* UniquePtr is specialized for array types. Specializing with an array type
* creates a smart-pointer version of that array -- not a pointer to such an
* array.
*
* UniquePtr<int[]> arr(new int[5]);
* arr[0] = 4;
*
* What else is different? Deletion of course uses |delete[]|. An operator[]
* is provided. Functionality that doesn't make sense for arrays is removed.
* The constructors and mutating methods only accept array pointers (not T*, U*
* that converts to T*, or UniquePtr<U[]> or UniquePtr<U>) or |nullptr|.
*
* It's perfectly okay to return a UniquePtr from a method to assure the related
* resource is properly deleted. You'll need to use |Move()| when returning a
* local UniquePtr. Otherwise you can return |nullptr|, or you can return
* |UniquePtr(ptr)|.
*
* UniquePtr will commonly be a member of a class, with lifetime equivalent to
* that of that class. If you want to expose the related resource, you could
* expose a raw pointer via |get()|, but ownership of a raw pointer is
* inherently unclear. So it's better to expose a |const UniquePtr&| instead.
* This prohibits mutation but still allows use of |get()| when needed (but
* operator-> is preferred). Of course, you can only use this smart pointer as
* long as the enclosing class instance remains live -- no different than if you
* exposed the |get()| raw pointer.
*
* To pass a UniquePtr-managed resource as a pointer, use a |const UniquePtr&|
* argument. To specify an inout parameter (where the method may or may not
* take ownership of the resource, or reset it), or to specify an out parameter
* (where simply returning a |UniquePtr| isn't possible), use a |UniquePtr&|
* argument. To unconditionally transfer ownership of a UniquePtr
* into a method, use a |UniquePtr| argument. To conditionally transfer
* ownership of a resource into a method, should the method want it, use a
* |UniquePtr&&| argument.
*/
#[repr(C)]
#[derive(Copy)]
pub struct UniquePtr<T, D> {
pub mTuple: Pair<A, B>,
}
/** A default deletion policy using plain old operator delete. */
#[repr(C)]
#[derive(Copy)]
pub struct DefaultDelete<T>;
#[repr(C)]
#[derive(Copy)]
pub struct UniqueSelector<T>;
#[repr(C)]
#[derive(Copy)]
pub struct AllowDeprecatedAbsFixed<T> {
pub _base: FalseType,
}
#[repr(C)]
#[derive(Copy)]
pub struct AllowDeprecatedAbs<T> {
pub _base: AllowDeprecatedAbsFixed<T>,
}
pub enum AbsReturnTypeFixed { }
#[repr(C)]
#[derive(Copy)]
pub struct AbsReturnTypeFixed;
impl ::std::clone::Clone for AbsReturnTypeFixed {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AbsReturnTypeFixed {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AbsReturnType<T> {
pub _base: AbsReturnTypeFixed,
}
pub enum CeilingLog2 { }
pub enum FloorLog2 { }
#[repr(C)]
#[derive(Copy)]
pub struct FloatTypeTraits;
impl ::std::clone::Clone for FloatTypeTraits {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for FloatTypeTraits {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct DoubleTypeTraits;
impl ::std::clone::Clone for DoubleTypeTraits {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for DoubleTypeTraits {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub enum SelectTrait { }
#[repr(C)]
#[derive(Copy)]
pub struct SelectTrait {
pub _base: FloatTypeTraits,
}
impl ::std::clone::Clone for SelectTrait {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for SelectTrait {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct FloatingPoint<T> {
pub _base: SelectTrait,
}
pub enum FuzzyEqualsEpsilon { }
#[repr(C)]
#[derive(Copy)]
pub struct FuzzyEqualsEpsilon;
impl ::std::clone::Clone for FuzzyEqualsEpsilon {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for FuzzyEqualsEpsilon {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN7mozilla6detail18FuzzyEqualsEpsilonIfE5valueEv() -> f32;
}
impl FuzzyEqualsEpsilon {
#[inline]
pub unsafe extern "C" fn value() -> f32 {
_ZN7mozilla6detail18FuzzyEqualsEpsilonIfE5valueEv()
}
}
#[repr(C)]
#[derive(Copy)]
pub struct AlignmentFinder<T>;
#[repr(C)]
#[derive(Copy)]
pub struct Aligner {
pub mChar: ::libc::c_char,
pub mT: T,
}
impl ::std::clone::Clone for Aligner {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Aligner {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub enum AlignedElem { }
#[repr(C)]
#[derive(Copy)]
pub struct AlignedElem {
pub elem: u8,
}
impl ::std::clone::Clone for AlignedElem {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AlignedElem {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AlignedStorage {
pub u: U,
}
impl ::std::clone::Clone for AlignedStorage {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AlignedStorage {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct U {
pub _bindgen_data_: [u8; 0usize],
}
impl U {
pub unsafe fn mBytes(&mut self) -> *mut *mut ::libc::c_char {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn mDummy(&mut self) -> *mut u64 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::clone::Clone for U {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for U {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK7mozilla14AlignedStorage4addrEv(this: *mut AlignedStorage)
-> *const ::libc::c_void;
fn _ZN7mozilla14AlignedStorage4addrEv(this: *mut AlignedStorage)
-> *mut ::libc::c_void;
}
impl AlignedStorage {
#[inline]
pub unsafe extern "C" fn addr(&mut self) -> *const ::libc::c_void {
_ZNK7mozilla14AlignedStorage4addrEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn addr1(&mut self) -> *mut ::libc::c_void {
_ZN7mozilla14AlignedStorage4addrEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct AlignedStorage2<T> {
pub u: U,
}
#[repr(C)]
#[derive(Copy)]
pub struct U {
pub _bindgen_data_: [u8; 0usize],
}
impl U {
pub unsafe fn mBytes(&mut self) -> *mut *mut ::libc::c_char {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn mDummy(&mut self) -> *mut u64 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::clone::Clone for U {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for U {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct Array<T> {
pub mArr: *mut T,
}
#[repr(C)]
#[derive(Copy)]
pub struct AlignedChecker<AlignType, Pointee>;
#[repr(C)]
#[derive(Copy)]
pub struct RangedPtr<T> {
pub mPtr: *mut T,
}
#[repr(C)]
#[derive(Copy)]
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 enum Handle { }
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 enum MutableHandle { }
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 enum Rooted { }
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 enum PersistentRooted { }
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)]
pub struct Scoped<Traits> {
pub mValue: Resource,
}
#[repr(C)]
#[derive(Copy)]
pub struct ScopedFreePtrTraits<T>;
#[repr(C)]
#[derive(Copy)]
pub struct ScopedFreePtr<Type> {
pub _base: Scoped<Traits>,
}
#[repr(C)]
#[derive(Copy)]
pub struct ScopedDeletePtrTraits<T> {
pub _base: ScopedFreePtrTraits<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct ScopedDeletePtr<Type> {
pub _base: Scoped<Traits>,
}
#[repr(C)]
#[derive(Copy)]
pub struct TypeSpecificScopedPointerTraits<T>;
#[repr(C)]
#[derive(Copy)]
pub struct TypeSpecificScopedPointer<Type> {
pub _base: Scoped<Traits>,
}
/** Compute min/max. */
#[repr(C)]
#[derive(Copy)]
pub struct Min;
impl ::std::clone::Clone for Min {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Min {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct Max;
impl ::std::clone::Clone for Max {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Max {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
/** Compute floor(log2(i)). */
#[repr(C)]
#[derive(Copy)]
pub struct FloorLog2;
impl ::std::clone::Clone for FloorLog2 {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for FloorLog2 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
/** Compute ceiling(log2(i)). */
#[repr(C)]
#[derive(Copy)]
pub struct CeilingLog2;
impl ::std::clone::Clone for CeilingLog2 {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CeilingLog2 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
/** Round up to the nearest power of 2. */
#[repr(C)]
#[derive(Copy)]
pub struct RoundUpPow2;
impl ::std::clone::Clone for RoundUpPow2 {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for RoundUpPow2 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
/** Compute the number of bits in the given unsigned type. */
#[repr(C)]
#[derive(Copy)]
pub struct BitSize<T>;
/**
* Produce an N-bit mask, where N <= BitSize<size_t>::value. Handle the
* language-undefined edge case when N = BitSize<size_t>::value.
*/
#[repr(C)]
#[derive(Copy)]
pub struct NBitMask;
impl ::std::clone::Clone for NBitMask {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for NBitMask {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
/**
* For the unsigned integral type size_t, compute a mask M for N such that
* for all X, !(X & M) implies X * N will not overflow (w.r.t size_t)
*/
#[repr(C)]
#[derive(Copy)]
pub struct MulOverflowMask;
impl ::std::clone::Clone for MulOverflowMask {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for MulOverflowMask {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct ScopedJSFreePtr<Type> {
pub _base: Scoped<Traits>,
}
#[repr(C)]
#[derive(Copy)]
pub struct ScopedJSDeletePtr<Type> {
pub _base: Scoped<Traits>,
}
#[repr(C)]
#[derive(Copy)]
pub struct ScopedReleasePtrTraits<T> {
pub _base: ScopedFreePtrTraits<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct ScopedReleasePtr<Type> {
pub _base: Scoped<Traits>,
}
#[repr(C)]
#[derive(Copy)]
pub struct DeletePolicy<T>;
#[repr(C)]
#[derive(Copy)]
pub struct FreePolicy;
impl ::std::clone::Clone for FreePolicy {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for FreePolicy {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type HashNumber = u32;
pub type UniqueChars = UniquePtr<::libc::c_char, FreePolicy>;
#[repr(C)]
#[derive(Copy)]
pub struct SystemAllocPolicy;
impl ::std::clone::Clone for SystemAllocPolicy {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for SystemAllocPolicy {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2js17SystemAllocPolicy5free_EPv(this: *mut SystemAllocPolicy,
p: *mut ::libc::c_void);
fn _ZNK2js17SystemAllocPolicy19reportAllocOverflowEv(this:
*mut SystemAllocPolicy);
}
impl SystemAllocPolicy {
#[inline]
pub unsafe extern "C" fn free_(&mut self, p: *mut ::libc::c_void) {
_ZN2js17SystemAllocPolicy5free_EPv(&mut *self, p)
}
#[inline]
pub unsafe extern "C" fn reportAllocOverflow(&mut self) {
_ZNK2js17SystemAllocPolicy19reportAllocOverflowEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct TempAllocPolicy {
pub cx_: *mut ContextFriendFields,
}
impl ::std::clone::Clone for TempAllocPolicy {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for TempAllocPolicy {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2js15TempAllocPolicy13onOutOfMemoryEPvj(this: *mut TempAllocPolicy,
p: *mut ::libc::c_void,
nbytes: size_t)
-> *mut ::libc::c_void;
fn _ZN2js15TempAllocPolicy5free_EPv(this: *mut TempAllocPolicy,
p: *mut ::libc::c_void);
fn _ZNK2js15TempAllocPolicy19reportAllocOverflowEv(this:
*mut TempAllocPolicy);
}
impl TempAllocPolicy {
#[inline]
pub unsafe extern "C" fn onOutOfMemory(&mut self, p: *mut ::libc::c_void,
nbytes: size_t)
-> *mut ::libc::c_void {
_ZN2js15TempAllocPolicy13onOutOfMemoryEPvj(&mut *self, p, nbytes)
}
#[inline]
pub unsafe extern "C" fn free_(&mut self, p: *mut ::libc::c_void) {
_ZN2js15TempAllocPolicy5free_EPv(&mut *self, p)
}
#[inline]
pub unsafe extern "C" fn reportAllocOverflow(&mut self) {
_ZNK2js15TempAllocPolicy19reportAllocOverflowEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct LinkedListElement<T> {
pub mNext: *mut LinkedListElement,
pub mPrev: *mut LinkedListElement,
pub mIsSentinel: bool,
}
#[repr(i32)]
#[derive(Copy)]
pub enum LinkedListElement_NodeKind {
NODE_KIND_NORMAL = 0,
NODE_KIND_SENTINEL = 0,
}
#[repr(C)]
#[derive(Copy)]
pub struct LinkedList<T> {
pub sentinel: LinkedListElement<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoCleanLinkedList<T> {
pub _base: LinkedList<T>,
}
pub enum Zone { }
#[repr(i32)]
#[derive(Copy)]
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,
JSVERSION_LATEST = 185,
}
#[repr(i32)]
#[derive(Copy)]
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)]
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;
pub enum JSConstScalarSpec { }
pub type JSConstIntegerSpec = JSConstScalarSpec;
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)]
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::clone::Clone for Runtime {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Runtime {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2JS6shadow7Runtime23needsIncrementalBarrierEv(this: *mut Runtime)
-> bool;
fn _ZN2JS6shadow7Runtime16gcStoreBufferPtrEv(this: *mut Runtime)
-> *mut StoreBuffer;
fn _ZN2JS6shadow7Runtime15asShadowRuntimeEP9JSRuntime(rt: *mut JSRuntime)
-> *mut Runtime;
fn _ZN2JS6shadow7Runtime19setGCStoreBufferPtrEPN2js2gc11StoreBufferE(this:
*mut Runtime,
storeBuffer:
*mut StoreBuffer);
}
impl Runtime {
#[inline]
pub unsafe extern "C" fn needsIncrementalBarrier(&mut self) -> bool {
_ZNK2JS6shadow7Runtime23needsIncrementalBarrierEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn gcStoreBufferPtr(&mut self) -> *mut StoreBuffer {
_ZN2JS6shadow7Runtime16gcStoreBufferPtrEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn asShadowRuntime(rt: *mut JSRuntime)
-> *mut Runtime {
_ZN2JS6shadow7Runtime15asShadowRuntimeEP9JSRuntime(rt)
}
#[inline]
pub unsafe extern "C" fn setGCStoreBufferPtr(&mut self,
storeBuffer:
*mut StoreBuffer) {
_ZN2JS6shadow7Runtime19setGCStoreBufferPtrEPN2js2gc11StoreBufferE(&mut *self,
storeBuffer)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoGCRooter {
pub down: *mut AutoGCRooter,
pub tag_: ptrdiff_t,
pub stackTop: *mut *mut AutoGCRooter,
}
impl ::std::clone::Clone for AutoGCRooter {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoGCRooter {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy)]
pub enum AutoGCRooter_ {
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)]
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)]
pub enum StackKind {
StackForSystemCode = 0,
StackForTrustedScript = 1,
StackForUntrustedScript = 2,
StackKindCount = 3,
}
#[repr(C)]
#[derive(Copy)]
pub struct SpecificRootKind<T>;
#[repr(C)]
#[derive(Copy)]
pub struct RootKind {
pub _base: SpecificRootKind,
}
impl ::std::clone::Clone for RootKind {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for RootKind {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for ContextFriendFields {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ContextFriendFields {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2js19ContextFriendFields3getEPK9JSContext(cx: *const JSContext)
-> *const ContextFriendFields;
fn _ZN2js19ContextFriendFields3getEP9JSContext(cx: *mut JSContext)
-> *mut ContextFriendFields;
fn _ZN2js19ContextFriendFields16checkNoGCRootersEv(this:
*mut ContextFriendFields);
}
impl ContextFriendFields {
#[inline]
pub unsafe extern "C" fn get(cx: *const JSContext)
-> *const ContextFriendFields {
_ZN2js19ContextFriendFields3getEPK9JSContext(cx)
}
#[inline]
pub unsafe extern "C" fn get1(cx: *mut JSContext)
-> *mut ContextFriendFields {
_ZN2js19ContextFriendFields3getEP9JSContext(cx)
}
#[inline]
pub unsafe extern "C" fn checkNoGCRooters(&mut self) {
_ZN2js19ContextFriendFields16checkNoGCRootersEv(&mut *self)
}
}
pub enum PerThreadData { }
#[repr(C)]
#[derive(Copy)]
pub struct PerThreadDataFriendFields {
pub thingGCRooters: [*mut Rooted<*mut ::libc::c_void>; 15usize],
pub nativeStackLimit: [uintptr_t; 3usize],
}
impl ::std::clone::Clone for PerThreadDataFriendFields {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for PerThreadDataFriendFields {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct RuntimeDummy {
pub _base: Runtime,
pub mainThread: PerThreadDummy,
}
impl ::std::clone::Clone for RuntimeDummy {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for RuntimeDummy {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct PerThreadDummy {
pub field1: *mut ::libc::c_void,
pub field2: uintptr_t,
pub field3: u64,
}
impl ::std::clone::Clone for PerThreadDummy {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for PerThreadDummy {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2js25PerThreadDataFriendFields3getEPNS_13PerThreadDataE(pt:
*mut PerThreadData)
-> *mut PerThreadDataFriendFields;
fn _ZN2js25PerThreadDataFriendFields13getMainThreadEP9JSRuntime(rt:
*mut JSRuntime)
-> *mut PerThreadDataFriendFields;
fn _ZN2js25PerThreadDataFriendFields13getMainThreadEPK9JSRuntime(rt:
*const JSRuntime)
-> *const PerThreadDataFriendFields;
}
impl PerThreadDataFriendFields {
#[inline]
pub unsafe extern "C" fn get(pt: *mut PerThreadData)
-> *mut PerThreadDataFriendFields {
_ZN2js25PerThreadDataFriendFields3getEPNS_13PerThreadDataE(pt)
}
#[inline]
pub unsafe extern "C" fn getMainThread(rt: *mut JSRuntime)
-> *mut PerThreadDataFriendFields {
_ZN2js25PerThreadDataFriendFields13getMainThreadEP9JSRuntime(rt)
}
#[inline]
pub unsafe extern "C" fn getMainThread1(rt: *const JSRuntime)
-> *const PerThreadDataFriendFields {
_ZN2js25PerThreadDataFriendFields13getMainThreadEPK9JSRuntime(rt)
}
}
/**
* DebugOnly contains a value of type T, but only in debug builds. In release
* builds, it does not contain a value. This helper is intended to be used with
* MOZ_ASSERT()-style macros, allowing one to write:
*
* DebugOnly<bool> check = func();
* MOZ_ASSERT(check);
*
* more concisely than declaring |check| conditional on #ifdef DEBUG, but also
* without allocating storage space for |check| in release builds.
*
* DebugOnly instances can only be coerced to T in debug builds. In release
* builds they don't have a value, so type coercion is not well defined.
*
* Note that DebugOnly instances still take up one byte of space, plus padding,
* when used as members of structs.
*/
#[repr(C)]
#[derive(Copy)]
pub struct DebugOnly<T>;
#[repr(C)]
#[derive(Copy)]
pub struct ReentrancyGuard;
impl ::std::clone::Clone for ReentrancyGuard {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ReentrancyGuard {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
/*****************************************************************************/
#[repr(C)]
#[derive(Copy)]
pub struct HashMap<Key, Value, HashPolicy, AllocPolicy> {
pub _impl: Impl,
}
#[repr(C)]
#[derive(Copy)]
pub struct MapHashPolicy {
pub _base: HashPolicy,
}
impl ::std::clone::Clone for MapHashPolicy {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for MapHashPolicy {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2js7HashMap13MapHashPolicy6getKeyERNS_12HashMapEntryIT_T0_EE(e:
&mut TableEntry)
-> *const Key;
fn _ZN2js7HashMap13MapHashPolicy6setKeyERNS_12HashMapEntryIT_T0_EERS3_(e:
&mut TableEntry,
k:
&mut Key);
}
impl MapHashPolicy {
#[inline]
pub unsafe extern "C" fn getKey(e: &mut TableEntry) -> *const Key {
_ZN2js7HashMap13MapHashPolicy6getKeyERNS_12HashMapEntryIT_T0_EE(e)
}
#[inline]
pub unsafe extern "C" fn setKey(e: &mut TableEntry, k: &mut Key) {
_ZN2js7HashMap13MapHashPolicy6setKeyERNS_12HashMapEntryIT_T0_EERS3_(e,
k)
}
}
/*****************************************************************************/
#[repr(C)]
#[derive(Copy)]
pub struct HashSet<T, HashPolicy, AllocPolicy> {
pub _impl: Impl,
}
#[repr(C)]
#[derive(Copy)]
pub struct SetOps {
pub _base: HashPolicy,
}
impl ::std::clone::Clone for SetOps {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for SetOps {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2js7HashSet6SetOps6getKeyERKT_(t: &T) -> *const KeyType;
fn _ZN2js7HashSet6SetOps6setKeyERT_S3_(t: &mut T, k: &mut KeyType);
}
impl SetOps {
#[inline]
pub unsafe extern "C" fn getKey(t: &T) -> *const KeyType {
_ZN2js7HashSet6SetOps6getKeyERKT_(t)
}
#[inline]
pub unsafe extern "C" fn setKey(t: &mut T, k: &mut KeyType) {
_ZN2js7HashSet6SetOps6setKeyERT_S3_(t, k)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct PointerHasher<Key>;
#[repr(C)]
#[derive(Copy)]
pub struct DefaultHasher<Key>;
#[repr(C)]
#[derive(Copy)]
pub struct HashMapEntry<Key, Value> {
pub key_: Key,
pub value_: Value,
}
#[repr(C)]
#[derive(Copy)]
pub struct HashTableEntry<T> {
pub keyHash: HashNumber,
pub mem: AlignedStorage2<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct HashTable<T, HashPolicy, AllocPolicy> {
pub _base: AllocPolicy,
pub table: *mut Entry,
pub _bitfield_1: u32,
pub entryCount: u32,
pub removedCount: u32,
pub mutationCount: u64,
pub mEntered: bool,
pub stats: Stats,
}
#[repr(C)]
#[derive(Copy)]
pub struct Stats {
pub searches: u32,
pub steps: u32,
pub hits: u32,
pub misses: u32,
pub addOverRemoved: u32,
pub removes: u32,
pub removeFrees: u32,
pub grows: u32,
pub shrinks: u32,
pub compresses: u32,
pub rehashes: u32,
}
impl ::std::clone::Clone for Stats {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Stats {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct DoubleHash {
pub h2: HashNumber,
pub sizeMask: HashNumber,
}
impl ::std::clone::Clone for DoubleHash {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for DoubleHash {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy)]
pub enum HashTable_RebuildStatus {
NotOverloaded = 0,
Rehashed = 0,
RehashFailed = 0,
}
impl HashTable {
pub fn set_gen(&mut self, val: u32) {
self._bitfield_1 &= !(((1 << 24u32) - 1) << 0usize);
self._bitfield_1 |= (val as u32) << 0usize;
}
pub fn set_hashShift(&mut self, val: u8) {
self._bitfield_1 &= !(((1 << 8u32) - 1) << 24usize);
self._bitfield_1 |= (val as u32) << 24usize;
}
pub const fn new_bitfield_1(gen: u32, hashShift: u8) -> u32 {
0 | ((gen as u32) << 0u32) | ((hashShift as u32) << 24u32)
}
}
#[repr(i32)]
#[derive(Copy)]
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,
JSTRACE_LAST = 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)]
pub enum WeakMapTraceKind {
DoNotTraceWeakMaps = 0,
TraceWeakMapValues = 1,
TraceWeakMapKeysValues = 2,
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for JSTracer {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSTracer {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN8JSTracer17setTracingDetailsEPFvPS_PcjEPKvj(this: *mut JSTracer,
printer:
JSTraceNamePrinter,
arg:
*const ::libc::c_void,
index: size_t);
fn _ZN8JSTracer15setTracingIndexEPKcj(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 _ZN8JSTracer18getTracingEdgeNameEPcj(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_PcjEPKvj(&mut *self, printer,
arg, index)
}
#[inline]
pub unsafe extern "C" fn setTracingIndex(&mut self,
name: *const ::libc::c_char,
index: size_t) {
_ZN8JSTracer15setTracingIndexEPKcj(&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 {
_ZN8JSTracer18getTracingEdgeNameEPcj(&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 type ZoneSet = HashSet<*mut Zone, DefaultHasher, SystemAllocPolicy>;
pub enum Cell { }
#[repr(C)]
#[derive(Copy)]
pub struct Zone {
pub runtime_: *mut JSRuntime,
pub barrierTracer_: *mut JSTracer,
pub needsIncrementalBarrier_: bool,
}
impl ::std::clone::Clone for Zone {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Zone {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2JS6shadow4Zone23needsIncrementalBarrierEv(this: *mut Zone)
-> bool;
fn _ZN2JS6shadow4Zone13barrierTracerEv(this: *mut Zone) -> *mut JSTracer;
fn _ZNK2JS6shadow4Zone21runtimeFromMainThreadEv(this: *mut Zone)
-> *mut JSRuntime;
fn _ZNK2JS6shadow4Zone20runtimeFromAnyThreadEv(this: *mut Zone)
-> *mut JSRuntime;
fn _ZN2JS6shadow4Zone12asShadowZoneEPNS_4ZoneE(zone: *mut Zone)
-> *mut Zone;
}
impl Zone {
#[inline]
pub unsafe extern "C" fn needsIncrementalBarrier(&mut self) -> bool {
_ZNK2JS6shadow4Zone23needsIncrementalBarrierEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn barrierTracer(&mut self) -> *mut JSTracer {
_ZN2JS6shadow4Zone13barrierTracerEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn runtimeFromMainThread(&mut self)
-> *mut JSRuntime {
_ZNK2JS6shadow4Zone21runtimeFromMainThreadEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn runtimeFromAnyThread(&mut self)
-> *mut JSRuntime {
_ZNK2JS6shadow4Zone20runtimeFromAnyThreadEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn asShadowZone(zone: *mut Zone) -> *mut Zone {
_ZN2JS6shadow4Zone12asShadowZoneEPNS_4ZoneE(zone)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct GCCellPtr {
pub ptr: uintptr_t,
}
impl ::std::clone::Clone for GCCellPtr {
fn clone(&self) -> Self { *self }
}
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)]
pub enum JSGCMode {
JSGC_MODE_GLOBAL = 0,
JSGC_MODE_COMPARTMENT = 1,
JSGC_MODE_INCREMENTAL = 2,
}
#[repr(i32)]
#[derive(Copy)]
pub enum JSGCInvocationKind { GC_NORMAL = 0, GC_SHRINK = 1, }
#[repr(i32)]
#[derive(Copy)]
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)]
pub enum GCProgress {
GC_CYCLE_BEGIN = 0,
GC_SLICE_BEGIN = 1,
GC_SLICE_END = 2,
GC_CYCLE_END = 3,
}
#[repr(C)]
#[derive(Copy)]
pub struct GCDescription {
pub isCompartment_: bool,
pub invocationKind_: JSGCInvocationKind,
}
impl ::std::clone::Clone for GCDescription {
fn clone(&self) -> Self { *self }
}
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 _ZNK2JS13GCDescription10formatJSONEP9JSRuntimey(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 {
_ZNK2JS13GCDescription10formatJSONEP9JSRuntimey(&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)]
pub struct AutoDisableGenerationalGC {
pub gc: *mut GCRuntime,
pub restartVerifier: bool,
}
impl ::std::clone::Clone for AutoDisableGenerationalGC {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoDisableGenerationalGC {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoAssertOnGC;
impl ::std::clone::Clone for AutoAssertOnGC {
fn clone(&self) -> Self { *self }
}
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)]
pub struct AutoAssertNoAlloc {
pub gc: *mut GCRuntime,
}
impl ::std::clone::Clone for AutoAssertNoAlloc {
fn clone(&self) -> Self { *self }
}
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)]
pub struct AutoSuppressGCAnalysis {
pub _base: AutoAssertNoAlloc,
}
impl ::std::clone::Clone for AutoSuppressGCAnalysis {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoSuppressGCAnalysis {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoAssertGCCallback {
pub _base: AutoSuppressGCAnalysis,
}
impl ::std::clone::Clone for AutoAssertGCCallback {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoAssertGCCallback {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoCheckCannotGC {
pub _base: AutoAssertOnGC,
}
impl ::std::clone::Clone for AutoCheckCannotGC {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoCheckCannotGC {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct GCMethods<T>;
#[repr(C)]
#[derive(Copy)]
pub struct RootedBase<T>;
#[repr(C)]
#[derive(Copy)]
pub struct HandleBase<T>;
#[repr(C)]
#[derive(Copy)]
pub struct MutableHandleBase<T>;
#[repr(C)]
#[derive(Copy)]
pub struct HeapBase<T>;
#[repr(C)]
#[derive(Copy)]
pub struct PersistentRootedBase<T>;
#[repr(C)]
#[derive(Copy)]
pub struct NullPtr;
impl ::std::clone::Clone for NullPtr {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for NullPtr {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub enum PersistentRootedMarker { }
#[repr(C)]
#[derive(Copy)]
pub struct Heap<T> {
pub _base: HeapBase<T>,
pub ptr: T,
}
#[repr(i32)]
#[derive(Copy)]
pub enum Heap_ { crashOnTouchPointer = 0, }
#[repr(C)]
#[derive(Copy)]
pub struct TenuredHeap<T> {
pub _base: HeapBase<T>,
pub bits: uintptr_t,
}
#[repr(i32)]
#[derive(Copy)]
pub enum TenuredHeap_ { maskBits = 0, flagsMask = 0, }
#[repr(C)]
#[derive(Copy)]
pub struct Handle<T> {
pub _base: HandleBase<T>,
pub ptr: *const T,
}
#[repr(i32)]
#[derive(Copy)]
pub enum Handle_Disambiguator { DeliberatelyChoosingThisOverload = 0, }
#[repr(i32)]
#[derive(Copy)]
pub enum Handle_CallerIdentity {
ImUsingThisOnlyInFromFromMarkedLocation = 0,
}
#[repr(C)]
#[derive(Copy)]
pub struct MutableHandle<T> {
pub _base: MutableHandleBase<T>,
pub ptr: *mut T,
}
#[repr(C)]
#[derive(Copy)]
pub struct InternalHandle<T>;
#[repr(C)]
#[derive(Copy)]
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)]
pub struct FakeRooted<T> {
pub _base: RootedBase<T>,
pub ptr: T,
}
#[repr(C)]
#[derive(Copy)]
pub struct FakeMutableHandle<T> {
pub _base: MutableHandleBase<T>,
pub ptr: *mut T,
}
#[repr(i32)]
#[derive(Copy)]
pub enum AllowGC { NoGC = 0, CanGC = 1, }
#[repr(C)]
#[derive(Copy)]
pub struct MaybeRooted<T>;
#[repr(C)]
#[derive(Copy)]
pub struct PersistentRooted<T> {
pub _base: PersistentRootedBase<T>,
pub _base1: LinkedListElement<T>,
pub ptr: T,
}
#[repr(C)]
#[derive(Copy)]
pub struct ObjectPtr {
pub value: Heap<*mut JSObject>,
}
impl ::std::clone::Clone for ObjectPtr {
fn clone(&self) -> Self { *self }
}
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(i32)]
#[derive(Copy)]
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)]
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(i32)]
#[derive(Copy)]
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)]
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)]
pub struct jsval_layout {
pub _bindgen_data_: [u64; 1usize],
}
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 debugView(&mut self) -> *mut Value_h_unnamed_1 {
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::clone::Clone for jsval_layout {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for jsval_layout {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct Value_h_unnamed_1 {
pub _bitfield_1: u64,
pub _bitfield_2: JSValueTag,
}
impl ::std::clone::Clone for Value_h_unnamed_1 {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Value_h_unnamed_1 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
impl Value_h_unnamed_1 {
pub fn set_payload47(&mut self, val: u32) {
self._bitfield_1 &= !(((1 << 47u32) - 1) << 0usize);
self._bitfield_1 |= (val as u64) << 0usize;
}
pub const fn new_bitfield_1(payload47: u32) -> u64 {
0 | ((payload47 as u64) << 0u32)
}
pub fn set_tag(&mut self, val: u32) {
self._bitfield_2 &= !(((1 << 17u32) - 1) << 0usize);
self._bitfield_2 |= (val as JSValueTag) << 0usize;
}
pub const fn new_bitfield_2(tag: u32) -> JSValueTag {
0 | ((tag as JSValueTag) << 0u32)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct Value_h_unnamed_2 {
pub payload: Value_h_unnamed_3,
}
impl ::std::clone::Clone for Value_h_unnamed_2 {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Value_h_unnamed_2 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct Value_h_unnamed_3 {
pub _bindgen_data_: [u32; 1usize],
}
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::clone::Clone for Value_h_unnamed_3 {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Value_h_unnamed_3 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct Value {
pub data: jsval_layout,
}
impl ::std::clone::Clone for Value {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Value {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2JS5Value7setNullEv(this: *mut Value);
fn _ZN2JS5Value12setUndefinedEv(this: *mut Value);
fn _ZN2JS5Value8setInt32Ei(this: *mut Value, i: i32);
fn _ZN2JS5Value11getInt32RefEv(this: *mut Value) -> *mut i32;
fn _ZN2JS5Value9setDoubleEd(this: *mut Value, d: f64);
fn _ZN2JS5Value6setNaNEv(this: *mut Value);
fn _ZN2JS5Value12getDoubleRefEv(this: *mut Value) -> *mut f64;
fn _ZN2JS5Value9setStringEP8JSString(this: *mut Value,
str: *mut JSString);
fn _ZN2JS5Value9setSymbolEPNS_6SymbolE(this: *mut Value,
sym: *mut Symbol);
fn _ZN2JS5Value9setObjectER8JSObject(this: *mut Value,
obj: &mut JSObject);
fn _ZN2JS5Value10setBooleanEb(this: *mut Value, b: bool);
fn _ZN2JS5Value8setMagicE10JSWhyMagic(this: *mut Value, why: JSWhyMagic);
fn _ZN2JS5Value14setMagicUint32Ej(this: *mut Value, payload: u32);
fn _ZN2JS5Value9setNumberEj(this: *mut Value, ui: u32) -> bool;
fn _ZN2JS5Value9setNumberEd(this: *mut Value, d: f64) -> bool;
fn _ZN2JS5Value15setObjectOrNullEP8JSObject(this: *mut Value,
arg: *mut JSObject);
fn _ZN2JS5Value4swapERS0_(this: *mut Value, rhs: &mut Value);
fn _ZNK2JS5Value11isUndefinedEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value6isNullEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value17isNullOrUndefinedEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value7isInt32Ev(this: *mut Value) -> bool;
fn _ZNK2JS5Value7isInt32Ei(this: *mut Value, i32: i32) -> bool;
fn _ZNK2JS5Value8isDoubleEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value8isNumberEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value8isStringEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value8isSymbolEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value8isObjectEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value11isPrimitiveEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value14isObjectOrNullEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value9isGCThingEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value9isBooleanEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value6isTrueEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value7isFalseEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value7isMagicEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value7isMagicE10JSWhyMagic(this: *mut Value, why: JSWhyMagic)
-> bool;
fn _ZNK2JS5Value10isMarkableEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value6gcKindEv(this: *mut Value) -> JSGCTraceKind;
fn _ZNK2JS5Value8whyMagicEv(this: *mut Value) -> JSWhyMagic;
fn _ZNK2JS5Value11magicUint32Ev(this: *mut Value) -> u32;
fn _ZNK2JS5Value7toInt32Ev(this: *mut Value) -> i32;
fn _ZNK2JS5Value8toDoubleEv(this: *mut Value) -> f64;
fn _ZNK2JS5Value8toNumberEv(this: *mut Value) -> f64;
fn _ZNK2JS5Value8toStringEv(this: *mut Value) -> *mut JSString;
fn _ZNK2JS5Value8toSymbolEv(this: *mut Value) -> *mut Symbol;
fn _ZNK2JS5Value8toObjectEv(this: *mut Value) -> *mut JSObject;
fn _ZNK2JS5Value14toObjectOrNullEv(this: *mut Value) -> *mut JSObject;
fn _ZNK2JS5Value9toGCThingEv(this: *mut Value) -> *mut Cell;
fn _ZNK2JS5Value11toGCCellPtrEv(this: *mut Value) -> GCCellPtr;
fn _ZNK2JS5Value9toBooleanEv(this: *mut Value) -> bool;
fn _ZNK2JS5Value18payloadAsRawUint32Ev(this: *mut Value) -> u32;
fn _ZNK2JS5Value9asRawBitsEv(this: *mut Value) -> u64;
fn _ZNK2JS5Value20extractNonDoubleTypeEv(this: *mut Value) -> JSValueType;
fn _ZN2JS5Value10setPrivateEPv(this: *mut Value,
ptr: *mut ::libc::c_void);
fn _ZNK2JS5Value9toPrivateEv(this: *mut Value) -> *mut ::libc::c_void;
fn _ZN2JS5Value16setPrivateUint32Ej(this: *mut Value, ui: u32);
fn _ZNK2JS5Value15toPrivateUint32Ev(this: *mut Value) -> u32;
fn _ZN2JS5Value14setUnmarkedPtrEPv(this: *mut Value,
ptr: *mut ::libc::c_void);
fn _ZNK2JS5Value13toUnmarkedPtrEv(this: *mut Value)
-> *mut ::libc::c_void;
fn _ZNK2JS5Value11payloadWordEv(this: *mut Value) -> *const size_t;
fn _ZNK2JS5Value14payloadUIntPtrEv(this: *mut Value) -> *const uintptr_t;
fn _ZN2JS5Value16staticAssertionsEv(this: *mut Value);
}
impl Value {
/*** Mutators ***/
#[inline]
pub unsafe extern "C" fn setNull(&mut self) {
_ZN2JS5Value7setNullEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setUndefined(&mut self) {
_ZN2JS5Value12setUndefinedEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setInt32(&mut self, i: i32) {
_ZN2JS5Value8setInt32Ei(&mut *self, i)
}
#[inline]
pub unsafe extern "C" fn getInt32Ref(&mut self) -> *mut i32 {
_ZN2JS5Value11getInt32RefEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setDouble(&mut self, d: f64) {
_ZN2JS5Value9setDoubleEd(&mut *self, d)
}
#[inline]
pub unsafe extern "C" fn setNaN(&mut self) {
_ZN2JS5Value6setNaNEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn getDoubleRef(&mut self) -> *mut f64 {
_ZN2JS5Value12getDoubleRefEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setString(&mut self, str: *mut JSString) {
_ZN2JS5Value9setStringEP8JSString(&mut *self, str)
}
#[inline]
pub unsafe extern "C" fn setSymbol(&mut self, sym: *mut Symbol) {
_ZN2JS5Value9setSymbolEPNS_6SymbolE(&mut *self, sym)
}
#[inline]
pub unsafe extern "C" fn setObject(&mut self, obj: &mut JSObject) {
_ZN2JS5Value9setObjectER8JSObject(&mut *self, obj)
}
#[inline]
pub unsafe extern "C" fn setBoolean(&mut self, b: bool) {
_ZN2JS5Value10setBooleanEb(&mut *self, b)
}
#[inline]
pub unsafe extern "C" fn setMagic(&mut self, why: JSWhyMagic) {
_ZN2JS5Value8setMagicE10JSWhyMagic(&mut *self, why)
}
#[inline]
pub unsafe extern "C" fn setMagicUint32(&mut self, payload: u32) {
_ZN2JS5Value14setMagicUint32Ej(&mut *self, payload)
}
#[inline]
pub unsafe extern "C" fn setNumber(&mut self, ui: u32) -> bool {
_ZN2JS5Value9setNumberEj(&mut *self, ui)
}
#[inline]
pub unsafe extern "C" fn setNumber1(&mut self, d: f64) -> bool {
_ZN2JS5Value9setNumberEd(&mut *self, d)
}
#[inline]
pub unsafe extern "C" fn setObjectOrNull(&mut self, arg: *mut JSObject) {
_ZN2JS5Value15setObjectOrNullEP8JSObject(&mut *self, arg)
}
#[inline]
pub unsafe extern "C" fn swap(&mut self, rhs: &mut Value) {
_ZN2JS5Value4swapERS0_(&mut *self, rhs)
}
/*** Value type queries ***/
#[inline]
pub unsafe extern "C" fn isUndefined(&mut self) -> bool {
_ZNK2JS5Value11isUndefinedEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isNull(&mut self) -> bool {
_ZNK2JS5Value6isNullEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isNullOrUndefined(&mut self) -> bool {
_ZNK2JS5Value17isNullOrUndefinedEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isInt32(&mut self) -> bool {
_ZNK2JS5Value7isInt32Ev(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isInt321(&mut self, i32: i32) -> bool {
_ZNK2JS5Value7isInt32Ei(&mut *self, i32)
}
#[inline]
pub unsafe extern "C" fn isDouble(&mut self) -> bool {
_ZNK2JS5Value8isDoubleEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isNumber(&mut self) -> bool {
_ZNK2JS5Value8isNumberEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isString(&mut self) -> bool {
_ZNK2JS5Value8isStringEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isSymbol(&mut self) -> bool {
_ZNK2JS5Value8isSymbolEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isObject(&mut self) -> bool {
_ZNK2JS5Value8isObjectEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isPrimitive(&mut self) -> bool {
_ZNK2JS5Value11isPrimitiveEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isObjectOrNull(&mut self) -> bool {
_ZNK2JS5Value14isObjectOrNullEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isGCThing(&mut self) -> bool {
_ZNK2JS5Value9isGCThingEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isBoolean(&mut self) -> bool {
_ZNK2JS5Value9isBooleanEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isTrue(&mut self) -> bool {
_ZNK2JS5Value6isTrueEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isFalse(&mut self) -> bool {
_ZNK2JS5Value7isFalseEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isMagic(&mut self) -> bool {
_ZNK2JS5Value7isMagicEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isMagic1(&mut self, why: JSWhyMagic) -> bool {
_ZNK2JS5Value7isMagicE10JSWhyMagic(&mut *self, why)
}
#[inline]
pub unsafe extern "C" fn isMarkable(&mut self) -> bool {
_ZNK2JS5Value10isMarkableEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn gcKind(&mut self) -> JSGCTraceKind {
_ZNK2JS5Value6gcKindEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn whyMagic(&mut self) -> JSWhyMagic {
_ZNK2JS5Value8whyMagicEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn magicUint32(&mut self) -> u32 {
_ZNK2JS5Value11magicUint32Ev(&mut *self)
}
/*** Extract the value's typed payload ***/
#[inline]
pub unsafe extern "C" fn toInt32(&mut self) -> i32 {
_ZNK2JS5Value7toInt32Ev(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toDouble(&mut self) -> f64 {
_ZNK2JS5Value8toDoubleEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toNumber(&mut self) -> f64 {
_ZNK2JS5Value8toNumberEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toString(&mut self) -> *mut JSString {
_ZNK2JS5Value8toStringEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toSymbol(&mut self) -> *mut Symbol {
_ZNK2JS5Value8toSymbolEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toObject(&mut self) -> *mut JSObject {
_ZNK2JS5Value8toObjectEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toObjectOrNull(&mut self) -> *mut JSObject {
_ZNK2JS5Value14toObjectOrNullEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toGCThing(&mut self) -> *mut Cell {
_ZNK2JS5Value9toGCThingEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toGCCellPtr(&mut self) -> GCCellPtr {
_ZNK2JS5Value11toGCCellPtrEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn toBoolean(&mut self) -> bool {
_ZNK2JS5Value9toBooleanEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn payloadAsRawUint32(&mut self) -> u32 {
_ZNK2JS5Value18payloadAsRawUint32Ev(&mut *self)
}
#[inline]
pub unsafe extern "C" fn asRawBits(&mut self) -> u64 {
_ZNK2JS5Value9asRawBitsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn extractNonDoubleType(&mut self) -> JSValueType {
_ZNK2JS5Value20extractNonDoubleTypeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setPrivate(&mut self, ptr: *mut ::libc::c_void) {
_ZN2JS5Value10setPrivateEPv(&mut *self, ptr)
}
#[inline]
pub unsafe extern "C" fn toPrivate(&mut self) -> *mut ::libc::c_void {
_ZNK2JS5Value9toPrivateEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setPrivateUint32(&mut self, ui: u32) {
_ZN2JS5Value16setPrivateUint32Ej(&mut *self, ui)
}
#[inline]
pub unsafe extern "C" fn toPrivateUint32(&mut self) -> u32 {
_ZNK2JS5Value15toPrivateUint32Ev(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setUnmarkedPtr(&mut self,
ptr: *mut ::libc::c_void) {
_ZN2JS5Value14setUnmarkedPtrEPv(&mut *self, ptr)
}
#[inline]
pub unsafe extern "C" fn toUnmarkedPtr(&mut self) -> *mut ::libc::c_void {
_ZNK2JS5Value13toUnmarkedPtrEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn payloadWord(&mut self) -> *const size_t {
_ZNK2JS5Value11payloadWordEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn payloadUIntPtr(&mut self) -> *const uintptr_t {
_ZNK2JS5Value14payloadUIntPtrEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn staticAssertions(&mut self) {
_ZN2JS5Value16staticAssertionsEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct MakeNumberValue;
impl ::std::clone::Clone for MakeNumberValue {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for MakeNumberValue {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct ValueOperations<Outer>;
#[repr(C)]
#[derive(Copy)]
pub struct MutableValueOperations<Outer> {
pub _base: ValueOperations<Outer>,
}
#[repr(C)]
#[derive(Copy)]
pub struct ValueAlignmentTester {
pub c: ::libc::c_char,
pub v: Value,
}
impl ::std::clone::Clone for ValueAlignmentTester {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ValueAlignmentTester {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct LayoutAlignmentTester {
pub c: ::libc::c_char,
pub l: jsval_layout,
}
impl ::std::clone::Clone for LayoutAlignmentTester {
fn clone(&self) -> Self { *self }
}
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(i32)]
#[derive(Copy)]
pub enum UsedRval { IncludeUsedRval = 0, NoUsedRval = 1, }
pub enum UsedRvalBase { }
#[repr(C)]
#[derive(Copy)]
pub struct UsedRvalBase<> {
pub usedRval_: bool,
}
#[repr(C)]
#[derive(Copy)]
pub struct CallReceiverBase {
pub _base: UsedRvalBase,
pub argv_: *mut Value,
}
impl ::std::clone::Clone for CallReceiverBase {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CallReceiverBase {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2JS6detail16CallReceiverBase6calleeEv(this: *mut CallReceiverBase)
-> *mut JSObject;
fn _ZNK2JS6detail16CallReceiverBase7calleevEv(this: *mut CallReceiverBase)
-> HandleValue;
fn _ZNK2JS6detail16CallReceiverBase5thisvEv(this: *mut CallReceiverBase)
-> HandleValue;
fn _ZNK2JS6detail16CallReceiverBase11computeThisEP9JSContext(this:
*mut CallReceiverBase,
cx:
*mut JSContext)
-> Value;
fn _ZNK2JS6detail16CallReceiverBase14isConstructingEv(this:
*mut CallReceiverBase)
-> bool;
fn _ZNK2JS6detail16CallReceiverBase4rvalEv(this: *mut CallReceiverBase)
-> MutableHandleValue;
fn _ZNK2JS6detail16CallReceiverBase4baseEv(this: *mut CallReceiverBase)
-> *mut Value;
fn _ZNK2JS6detail16CallReceiverBase11spAfterCallEv(this:
*mut CallReceiverBase)
-> *mut Value;
fn _ZNK2JS6detail16CallReceiverBase9setCalleeENS_5ValueE(this:
*mut CallReceiverBase,
aCalleev: Value);
fn _ZNK2JS6detail16CallReceiverBase7setThisENS_5ValueE(this:
*mut CallReceiverBase,
aThisv: Value);
fn _ZNK2JS6detail16CallReceiverBase12mutableThisvEv(this:
*mut CallReceiverBase)
-> MutableHandleValue;
}
impl CallReceiverBase {
#[inline]
pub unsafe extern "C" fn callee(&mut self) -> *mut JSObject {
_ZNK2JS6detail16CallReceiverBase6calleeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn calleev(&mut self) -> HandleValue {
_ZNK2JS6detail16CallReceiverBase7calleevEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn thisv(&mut self) -> HandleValue {
_ZNK2JS6detail16CallReceiverBase5thisvEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn computeThis(&mut self, cx: *mut JSContext)
-> Value {
_ZNK2JS6detail16CallReceiverBase11computeThisEP9JSContext(&mut *self,
cx)
}
#[inline]
pub unsafe extern "C" fn isConstructing(&mut self) -> bool {
_ZNK2JS6detail16CallReceiverBase14isConstructingEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn rval(&mut self) -> MutableHandleValue {
_ZNK2JS6detail16CallReceiverBase4rvalEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn base(&mut self) -> *mut Value {
_ZNK2JS6detail16CallReceiverBase4baseEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn spAfterCall(&mut self) -> *mut Value {
_ZNK2JS6detail16CallReceiverBase11spAfterCallEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn setCallee(&mut self, aCalleev: Value) {
_ZNK2JS6detail16CallReceiverBase9setCalleeENS_5ValueE(&mut *self,
aCalleev)
}
#[inline]
pub unsafe extern "C" fn setThis(&mut self, aThisv: Value) {
_ZNK2JS6detail16CallReceiverBase7setThisENS_5ValueE(&mut *self,
aThisv)
}
#[inline]
pub unsafe extern "C" fn mutableThisv(&mut self) -> MutableHandleValue {
_ZNK2JS6detail16CallReceiverBase12mutableThisvEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct CallReceiver {
pub _base: CallReceiverBase<::libc::c_void>,
}
impl ::std::clone::Clone for CallReceiver {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CallReceiver {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct CallArgsBase {
pub _base: mozilla::Conditional<WantUsedRval == detail::IncludeUsedRval, CallReceiver, CallReceiverBase<NoUsedRval> >::Type,
pub argc_: u32,
}
impl ::std::clone::Clone for CallArgsBase {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CallArgsBase {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2JS6detail12CallArgsBase6lengthEv(this: *mut CallArgsBase) -> u32;
fn _ZNK2JS6detail12CallArgsBase3getEj(this: *mut CallArgsBase, i: u32)
-> HandleValue;
fn _ZNK2JS6detail12CallArgsBase10hasDefinedEj(this: *mut CallArgsBase,
i: u32) -> bool;
fn _ZNK2JS6detail12CallArgsBase5arrayEv(this: *mut CallArgsBase)
-> *mut Value;
fn _ZNK2JS6detail12CallArgsBase3endEv(this: *mut CallArgsBase)
-> *mut Value;
}
impl CallArgsBase {
#[inline]
pub unsafe extern "C" fn length(&mut self) -> u32 {
_ZNK2JS6detail12CallArgsBase6lengthEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn get(&mut self, i: u32) -> HandleValue {
_ZNK2JS6detail12CallArgsBase3getEj(&mut *self, i)
}
#[inline]
pub unsafe extern "C" fn hasDefined(&mut self, i: u32) -> bool {
_ZNK2JS6detail12CallArgsBase10hasDefinedEj(&mut *self, i)
}
#[inline]
pub unsafe extern "C" fn array(&mut self) -> *mut Value {
_ZNK2JS6detail12CallArgsBase5arrayEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn end(&mut self) -> *mut Value {
_ZNK2JS6detail12CallArgsBase3endEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct CallArgs {
pub _base: CallArgsBase<::libc::c_void>,
}
impl ::std::clone::Clone for CallArgs {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CallArgs {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2JS8CallArgs6createEjPNS_5ValueE(argc: u32, argv: *mut Value)
-> CallArgs;
fn _ZN2JS8CallArgs14requireAtLeastEP9JSContextPKcj(this: *mut CallArgs,
cx: *mut JSContext,
fnname:
*const ::libc::c_char,
required: u32) -> bool;
}
impl CallArgs {
#[inline]
pub unsafe extern "C" fn create(argc: u32, argv: *mut Value) -> CallArgs {
_ZN2JS8CallArgs6createEjPNS_5ValueE(argc, argv)
}
#[inline]
pub unsafe extern "C" fn requireAtLeast(&mut self, cx: *mut JSContext,
fnname: *const ::libc::c_char,
required: u32) -> bool {
_ZN2JS8CallArgs14requireAtLeastEP9JSContextPKcj(&mut *self, cx,
fnname, required)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct jsid {
pub asBits: size_t,
}
impl ::std::clone::Clone for jsid {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for jsid {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub enum FreeOp { }
pub enum PropertyName { }
pub enum Shape { }
#[repr(C)]
#[derive(Copy)]
pub struct ObjectOpResult {
pub code_: uintptr_t,
}
impl ::std::clone::Clone for ObjectOpResult {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ObjectOpResult {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy)]
pub enum ObjectOpResult_SpecialCodes { OkCode = 0, Uninitialized = -1, }
extern "C" {
fn _ZNK2JS14ObjectOpResult2okEv(this: *mut ObjectOpResult) -> bool;
fn _ZN2JS14ObjectOpResult7succeedEv(this: *mut ObjectOpResult) -> bool;
fn _ZN2JS14ObjectOpResult4failEj(this: *mut ObjectOpResult, msg: u32)
-> bool;
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 _ZNK2JS14ObjectOpResult11failureCodeEv(this: *mut ObjectOpResult)
-> u32;
fn _ZN2JS14ObjectOpResult25checkStrictErrorOrWarningEP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEEb(this:
*mut ObjectOpResult,
cx:
*mut JSContext,
obj:
HandleObject,
id:
HandleId,
strict:
bool)
-> bool;
fn _ZN2JS14ObjectOpResult25checkStrictErrorOrWarningEP9JSContextNS_6HandleIP8JSObjectEEb(this:
*mut ObjectOpResult,
cx:
*mut JSContext,
obj:
HandleObject,
strict:
bool)
-> bool;
fn _ZN2JS14ObjectOpResult11reportErrorEP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEE(this:
*mut ObjectOpResult,
cx:
*mut JSContext,
obj:
HandleObject,
id:
HandleId)
-> bool;
fn _ZN2JS14ObjectOpResult11reportErrorEP9JSContextNS_6HandleIP8JSObjectEE(this:
*mut ObjectOpResult,
cx:
*mut JSContext,
obj:
HandleObject)
-> 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;
fn _ZN2JS14ObjectOpResult11checkStrictEP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEE(this:
*mut ObjectOpResult,
cx:
*mut JSContext,
obj:
HandleObject,
id:
HandleId)
-> bool;
fn _ZN2JS14ObjectOpResult11checkStrictEP9JSContextNS_6HandleIP8JSObjectEE(this:
*mut ObjectOpResult,
cx:
*mut JSContext,
obj:
HandleObject)
-> bool;
}
impl ObjectOpResult {
#[inline]
pub unsafe extern "C" fn ok(&mut self) -> bool {
_ZNK2JS14ObjectOpResult2okEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn succeed(&mut self) -> bool {
_ZN2JS14ObjectOpResult7succeedEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn fail(&mut self, msg: u32) -> bool {
_ZN2JS14ObjectOpResult4failEj(&mut *self, msg)
}
#[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 failureCode(&mut self) -> u32 {
_ZNK2JS14ObjectOpResult11failureCodeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn checkStrictErrorOrWarning(&mut self,
cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
strict: bool) -> bool {
_ZN2JS14ObjectOpResult25checkStrictErrorOrWarningEP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEEb(&mut *self,
cx,
obj,
id,
strict)
}
#[inline]
pub unsafe extern "C" fn checkStrictErrorOrWarning1(&mut self,
cx: *mut JSContext,
obj: HandleObject,
strict: bool)
-> bool {
_ZN2JS14ObjectOpResult25checkStrictErrorOrWarningEP9JSContextNS_6HandleIP8JSObjectEEb(&mut *self,
cx,
obj,
strict)
}
#[inline]
pub unsafe extern "C" fn reportError(&mut self, cx: *mut JSContext,
obj: HandleObject, id: HandleId)
-> bool {
_ZN2JS14ObjectOpResult11reportErrorEP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEE(&mut *self,
cx,
obj,
id)
}
#[inline]
pub unsafe extern "C" fn reportError1(&mut self, cx: *mut JSContext,
obj: HandleObject) -> bool {
_ZN2JS14ObjectOpResult11reportErrorEP9JSContextNS_6HandleIP8JSObjectEE(&mut *self,
cx,
obj)
}
#[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)
}
#[inline]
pub unsafe extern "C" fn checkStrict(&mut self, cx: *mut JSContext,
obj: HandleObject, id: HandleId)
-> bool {
_ZN2JS14ObjectOpResult11checkStrictEP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEE(&mut *self,
cx,
obj,
id)
}
#[inline]
pub unsafe extern "C" fn checkStrict1(&mut self, cx: *mut JSContext,
obj: HandleObject) -> bool {
_ZN2JS14ObjectOpResult11checkStrictEP9JSContextNS_6HandleIP8JSObjectEE(&mut *self,
cx,
obj)
}
}
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)]
pub struct JSStringFinalizer {
pub finalize: ::std::option::Option<unsafe extern "C" fn(fin:
*const JSStringFinalizer,
chars:
*mut u16)>,
}
impl ::std::clone::Clone for JSStringFinalizer {
fn clone(&self) -> Self { *self }
}
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)]
pub struct ElementAdder {
pub resObj_: RootedObject,
pub vp_: *mut Value,
pub index_: u32,
pub length_: DebugOnly<u32>,
pub getBehavior_: GetBehavior,
}
impl ::std::clone::Clone for ElementAdder {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ElementAdder {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy)]
pub enum ElementAdder_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)]
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::clone::Clone for ClassSpec {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ClassSpec {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2js9ClassSpec7definedEv(this: *mut ClassSpec) -> bool;
fn _ZNK2js9ClassSpec9dependentEv(this: *mut ClassSpec) -> bool;
fn _ZNK2js9ClassSpec9parentKeyEv(this: *mut ClassSpec) -> JSProtoKey;
fn _ZNK2js9ClassSpec23shouldDefineConstructorEv(this: *mut ClassSpec)
-> bool;
}
impl ClassSpec {
#[inline]
pub unsafe extern "C" fn defined(&mut self) -> bool {
_ZNK2js9ClassSpec7definedEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn dependent(&mut self) -> bool {
_ZNK2js9ClassSpec9dependentEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn parentKey(&mut self) -> JSProtoKey {
_ZNK2js9ClassSpec9parentKeyEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn shouldDefineConstructor(&mut self) -> bool {
_ZNK2js9ClassSpec23shouldDefineConstructorEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct ClassExtension {
pub outerObject: ObjectOp,
pub innerObject: InnerObjectOp,
pub isWrappedNative: bool,
pub weakmapKeyDelegateOp: JSWeakmapKeyDelegateOp,
pub objectMovedOp: JSObjectMovedOp,
}
impl ::std::clone::Clone for ClassExtension {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ClassExtension {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for ObjectOps {
fn clone(&self) -> Self { *self }
}
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)]
#[derive(Copy)]
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::clone::Clone for JSClass {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSClass {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for Class {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Class {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2js5Class8isNativeEv(this: *mut Class) -> bool;
fn _ZNK2js5Class10hasPrivateEv(this: *mut Class) -> bool;
fn _ZNK2js5Class17emulatesUndefinedEv(this: *mut Class) -> bool;
fn _ZNK2js5Class12isJSFunctionEv(this: *mut Class) -> bool;
fn _ZNK2js5Class16nonProxyCallableEv(this: *mut Class) -> bool;
fn _ZNK2js5Class7isProxyEv(this: *mut Class) -> bool;
fn _ZNK2js5Class10isDOMClassEv(this: *mut Class) -> bool;
fn _ZN2js5Class13offsetOfFlagsEv() -> size_t;
}
impl Class {
#[inline]
pub unsafe extern "C" fn isNative(&mut self) -> bool {
_ZNK2js5Class8isNativeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn hasPrivate(&mut self) -> bool {
_ZNK2js5Class10hasPrivateEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn emulatesUndefined(&mut self) -> bool {
_ZNK2js5Class17emulatesUndefinedEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isJSFunction(&mut self) -> bool {
_ZNK2js5Class12isJSFunctionEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn nonProxyCallable(&mut self) -> bool {
_ZNK2js5Class16nonProxyCallableEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isProxy(&mut self) -> bool {
_ZNK2js5Class7isProxyEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isDOMClass(&mut self) -> bool {
_ZNK2js5Class10isDOMClassEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn offsetOfFlags() -> size_t {
_ZN2js5Class13offsetOfFlagsEv()
}
}
#[repr(i32)]
#[derive(Copy)]
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,
}
#[repr(i32)]
#[derive(Copy)]
pub enum MemoryOrdering {
Relaxed = 0,
ReleaseAcquire = 1,
SequentiallyConsistent = 2,
}
pub enum AtomicOrderConstraints { }
#[repr(C)]
#[derive(Copy)]
pub struct AtomicOrderConstraints;
impl ::std::clone::Clone for AtomicOrderConstraints {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AtomicOrderConstraints {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct IntrinsicBase<T>;
#[repr(C)]
#[derive(Copy)]
pub struct IntrinsicMemoryOps<T> {
pub _base: IntrinsicBase<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct IntrinsicAddSub<T> {
pub _base: IntrinsicBase<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct IntrinsicIncDec<T> {
pub _base: IntrinsicAddSub<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct AtomicIntrinsics<T> {
pub _base: IntrinsicMemoryOps<T>,
pub _base1: IntrinsicIncDec<T>,
}
#[repr(C)]
#[derive(Copy)]
pub struct AtomicBase<T> {
pub mValue: typename Intrinsics::ValueType,
}
#[repr(C)]
#[derive(Copy)]
pub struct AtomicBaseIncDec<T> {
pub _base: AtomicBase<T>,
}
pub enum Atomic { }
#[repr(C)]
#[derive(Copy)]
pub struct JSPrincipals {
pub refcount: Atomic<i32, ::libc::c_void, ::libc::c_void>,
pub debugToken: u32,
}
impl ::std::clone::Clone for JSPrincipals {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSPrincipals {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN12JSPrincipals13setDebugTokenEj(this: *mut JSPrincipals,
token: u32);
fn _ZN12JSPrincipals4dumpEv(this: *mut JSPrincipals);
}
impl JSPrincipals {
#[inline]
pub unsafe extern "C" fn setDebugToken(&mut self, token: u32) {
_ZN12JSPrincipals13setDebugTokenEj(&mut *self, token)
}
#[inline]
pub unsafe extern "C" fn dump(&mut self) {
_ZN12JSPrincipals4dumpEv(&mut *self)
}
}
pub type JSSubsumesOp =
::std::option::Option<unsafe extern "C" fn(first: *mut JSPrincipals,
second: *mut JSPrincipals)
-> bool>;
pub type JSCSPEvalChecker =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext) -> bool>;
#[repr(C)]
#[derive(Copy)]
pub struct JSSecurityCallbacks {
pub contentSecurityPolicyAllows: JSCSPEvalChecker,
pub subsumes: JSSubsumesOp,
}
impl ::std::clone::Clone for JSSecurityCallbacks {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSSecurityCallbacks {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type JSDestroyPrincipalsOp =
::std::option::Option<unsafe extern "C" fn(principals:
*mut JSPrincipals)>;
#[repr(C)]
#[derive(Copy)]
pub struct MallocAllocPolicy;
impl ::std::clone::Clone for MallocAllocPolicy {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for MallocAllocPolicy {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN7mozilla17MallocAllocPolicy5free_EPv(this: *mut MallocAllocPolicy,
aPtr: *mut ::libc::c_void);
fn _ZNK7mozilla17MallocAllocPolicy19reportAllocOverflowEv(this:
*mut MallocAllocPolicy);
}
impl MallocAllocPolicy {
#[inline]
pub unsafe extern "C" fn free_(&mut self, aPtr: *mut ::libc::c_void) {
_ZN7mozilla17MallocAllocPolicy5free_EPv(&mut *self, aPtr)
}
#[inline]
pub unsafe extern "C" fn reportAllocOverflow(&mut self) {
_ZNK7mozilla17MallocAllocPolicy19reportAllocOverflowEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct VectorImpl<T, AP, ThisVector>;
pub enum VectorTesting { }
#[repr(C)]
#[derive(Copy)]
pub struct VectorBase<T, AllocPolicy, ThisVector> {
pub _base: AllocPolicy,
pub mBegin: *mut T,
pub mLength: size_t,
pub mCapacity: size_t,
pub mStorage: AlignedStorage,
}
#[repr(i32)]
#[derive(Copy)]
pub enum VectorBase_ { InlineLength = 0, }
#[repr(C)]
#[derive(Copy)]
pub struct Vector<T, AllocPolicy> {
pub _base: VectorBase<T, AllocPolicy, ThisVector>,
}
pub enum Latin1CharsZ { }
pub enum TwoByteChars { }
#[repr(C)]
#[derive(Copy)]
pub struct AutoCheckRequestDepth {
pub cx: *mut JSContext,
}
impl ::std::clone::Clone for AutoCheckRequestDepth {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoCheckRequestDepth {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoValueArray {
pub _base: AutoGCRooter,
pub length_: size_t,
pub elements_: *mut Value,
}
impl ::std::clone::Clone for AutoValueArray {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoValueArray {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2JS14AutoValueArray6lengthEv(this: *mut AutoValueArray) -> u32;
fn _ZNK2JS14AutoValueArray5beginEv(this: *mut AutoValueArray)
-> *const Value;
fn _ZN2JS14AutoValueArray5beginEv(this: *mut AutoValueArray)
-> *mut Value;
}
impl AutoValueArray {
#[inline]
pub unsafe extern "C" fn length(&mut self) -> u32 {
_ZNK2JS14AutoValueArray6lengthEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn begin(&mut self) -> *const Value {
_ZNK2JS14AutoValueArray5beginEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn begin1(&mut self) -> *mut Value {
_ZN2JS14AutoValueArray5beginEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoVectorRooter<T> {
pub _base: AutoGCRooter,
pub vector: VectorImpl,
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoHashMapRooter<Key, Value> {
pub _base: AutoGCRooter,
pub map: HashMapImpl,
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoHashSetRooter<T> {
pub _base: AutoGCRooter,
pub set: HashSetImpl,
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoValueVector {
pub _base: AutoVectorRooter<Value>,
}
impl ::std::clone::Clone for AutoValueVector {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoValueVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoIdVector {
pub _base: AutoVectorRooter<jsid>,
}
impl ::std::clone::Clone for AutoIdVector {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoIdVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoObjectVector {
pub _base: AutoVectorRooter<*mut JSObject>,
}
impl ::std::clone::Clone for AutoObjectVector {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoObjectVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoFunctionVector {
pub _base: AutoVectorRooter<*mut JSFunction>,
}
impl ::std::clone::Clone for AutoFunctionVector {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoFunctionVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoScriptVector {
pub _base: AutoVectorRooter<*mut JSScript>,
}
impl ::std::clone::Clone for AutoScriptVector {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoScriptVector {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct CustomAutoRooter {
pub _vftable: *const _vftable_CustomAutoRooter,
pub _base: AutoGCRooter,
}
impl ::std::clone::Clone for CustomAutoRooter {
fn clone(&self) -> Self { *self }
}
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)]
pub struct RootedGeneric<T> {
pub _base: CustomAutoRooter,
pub value: T,
}
#[repr(C)]
#[derive(Copy)]
pub struct HandleValueArray {
pub length_: size_t,
pub elements_: *const Value,
}
impl ::std::clone::Clone for HandleValueArray {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for HandleValueArray {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2JS16HandleValueArray18fromMarkedLocationEjPKNS_5ValueE(len: size_t,
elements:
*const Value)
-> HandleValueArray;
fn _ZN2JS16HandleValueArray8subarrayERKS0_jj(values: &HandleValueArray,
startIndex: size_t,
len: size_t)
-> HandleValueArray;
fn _ZN2JS16HandleValueArray5emptyEv() -> HandleValueArray;
fn _ZNK2JS16HandleValueArray6lengthEv(this: *mut HandleValueArray)
-> size_t;
fn _ZNK2JS16HandleValueArray5beginEv(this: *mut HandleValueArray)
-> *const Value;
}
impl HandleValueArray {
#[inline]
pub unsafe extern "C" fn fromMarkedLocation(len: size_t,
elements: *const Value)
-> HandleValueArray {
_ZN2JS16HandleValueArray18fromMarkedLocationEjPKNS_5ValueE(len,
elements)
}
#[inline]
pub unsafe extern "C" fn subarray(values: &HandleValueArray,
startIndex: size_t, len: size_t)
-> HandleValueArray {
_ZN2JS16HandleValueArray8subarrayERKS0_jj(values, startIndex, len)
}
#[inline]
pub unsafe extern "C" fn empty() -> HandleValueArray {
_ZN2JS16HandleValueArray5emptyEv()
}
#[inline]
pub unsafe extern "C" fn length(&mut self) -> size_t {
_ZNK2JS16HandleValueArray6lengthEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn begin(&mut self) -> *const Value {
_ZNK2JS16HandleValueArray5beginEv(&mut *self)
}
}
/************************************************************************/
#[repr(C)]
#[derive(Copy)]
pub struct JSFreeOp {
pub runtime_: *mut JSRuntime,
}
impl ::std::clone::Clone for JSFreeOp {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSFreeOp {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK8JSFreeOp7runtimeEv(this: *mut JSFreeOp) -> *mut JSRuntime;
}
impl JSFreeOp {
#[inline]
pub unsafe extern "C" fn runtime(&mut self) -> *mut JSRuntime {
_ZNK8JSFreeOp7runtimeEv(&mut *self)
}
}
#[repr(i32)]
#[derive(Copy)]
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)]
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)]
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)]
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)]
pub struct JSErrorFormatString {
pub format: *const ::libc::c_char,
pub argCount: u16,
pub exnType: i16,
}
impl ::std::clone::Clone for JSErrorFormatString {
fn clone(&self) -> Self { *self }
}
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)]
pub struct JSWrapObjectCallbacks {
pub wrap: JSWrapObjectCallback,
pub preWrap: JSPreWrapCallback,
}
impl ::std::clone::Clone for JSWrapObjectCallbacks {
fn clone(&self) -> Self { *self }
}
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)]
pub struct SourceBufferHolder {
pub data_: *const u16,
pub length_: size_t,
pub ownsChars_: bool,
}
impl ::std::clone::Clone for SourceBufferHolder {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for SourceBufferHolder {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy)]
pub enum SourceBufferHolder_Ownership { NoOwnership = 0, GiveOwnership = 1, }
extern "C" {
fn _ZNK2JS18SourceBufferHolder3getEv(this: *mut SourceBufferHolder)
-> *const u16;
fn _ZNK2JS18SourceBufferHolder6lengthEv(this: *mut SourceBufferHolder)
-> size_t;
fn _ZNK2JS18SourceBufferHolder9ownsCharsEv(this: *mut SourceBufferHolder)
-> bool;
fn _ZN2JS18SourceBufferHolder4takeEv(this: *mut SourceBufferHolder)
-> *mut u16;
}
impl SourceBufferHolder {
#[inline]
pub unsafe extern "C" fn get(&mut self) -> *const u16 {
_ZNK2JS18SourceBufferHolder3getEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn length(&mut self) -> size_t {
_ZNK2JS18SourceBufferHolder6lengthEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn ownsChars(&mut self) -> bool {
_ZNK2JS18SourceBufferHolder9ownsCharsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn take(&mut self) -> *mut u16 {
_ZN2JS18SourceBufferHolder4takeEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for CompartmentTimeStats {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CompartmentTimeStats {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type CompartmentStatsVector =
Vector<CompartmentTimeStats, ::libc::c_void, SystemAllocPolicy>;
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)]
pub struct JSAutoRequest {
pub mContext: *mut JSContext,
}
impl ::std::clone::Clone for JSAutoRequest {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSAutoRequest {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct RuntimeOptions {
pub _bitfield_1: u8,
pub _bitfield_2: u8,
}
impl ::std::clone::Clone for RuntimeOptions {
fn clone(&self) -> Self { *self }
}
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 bool) << 0usize;
}
pub fn set_ion_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 1usize);
self._bitfield_1 |= (val as bool) << 1usize;
}
pub fn set_asmJS_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 2usize);
self._bitfield_1 |= (val as bool) << 2usize;
}
pub fn set_nativeRegExp_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 3usize);
self._bitfield_1 |= (val as bool) << 3usize;
}
pub fn set_unboxedObjects_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 4usize);
self._bitfield_1 |= (val as bool) << 4usize;
}
pub fn set_werror_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 5usize);
self._bitfield_1 |= (val as bool) << 5usize;
}
pub fn set_strictMode_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 6usize);
self._bitfield_1 |= (val as bool) << 6usize;
}
pub fn set_extraWarnings_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 7usize);
self._bitfield_1 |= (val as bool) << 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 bool) << 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)]
pub struct ContextOptions {
pub _bitfield_1: u8,
}
impl ::std::clone::Clone for ContextOptions {
fn clone(&self) -> Self { *self }
}
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 bool) << 0usize;
}
pub fn set_dontReportUncaught_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 1usize);
self._bitfield_1 |= (val as bool) << 1usize;
}
pub fn set_autoJSAPIOwnsErrorReporting_(&mut self, val: bool) {
self._bitfield_1 &= !(((1 << 1u32) - 1) << 2usize);
self._bitfield_1 |= (val as bool) << 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)]
pub struct AutoSaveContextOptions {
pub cx_: *mut JSContext,
pub oldOptions_: ContextOptions,
}
impl ::std::clone::Clone for AutoSaveContextOptions {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoSaveContextOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct JSAutoCompartment {
pub cx_: *mut JSContext,
pub oldCompartment_: *mut JSCompartment,
}
impl ::std::clone::Clone for JSAutoCompartment {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSAutoCompartment {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct JSAutoNullableCompartment {
pub cx_: *mut JSContext,
pub oldCompartment_: *mut JSCompartment,
}
impl ::std::clone::Clone for JSAutoNullableCompartment {
fn clone(&self) -> Self { *self }
}
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)]
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)]
pub struct AutoIdArray {
pub _base: AutoGCRooter,
pub context: *mut JSContext,
pub idArray: *mut JSIdArray,
}
impl ::std::clone::Clone for AutoIdArray {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoIdArray {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2JS11AutoIdArray6lengthEv(this: *mut AutoIdArray) -> size_t;
fn _ZN2JS11AutoIdArray5stealEv(this: *mut AutoIdArray) -> *mut JSIdArray;
fn _ZN2JS11AutoIdArray5traceEP8JSTracer(this: *mut AutoIdArray,
trc: *mut JSTracer);
}
impl AutoIdArray {
#[inline]
pub unsafe extern "C" fn length(&mut self) -> size_t {
_ZNK2JS11AutoIdArray6lengthEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn steal(&mut self) -> *mut JSIdArray {
_ZN2JS11AutoIdArray5stealEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn trace(&mut self, trc: *mut JSTracer) {
_ZN2JS11AutoIdArray5traceEP8JSTracer(&mut *self, trc)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct JSConstScalarSpec<T> {
pub name: *const ::libc::c_char,
pub val: T,
}
#[repr(C)]
#[derive(Copy)]
pub struct JSNativeWrapper {
pub op: JSNative,
pub info: *const JSJitInfo,
}
impl ::std::clone::Clone for JSNativeWrapper {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSNativeWrapper {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for JSPropertySpec {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSPropertySpec {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct SelfHostedWrapper {
pub unused: *mut ::libc::c_void,
pub funname: *const ::libc::c_char,
}
impl ::std::clone::Clone for SelfHostedWrapper {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for SelfHostedWrapper {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct jsapi_h_unnamed_4 {
pub _bindgen_data_: [u32; 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::clone::Clone for jsapi_h_unnamed_4 {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for jsapi_h_unnamed_4 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct jsapi_h_unnamed_5 {
pub _bindgen_data_: [u32; 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::clone::Clone for jsapi_h_unnamed_5 {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for jsapi_h_unnamed_5 {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK14JSPropertySpec12isSelfHostedEv(this: *mut JSPropertySpec)
-> bool;
fn _ZNK14JSPropertySpec23checkAccessorsAreNativeEv(this:
*mut JSPropertySpec);
fn _ZNK14JSPropertySpec27checkAccessorsAreSelfHostedEv(this:
*mut JSPropertySpec);
}
impl JSPropertySpec {
#[inline]
pub unsafe extern "C" fn isSelfHosted(&mut self) -> bool {
_ZNK14JSPropertySpec12isSelfHostedEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn checkAccessorsAreNative(&mut self) {
_ZNK14JSPropertySpec23checkAccessorsAreNativeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn checkAccessorsAreSelfHosted(&mut self) {
_ZNK14JSPropertySpec27checkAccessorsAreSelfHostedEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for JSFunctionSpec {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSFunctionSpec {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy)]
pub enum ZoneSpecifier { FreshZone = 0, SystemZone = 1, }
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for CompartmentOptions {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CompartmentOptions {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct jsapi_h_unnamed_6 {
pub _bindgen_data_: [u32; 1usize],
}
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::clone::Clone for jsapi_h_unnamed_6 {
fn clone(&self) -> Self { *self }
}
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)]
pub enum OnNewGlobalHookOption {
FireOnNewGlobalHook = 0,
DontFireOnNewGlobalHook = 1,
}
/*** Property descriptors ************************************************************************/
#[repr(C)]
#[derive(Copy)]
pub struct JSPropertyDescriptor {
pub obj: *mut JSObject,
pub attrs: u32,
pub getter: JSGetterOp,
pub setter: JSSetterOp,
pub value: Value,
}
impl ::std::clone::Clone for JSPropertyDescriptor {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSPropertyDescriptor {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN20JSPropertyDescriptor5traceEP8JSTracer(this:
*mut JSPropertyDescriptor,
trc: *mut JSTracer);
fn _ZN20JSPropertyDescriptor8rootKindEv() -> ThingRootKind;
}
impl JSPropertyDescriptor {
#[inline]
pub unsafe extern "C" fn trace(&mut self, trc: *mut JSTracer) {
_ZN20JSPropertyDescriptor5traceEP8JSTracer(&mut *self, trc)
}
#[inline]
pub unsafe extern "C" fn rootKind() -> ThingRootKind {
_ZN20JSPropertyDescriptor8rootKindEv()
}
}
#[repr(C)]
#[derive(Copy)]
pub struct PropertyDescriptorOperations<Outer>;
#[repr(C)]
#[derive(Copy)]
pub struct MutablePropertyDescriptorOperations<Outer> {
pub _base: PropertyDescriptorOperations<Outer>,
}
#[repr(i32)]
#[derive(Copy)]
pub enum PropertyDefinitionBehavior {
DefineAllProperties = 0,
OnlyDefineLateProperties = 1,
DontDefineLateProperties = 2,
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for ReadOnlyCompileOptions {
fn clone(&self) -> Self { *self }
}
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)]
pub struct OwningCompileOptions {
pub _base: ReadOnlyCompileOptions,
pub runtime: *mut JSRuntime,
pub elementRoot: PersistentRootedObject,
pub elementAttributeNameRoot: PersistentRootedString,
pub introductionScriptRoot: PersistentRootedScript,
}
impl ::std::clone::Clone for OwningCompileOptions {
fn clone(&self) -> Self { *self }
}
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)]
pub struct CompileOptions {
pub _base: ReadOnlyCompileOptions,
pub elementRoot: RootedObject,
pub elementAttributeNameRoot: RootedString,
pub introductionScriptRoot: RootedScript,
}
impl ::std::clone::Clone for CompileOptions {
fn clone(&self) -> Self { *self }
}
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)]
pub struct AutoSetAsyncStackForNewCalls {
pub cx: *mut JSContext,
pub oldAsyncStack: RootedObject,
pub oldAsyncCause: RootedString,
}
impl ::std::clone::Clone for AutoSetAsyncStackForNewCalls {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoSetAsyncStackForNewCalls {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct JSAutoByteString {
pub mBytes: *mut ::libc::c_char,
}
impl ::std::clone::Clone for JSAutoByteString {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSAutoByteString {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN16JSAutoByteString9initBytesEPc(this: *mut JSAutoByteString,
bytes: *mut ::libc::c_char);
fn _ZN16JSAutoByteString12encodeLatin1EP9JSContextP8JSString(this:
*mut JSAutoByteString,
cx:
*mut JSContext,
str:
*mut JSString)
-> *mut ::libc::c_char;
fn _ZN16JSAutoByteString12encodeLatin1EPN2js16ExclusiveContextEP8JSString(this:
*mut JSAutoByteString,
cx:
*mut ExclusiveContext,
str:
*mut JSString)
-> *mut ::libc::c_char;
fn _ZN16JSAutoByteString10encodeUtf8EP9JSContextN2JS6HandleIP8JSStringEE(this:
*mut JSAutoByteString,
cx:
*mut JSContext,
str:
HandleString)
-> *mut ::libc::c_char;
fn _ZN16JSAutoByteString5clearEv(this: *mut JSAutoByteString);
fn _ZNK16JSAutoByteString3ptrEv(this: *mut JSAutoByteString)
-> *mut ::libc::c_char;
fn _ZNK16JSAutoByteString6lengthEv(this: *mut JSAutoByteString) -> size_t;
}
impl JSAutoByteString {
#[inline]
pub unsafe extern "C" fn initBytes(&mut self,
bytes: *mut ::libc::c_char) {
_ZN16JSAutoByteString9initBytesEPc(&mut *self, bytes)
}
#[inline]
pub unsafe extern "C" fn encodeLatin1(&mut self, cx: *mut JSContext,
str: *mut JSString)
-> *mut ::libc::c_char {
_ZN16JSAutoByteString12encodeLatin1EP9JSContextP8JSString(&mut *self,
cx, str)
}
#[inline]
pub unsafe extern "C" fn encodeLatin11(&mut self,
cx: *mut ExclusiveContext,
str: *mut JSString)
-> *mut ::libc::c_char {
_ZN16JSAutoByteString12encodeLatin1EPN2js16ExclusiveContextEP8JSString(&mut *self,
cx,
str)
}
#[inline]
pub unsafe extern "C" fn encodeUtf8(&mut self, cx: *mut JSContext,
str: HandleString)
-> *mut ::libc::c_char {
_ZN16JSAutoByteString10encodeUtf8EP9JSContextN2JS6HandleIP8JSStringEE(&mut *self,
cx,
str)
}
#[inline]
pub unsafe extern "C" fn clear(&mut self) {
_ZN16JSAutoByteString5clearEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn ptr(&mut self) -> *mut ::libc::c_char {
_ZNK16JSAutoByteString3ptrEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn length(&mut self) -> size_t {
_ZNK16JSAutoByteString6lengthEv(&mut *self)
}
}
#[repr(i32)]
#[derive(Copy)]
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)]
pub struct JSLocaleCallbacks {
pub localeToUpperCase: JSLocaleToUpperCase,
pub localeToLowerCase: JSLocaleToLowerCase,
pub localeCompare: JSLocaleCompare,
pub localeToUnicode: JSLocaleToUnicode,
}
impl ::std::clone::Clone for JSLocaleCallbacks {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSLocaleCallbacks {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for JSErrorReport {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSErrorReport {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct AutoSaveExceptionState {
pub context: *mut JSContext,
pub wasPropagatingForcedReturn: bool,
pub wasOverRecursed: bool,
pub wasThrowing: bool,
pub exceptionValue: RootedValue,
}
impl ::std::clone::Clone for AutoSaveExceptionState {
fn clone(&self) -> Self { *self }
}
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)]
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)]
pub struct AutoFilename {
pub scriptSource_: *mut ::libc::c_void,
}
impl ::std::clone::Clone for AutoFilename {
fn clone(&self) -> Self { *self }
}
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)]
pub struct AutoHideScriptedCaller {
pub mContext: *mut JSContext,
}
impl ::std::clone::Clone for AutoHideScriptedCaller {
fn clone(&self) -> Self { *self }
}
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)]
pub enum AsmJSCacheResult {
AsmJSCache_MIN = 0,
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 =
Vector<::libc::c_char, ::libc::c_void, SystemAllocPolicy>;
pub type BuildIdOp =
::std::option::Option<unsafe extern "C" fn(buildId:
*mut BuildIdCharVector)
-> bool>;
#[repr(C)]
#[derive(Copy)]
pub struct AsmJSCacheOps {
pub openEntryForRead: OpenAsmJSCacheEntryForReadOp,
pub closeEntryForRead: CloseAsmJSCacheEntryForReadOp,
pub openEntryForWrite: OpenAsmJSCacheEntryForWriteOp,
pub closeEntryForWrite: CloseAsmJSCacheEntryForWriteOp,
pub buildId: BuildIdOp,
}
impl ::std::clone::Clone for AsmJSCacheOps {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AsmJSCacheOps {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct ForOfIterator {
pub cx_: *mut JSContext,
pub iterator: RootedObject,
pub index: u32,
}
impl ::std::clone::Clone for ForOfIterator {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ForOfIterator {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy)]
pub enum ForOfIterator_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)]
pub enum SavedFrameResult { Ok = 0, AccessDenied = 1, }
pub type jsbytecode = u8;
pub type IsAcceptableThis =
::std::option::Option<unsafe extern "C" fn(v: HandleValue) -> bool>;
pub type NativeImpl =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
args: CallArgs) -> bool>;
pub enum JSAtom { }
pub enum JSLinearString { }
pub enum BaseProxyHandler { }
pub enum InterpreterFrame { }
#[repr(i32)]
#[derive(Copy)]
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)]
pub enum jsfriendapi_hpp_unnamed_8 {
MakeNonConfigurableIntoConfigurable = 0,
CopyNonConfigurableAsIs = 1,
}
pub type PropertyCopyBehavior = jsfriendapi_hpp_unnamed_8;
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for JSFunctionSpecWithHelp {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSFunctionSpecWithHelp {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct SourceHook {
pub _vftable: *const _vftable_SourceHook,
}
impl ::std::clone::Clone for SourceHook {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for SourceHook {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_SourceHook {
pub load: extern "C" fn(this: *mut ::libc::c_void, cx: *mut JSContext,
filename: *const ::libc::c_char,
src: *mut *mut u16, length: *mut size_t) -> bool,
}
pub type PreserveWrapperCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
obj: *mut JSObject) -> bool>;
#[repr(i32)]
#[derive(Copy)]
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)]
pub struct WeakMapTracer {
pub runtime: *mut JSRuntime,
pub callback: WeakMapTraceCallback,
}
impl ::std::clone::Clone for WeakMapTracer {
fn clone(&self) -> Self { *self }
}
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)]
pub struct ObjectGroup {
pub clasp: *const Class,
pub proto: *mut JSObject,
pub compartment: *mut JSCompartment,
}
impl ::std::clone::Clone for ObjectGroup {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ObjectGroup {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct BaseShape {
pub clasp_: *const Class,
pub parent: *mut JSObject,
}
impl ::std::clone::Clone for BaseShape {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for BaseShape {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct Shape {
pub base: *mut BaseShape,
pub _1: jsid,
pub slotInfo: u32,
}
impl ::std::clone::Clone for Shape {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Shape {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct Object {
pub group: *mut ObjectGroup,
pub shape: *mut Shape,
pub slots: *mut Value,
pub _1: *mut ::libc::c_void,
}
impl ::std::clone::Clone for Object {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Object {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK2js6shadow6Object13numFixedSlotsEv(this: *mut Object) -> size_t;
fn _ZNK2js6shadow6Object10fixedSlotsEv(this: *mut Object) -> *mut Value;
fn _ZNK2js6shadow6Object7slotRefEj(this: *mut Object, slot: size_t)
-> *mut Value;
}
impl Object {
#[inline]
pub unsafe extern "C" fn numFixedSlots(&mut self) -> size_t {
_ZNK2js6shadow6Object13numFixedSlotsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn fixedSlots(&mut self) -> *mut Value {
_ZNK2js6shadow6Object10fixedSlotsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn slotRef(&mut self, slot: size_t) -> *mut Value {
_ZNK2js6shadow6Object7slotRefEj(&mut *self, slot)
}
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for Function {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Function {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy)]
pub struct String {
pub flags: u32,
pub length: u32,
pub _bindgen_data_1_: [u32; 1usize],
}
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::clone::Clone for String {
fn clone(&self) -> Self { *self }
}
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)]
pub struct JSDOMCallbacks {
pub instanceClassMatchesProto: DOMInstanceClassHasProtoAtDepth,
}
impl ::std::clone::Clone for JSDOMCallbacks {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSDOMCallbacks {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type DOMCallbacks = JSDOMCallbacks;
pub enum RegExpGuard { }
#[repr(i32)]
#[derive(Copy)]
pub enum NukeReferencesToWindow {
NukeWindowReferences = 0,
DontNukeWindowReferences = 1,
}
#[repr(C)]
#[derive(Copy)]
pub struct CompartmentFilter {
pub _vftable: *const _vftable_CompartmentFilter,
}
impl ::std::clone::Clone for CompartmentFilter {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CompartmentFilter {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_CompartmentFilter {
pub match: extern "C" fn(this: *mut ::libc::c_void, c: *mut JSCompartment)
-> bool,
}
#[repr(C)]
#[derive(Copy)]
pub struct AllCompartments {
pub _base: CompartmentFilter,
}
impl ::std::clone::Clone for AllCompartments {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AllCompartments {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_AllCompartments {
pub _base: _vftable_CompartmentFilter,
}
#[repr(C)]
#[derive(Copy)]
pub struct ContentCompartmentsOnly {
pub _base: CompartmentFilter,
}
impl ::std::clone::Clone for ContentCompartmentsOnly {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ContentCompartmentsOnly {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_ContentCompartmentsOnly {
pub _base: _vftable_CompartmentFilter,
}
#[repr(C)]
#[derive(Copy)]
pub struct ChromeCompartmentsOnly {
pub _base: CompartmentFilter,
}
impl ::std::clone::Clone for ChromeCompartmentsOnly {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ChromeCompartmentsOnly {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_ChromeCompartmentsOnly {
pub _base: _vftable_CompartmentFilter,
}
#[repr(C)]
#[derive(Copy)]
pub struct SingleCompartment {
pub _base: CompartmentFilter,
pub ours: *mut JSCompartment,
}
impl ::std::clone::Clone for SingleCompartment {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for SingleCompartment {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_SingleCompartment {
pub _base: _vftable_CompartmentFilter,
}
#[repr(C)]
#[derive(Copy)]
pub struct CompartmentsWithPrincipals {
pub _base: CompartmentFilter,
pub principals: *mut JSPrincipals,
}
impl ::std::clone::Clone for CompartmentsWithPrincipals {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for CompartmentsWithPrincipals {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
pub struct _vftable_CompartmentsWithPrincipals {
pub _base: _vftable_CompartmentFilter,
}
#[repr(C)]
#[derive(Copy)]
pub struct ExpandoAndGeneration {
pub expando: Heap<Value>,
pub generation: u32,
}
impl ::std::clone::Clone for ExpandoAndGeneration {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for ExpandoAndGeneration {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN2js20ExpandoAndGeneration6UnlinkEv(this: *mut ExpandoAndGeneration);
fn _ZN2js20ExpandoAndGeneration15offsetOfExpandoEv() -> size_t;
fn _ZN2js20ExpandoAndGeneration18offsetOfGenerationEv() -> size_t;
}
impl ExpandoAndGeneration {
#[inline]
pub unsafe extern "C" fn Unlink(&mut self) {
_ZN2js20ExpandoAndGeneration6UnlinkEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn offsetOfExpando() -> size_t {
_ZN2js20ExpandoAndGeneration15offsetOfExpandoEv()
}
#[inline]
pub unsafe extern "C" fn offsetOfGeneration() -> size_t {
_ZN2js20ExpandoAndGeneration18offsetOfGenerationEv()
}
}
#[repr(i32)]
#[derive(Copy)]
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)]
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)]
pub struct AutoStableStringChars {
pub s_: RootedString,
pub _bindgen_data_1_: [u32; 1usize],
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::clone::Clone for AutoStableStringChars {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for AutoStableStringChars {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy)]
pub enum AutoStableStringChars_State {
Uninitialized = 0,
Latin1 = 1,
TwoByte = 2,
}
extern "C" {
fn _ZN2js21AutoStableStringChars4initEP9JSContextP8JSString(this:
*mut AutoStableStringChars,
cx:
*mut JSContext,
s:
*mut JSString)
-> bool;
fn _ZN2js21AutoStableStringChars11initTwoByteEP9JSContextP8JSString(this:
*mut AutoStableStringChars,
cx:
*mut JSContext,
s:
*mut JSString)
-> bool;
fn _ZNK2js21AutoStableStringChars8isLatin1Ev(this:
*mut AutoStableStringChars)
-> bool;
fn _ZNK2js21AutoStableStringChars9isTwoByteEv(this:
*mut AutoStableStringChars)
-> bool;
fn _ZNK2js21AutoStableStringChars12twoByteCharsEv(this:
*mut AutoStableStringChars)
-> *const u16;
fn _ZNK2js21AutoStableStringChars11latin1RangeEv(this:
*mut AutoStableStringChars)
-> Range<u8>;
fn _ZNK2js21AutoStableStringChars12twoByteRangeEv(this:
*mut AutoStableStringChars)
-> Range<u16>;
fn _ZN2js21AutoStableStringChars26maybeGiveOwnershipToCallerEv(this:
*mut AutoStableStringChars)
-> bool;
}
impl AutoStableStringChars {
#[inline]
pub unsafe extern "C" fn init(&mut self, cx: *mut JSContext,
s: *mut JSString) -> bool {
_ZN2js21AutoStableStringChars4initEP9JSContextP8JSString(&mut *self,
cx, s)
}
#[inline]
pub unsafe extern "C" fn initTwoByte(&mut self, cx: *mut JSContext,
s: *mut JSString) -> bool {
_ZN2js21AutoStableStringChars11initTwoByteEP9JSContextP8JSString(&mut *self,
cx,
s)
}
#[inline]
pub unsafe extern "C" fn isLatin1(&mut self) -> bool {
_ZNK2js21AutoStableStringChars8isLatin1Ev(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isTwoByte(&mut self) -> bool {
_ZNK2js21AutoStableStringChars9isTwoByteEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn twoByteChars(&mut self) -> *const u16 {
_ZNK2js21AutoStableStringChars12twoByteCharsEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn latin1Range(&mut self) -> Range<u8> {
_ZNK2js21AutoStableStringChars11latin1RangeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn twoByteRange(&mut self) -> Range<u16> {
_ZNK2js21AutoStableStringChars12twoByteRangeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn maybeGiveOwnershipToCaller(&mut self) -> bool {
_ZN2js21AutoStableStringChars26maybeGiveOwnershipToCallerEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
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::clone::Clone for ErrorReport {
fn clone(&self) -> Self { *self }
}
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 _ZN2js11ErrorReport33populateUncaughtExceptionReportVAEP9JSContextPc(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 {
_ZN2js11ErrorReport33populateUncaughtExceptionReportVAEP9JSContextPc(&mut *self,
cx,
ap)
}
}
#[repr(i32)]
#[derive(Copy)]
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)]
pub enum jsfriendapi_hpp_unnamed_10 { ChangeData = 0, KeepData = 1, }
pub type NeuterDataDisposition = jsfriendapi_hpp_unnamed_10;
#[repr(C)]
#[derive(Copy)]
pub struct JSJitGetterCallArgs {
pub _base: MutableHandleValue,
}
impl ::std::clone::Clone for JSJitGetterCallArgs {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSJitGetterCallArgs {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZN19JSJitGetterCallArgs4rvalEv(this: *mut JSJitGetterCallArgs)
-> MutableHandleValue;
}
impl JSJitGetterCallArgs {
#[inline]
pub unsafe extern "C" fn rval(&mut self) -> MutableHandleValue {
_ZN19JSJitGetterCallArgs4rvalEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct JSJitSetterCallArgs {
pub _base: MutableHandleValue,
}
impl ::std::clone::Clone for JSJitSetterCallArgs {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSJitSetterCallArgs {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK19JSJitSetterCallArgs6lengthEv(this: *mut JSJitSetterCallArgs)
-> u32;
}
impl JSJitSetterCallArgs {
#[inline]
pub unsafe extern "C" fn length(&mut self) -> u32 {
_ZNK19JSJitSetterCallArgs6lengthEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct JSJitMethodCallArgs {
pub _base: CallArgsBase<::libc::c_void>,
}
impl ::std::clone::Clone for JSJitMethodCallArgs {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSJitMethodCallArgs {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
fn _ZNK19JSJitMethodCallArgs4rvalEv(this: *mut JSJitMethodCallArgs)
-> MutableHandleValue;
fn _ZNK19JSJitMethodCallArgs6lengthEv(this: *mut JSJitMethodCallArgs)
-> u32;
fn _ZNK19JSJitMethodCallArgs10hasDefinedEj(this: *mut JSJitMethodCallArgs,
i: u32) -> bool;
fn _ZNK19JSJitMethodCallArgs6calleeEv(this: *mut JSJitMethodCallArgs)
-> *mut JSObject;
}
impl JSJitMethodCallArgs {
#[inline]
pub unsafe extern "C" fn rval(&mut self) -> MutableHandleValue {
_ZNK19JSJitMethodCallArgs4rvalEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn length(&mut self) -> u32 {
_ZNK19JSJitMethodCallArgs6lengthEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn hasDefined(&mut self, i: u32) -> bool {
_ZNK19JSJitMethodCallArgs10hasDefinedEj(&mut *self, i)
}
#[inline]
pub unsafe extern "C" fn callee(&mut self) -> *mut JSObject {
_ZNK19JSJitMethodCallArgs6calleeEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct JSJitMethodCallArgsTraits;
impl ::std::clone::Clone for JSJitMethodCallArgsTraits {
fn clone(&self) -> Self { *self }
}
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)]
pub struct JSJitInfo {
pub _bindgen_data_1_: [u32; 1usize],
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::clone::Clone for JSJitInfo {
fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for JSJitInfo {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(i32)]
#[derive(Copy)]
pub enum JSJitInfo_OpType {
Getter = 0,
Setter = 1,
Method = 2,
StaticMethod = 3,
OpTypeCount = 4,
}
#[repr(i32)]
#[derive(Copy)]
pub enum JSJitInfo_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)]
pub enum JSJitInfo_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)
}
}
extern "C" {
fn _ZNK9JSJitInfo24needsOuterizedThisObjectEv(this: *mut JSJitInfo)
-> bool;
fn _ZNK9JSJitInfo20isTypedMethodJitInfoEv(this: *mut JSJitInfo) -> bool;
fn _ZNK9JSJitInfo4typeEv(this: *mut JSJitInfo) -> OpType;
fn _ZNK9JSJitInfo8aliasSetEv(this: *mut JSJitInfo) -> AliasSet;
fn _ZNK9JSJitInfo10returnTypeEv(this: *mut JSJitInfo) -> JSValueType;
}
impl JSJitInfo {
#[inline]
pub unsafe extern "C" fn needsOuterizedThisObject(&mut self) -> bool {
_ZNK9JSJitInfo24needsOuterizedThisObjectEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn isTypedMethodJitInfo(&mut self) -> bool {
_ZNK9JSJitInfo20isTypedMethodJitInfoEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn type(&mut self) -> OpType {
_ZNK9JSJitInfo4typeEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn aliasSet(&mut self) -> AliasSet {
_ZNK9JSJitInfo8aliasSetEv(&mut *self)
}
#[inline]
pub unsafe extern "C" fn returnType(&mut self) -> JSValueType {
_ZNK9JSJitInfo10returnTypeEv(&mut *self)
}
}
#[repr(C)]
#[derive(Copy)]
pub struct JSTypedMethodJitInfo {
pub base: JSJitInfo,
pub argTypes: *const ArgType,
}
impl ::std::clone::Clone for JSTypedMethodJitInfo {
fn clone(&self) -> Self { *self }
}
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)]
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)]
pub struct AutoCTypesActivityCallback {
pub cx: *mut JSContext,
pub callback: CTypesActivityCallback,
pub endType: CTypesActivityType,
}
impl ::std::clone::Clone for AutoCTypesActivityCallback {
fn clone(&self) -> Self { *self }
}
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" {
pub static JSVAL_NULL: jsval;
pub static JSVAL_ZERO: jsval;
pub static JSVAL_ONE: jsval;
pub static JSVAL_FALSE: jsval;
pub static JSVAL_TRUE: jsval;
pub static JSVAL_VOID: jsval;
pub static NullHandleValue: HandleValue;
pub static UndefinedHandleValue: HandleValue;
pub static TrueHandleValue: HandleValue;
pub static FalseHandleValue: HandleValue;
pub static JSID_VOID: jsid;
pub static JSID_EMPTY: jsid;
pub static JSID_VOIDHANDLE: HandleId;
pub static JSID_EMPTYHANDLE: HandleId;
pub static FunctionClassPtr: Class;
pub static ObjectClassPtr: Class;
pub static Int8ArrayClassPtr: *const Class;
pub static Uint8ArrayClassPtr: *const Class;
pub static Uint8ClampedArrayClassPtr: *const Class;
pub static Int16ArrayClassPtr: *const Class;
pub static Uint16ArrayClassPtr: *const Class;
pub static Int32ArrayClassPtr: *const Class;
pub static Uint32ArrayClassPtr: *const Class;
pub static Float32ArrayClassPtr: *const Class;
pub static Float64ArrayClassPtr: *const Class;
pub static SharedInt8ArrayClassPtr: *const Class;
pub static SharedUint8ArrayClassPtr: *const Class;
pub static SharedUint8ClampedArrayClassPtr: *const Class;
pub static SharedInt16ArrayClassPtr: *const Class;
pub static SharedUint16ArrayClassPtr: *const Class;
pub static SharedInt32ArrayClassPtr: *const Class;
pub static SharedUint32ArrayClassPtr: *const Class;
pub static SharedFloat32ArrayClassPtr: *const Class;
pub static SharedFloat64ArrayClassPtr: *const Class;
}
extern "C" {
#[link_name = "_ZN7mozilla3AbsIfEENS_6detail13AbsReturnTypeIT_E4TypeES3_"]
pub fn Abs(aFloat: f32) -> f32;
#[link_name = "_ZN7mozilla3AbsIdEENS_6detail13AbsReturnTypeIT_E4TypeES3_"]
pub fn Abs1(aDouble: f64) -> f64;
#[link_name = "_ZN7mozilla3AbsIeEENS_6detail13AbsReturnTypeIT_E4TypeES3_"]
pub fn Abs2(aLongDouble: f64) -> f64;
#[link_name = "_ZN7mozilla6detail20CountLeadingZeroes32Ej"]
pub fn CountLeadingZeroes32(aValue: u32) -> uint_fast8_t;
#[link_name = "_ZN7mozilla6detail21CountTrailingZeroes32Ej"]
pub fn CountTrailingZeroes32(aValue: u32) -> uint_fast8_t;
#[link_name = "_ZN7mozilla6detail17CountPopulation32Ej"]
pub fn CountPopulation32(aValue: u32) -> uint_fast8_t;
#[link_name = "_ZN7mozilla6detail17CountPopulation64Ey"]
pub fn CountPopulation64(aValue: u64) -> uint_fast8_t;
#[link_name = "_ZN7mozilla6detail20CountLeadingZeroes64Ey"]
pub fn CountLeadingZeroes64(aValue: u64) -> uint_fast8_t;
#[link_name = "_ZN7mozilla6detail21CountTrailingZeroes64Ey"]
pub fn CountTrailingZeroes64(aValue: u64) -> uint_fast8_t;
#[link_name = "_ZN7mozilla20CountLeadingZeroes32Ej"]
pub fn CountLeadingZeroes321(aValue: u32) -> uint_fast8_t;
#[link_name = "_ZN7mozilla21CountTrailingZeroes32Ej"]
pub fn CountTrailingZeroes321(aValue: u32) -> uint_fast8_t;
#[link_name = "_ZN7mozilla17CountPopulation32Ej"]
pub fn CountPopulation321(aValue: u32) -> uint_fast8_t;
#[link_name = "_ZN7mozilla17CountPopulation64Ey"]
pub fn CountPopulation641(aValue: u64) -> uint_fast8_t;
#[link_name = "_ZN7mozilla20CountLeadingZeroes64Ey"]
pub fn CountLeadingZeroes641(aValue: u64) -> uint_fast8_t;
#[link_name = "_ZN7mozilla21CountTrailingZeroes64Ey"]
pub fn CountTrailingZeroes641(aValue: u64) -> uint_fast8_t;
#[link_name = "_ZN7mozilla15CeilingLog2SizeEj"]
pub fn CeilingLog2Size(aValue: size_t) -> uint_fast8_t;
#[link_name = "_ZN7mozilla13FloorLog2SizeEj"]
pub fn FloorLog2Size(aValue: size_t) -> uint_fast8_t;
#[link_name = "_ZN7mozilla11RoundUpPow2Ej"]
pub fn RoundUpPow2(aValue: size_t) -> size_t;
#[link_name = "_ZN7mozilla22IsFloat32RepresentableEd"]
pub fn IsFloat32Representable(aFloat32: f64) -> bool;
#[link_name = "_Z9JS_AssertPKcS0_i"]
pub fn JS_Assert(s: *const ::libc::c_char, file: *const ::libc::c_char,
ln: i32);
#[link_name = "_ZN2js6detail16ScrambleHashCodeEj"]
pub fn ScrambleHashCode(h: HashNumber) -> HashNumber;
#[link_name = "_ZN2js8FinishGCEP9JSRuntime"]
pub fn FinishGC(rt: *mut JSRuntime);
#[link_name = "_ZN2js2gc26MarkPersistentRootedChainsEP8JSTracer"]
pub fn MarkPersistentRootedChains(arg1: *mut JSTracer);
#[link_name = "_ZN2js2gc28FinishPersistentRootedChainsEP9JSRuntime"]
pub fn FinishPersistentRootedChains(arg1: *mut JSRuntime);
#[link_name = "_ZN2js10GetRuntimeEPK9JSContext"]
pub fn GetRuntime(cx: *const JSContext) -> *mut JSRuntime;
#[link_name = "_ZN2js21GetContextCompartmentEPK9JSContext"]
pub fn GetContextCompartment(cx: *const JSContext) -> *mut JSCompartment;
#[link_name = "_ZN2js14GetContextZoneEPK9JSContext"]
pub fn GetContextZone(cx: *const JSContext) -> *mut Zone;
#[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_TraceIncomingCCWsP8JSTracerRKN2js7HashSetIPN2JS4ZoneENS1_13DefaultHasherIS5_EENS1_17SystemAllocPolicyEEE"]
pub fn JS_TraceIncomingCCWs(trc: *mut JSTracer, zones: &ZoneSet);
#[link_name = "_Z20JS_GetTraceThingInfoPcjP8JSTracerPv13JSGCTraceKindb"]
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 = "_ZN2js2gc15IsInsideNurseryEPKNS0_4CellE"]
pub fn IsInsideNursery(cell: *const Cell) -> bool;
#[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_8gcreason6ReasonEx"]
pub fn StartIncrementalGC(rt: *mut JSRuntime, gckind: JSGCInvocationKind,
reason: Reason, millis: i64);
#[link_name =
"_ZN2JS18IncrementalGCSliceEP9JSRuntimeNS_8gcreason6ReasonEx"]
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 = "_ZN2JS32IsOptimizedPlaceholderMagicValueERKNS_5ValueE"]
pub fn IsOptimizedPlaceholderMagicValue(v: &Value) -> bool;
#[link_name = "_ZN2JS8SameTypeERKNS_5ValueES2_"]
pub fn SameType(lhs: &Value, rhs: &Value) -> bool;
#[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 = "_ZN2JS20CallReceiverFromArgvEPNS_5ValueE"]
pub fn CallReceiverFromArgv(argv: *mut Value) -> CallReceiver;
#[link_name = "_ZN2JS18CallReceiverFromVpEPNS_5ValueE"]
pub fn CallReceiverFromVp(vp: *mut Value) -> CallReceiver;
#[link_name = "_ZN2JS14CallArgsFromVpEjPNS_5ValueE"]
pub fn CallArgsFromVp(argc: u32, vp: *mut Value) -> CallArgs;
#[link_name = "_ZN2JS14CallArgsFromSpEjPNS_5ValueE"]
pub fn CallArgsFromSp(argc: u32, sp: *mut Value) -> CallArgs;
#[link_name = "_Z7JS_THISP9JSContextPN2JS5ValueE"]
pub fn JS_THIS(cx: *mut JSContext, vp: *mut Value) -> Value;
#[link_name = "_Z23INTERNED_STRING_TO_JSIDP9JSContextP8JSString"]
pub fn INTERNED_STRING_TO_JSID(cx: *mut JSContext, str: *mut JSString)
-> jsid;
#[link_name =
"_ZN2js13ObjectClassIsER8JSObjectNS_12ESClassValueEP9JSContext"]
pub fn ObjectClassIs(obj: &mut JSObject, classValue: ESClassValue,
cx: *mut JSContext) -> bool;
#[link_name =
"_ZN2js17IsObjectWithClassERKN2JS5ValueENS_12ESClassValueEP9JSContext"]
pub fn IsObjectWithClass(v: &Value, classValue: ESClassValue,
cx: *mut JSContext) -> bool;
#[link_name =
"_ZN2js5UnboxEP9JSContextN2JS6HandleIP8JSObjectEENS2_13MutableHandleINS2_5ValueEEE"]
pub fn Unbox(cx: *mut JSContext, obj: HandleObject,
vp: MutableHandleValue) -> bool;
#[link_name = "_Z17JS_HoldPrincipalsP12JSPrincipals"]
pub fn JS_HoldPrincipals(principals: *mut JSPrincipals);
#[link_name = "_Z17JS_DropPrincipalsP9JSRuntimeP12JSPrincipals"]
pub fn JS_DropPrincipals(rt: *mut JSRuntime,
principals: *mut JSPrincipals);
#[link_name =
"_Z23JS_SetSecurityCallbacksP9JSRuntimePK19JSSecurityCallbacks"]
pub fn JS_SetSecurityCallbacks(rt: *mut JSRuntime,
callbacks: *const JSSecurityCallbacks);
#[link_name = "_Z23JS_GetSecurityCallbacksP9JSRuntime"]
pub fn JS_GetSecurityCallbacks(rt: *mut JSRuntime)
-> *const JSSecurityCallbacks;
#[link_name = "_Z23JS_SetTrustedPrincipalsP9JSRuntimePK12JSPrincipals"]
pub fn JS_SetTrustedPrincipals(rt: *mut JSRuntime,
prin: *const JSPrincipals);
#[link_name =
"_Z32JS_InitDestroyPrincipalsCallbackP9JSRuntimePFvP12JSPrincipalsE"]
pub fn JS_InitDestroyPrincipalsCallback(rt: *mut JSRuntime,
destroyPrincipals:
JSDestroyPrincipalsOp);
#[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 =
"_Z22JS_GetCompartmentStatsP9JSRuntimeRN2js6VectorI20CompartmentTimeStatsLj0ENS1_17SystemAllocPolicyEEE"]
pub fn JS_GetCompartmentStats(rt: *mut JSRuntime,
stats: &mut CompartmentStatsVector) -> bool;
#[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_SetICUMemoryFunctionsPFPvPKvjEPFS_S1_S_jEPFvS1_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 = "_ZN2js16AssertHeapIsIdleEP9JSRuntime"]
pub fn AssertHeapIsIdle(rt: *mut JSRuntime);
#[link_name = "_ZN2js16AssertHeapIsIdleEP9JSContext"]
pub fn AssertHeapIsIdle1(cx: *mut JSContext);
#[link_name = "_Z21JS_SetContextCallbackP9JSRuntimePFbP9JSContextjPvES3_"]
pub fn JS_SetContextCallback(rt: *mut JSRuntime,
cxCallback: JSContextCallback,
data: *mut ::libc::c_void);
#[link_name = "_Z13JS_NewContextP9JSRuntimej"]
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_P13JSCompartmentPcjE"]
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_mallocP9JSContextj"]
pub fn JS_malloc(cx: *mut JSContext, nbytes: size_t)
-> *mut ::libc::c_void;
#[link_name = "_Z10JS_reallocP9JSContextPvjj"]
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_updateMallocCounterP9JSContextj"]
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_NewExternalStringP9JSContextPKDsjPK17JSStringFinalizer"]
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_SetNativeStackQuotaP9JSRuntimejjj"]
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 = "_ZN2JS6detail13CheckIsNativeEPFbP9JSContextjPNS_5ValueEE"]
pub fn CheckIsNative(native: JSNative) -> i32;
#[link_name =
"_ZN2JS6detail15CheckIsGetterOpEPFbP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEENS_13MutableHandleINS_5ValueEEEE"]
pub fn CheckIsGetterOp(op: JSGetterOp) -> i32;
#[link_name =
"_ZN2JS6detail15CheckIsSetterOpEPFbP9JSContextNS_6HandleIP8JSObjectEENS3_I4jsidEENS_13MutableHandleINS_5ValueEEERNS_14ObjectOpResultEE"]
pub fn CheckIsSetterOp(op: JSSetterOp) -> i32;
#[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_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjNS2_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_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjS5_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_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjNS2_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_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjijPFbS0_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_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjjjPFbS0_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_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjdjPFbS0_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_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjNS2_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_DefineUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjNS2_I20JSPropertyDescriptorEE"]
pub fn JS_DefineUCProperty7(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
desc: Handle<JSPropertyDescriptor>) -> bool;
#[link_name =
"_Z26JS_AlreadyHasOwnUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjPb"]
pub fn JS_AlreadyHasOwnUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
foundp: *mut bool) -> bool;
#[link_name =
"_Z16JS_HasUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjPb"]
pub fn JS_HasUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t, vp: *mut bool)
-> bool;
#[link_name =
"_Z16JS_GetUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjNS1_13MutableHandleINS1_5ValueEEE"]
pub fn JS_GetUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t,
vp: MutableHandleValue) -> bool;
#[link_name =
"_Z16JS_SetUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjNS2_INS1_5ValueEEE"]
pub fn JS_SetUCProperty(cx: *mut JSContext, obj: HandleObject,
name: *const u16, namelen: size_t, v: HandleValue)
-> bool;
#[link_name =
"_Z19JS_DeleteUCPropertyP9JSContextN2JS6HandleIP8JSObjectEEPKDsjRNS1_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_NewArrayObjectP9JSContextj"]
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_NewArrayBufferWithContentsP9JSContextjPv"]
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_NewMappedArrayBufferWithContentsP9JSContextjPv"]
pub fn JS_NewMappedArrayBufferWithContents(cx: *mut JSContext,
nbytes: size_t,
contents: *mut ::libc::c_void)
-> *mut JSObject;
#[link_name = "_Z34JS_CreateMappedArrayBufferContentsijj"]
pub fn JS_CreateMappedArrayBufferContents(fd: i32, offset: size_t,
length: size_t)
-> *mut ::libc::c_void;
#[link_name = "_Z35JS_ReleaseMappedArrayBufferContentsPvj"]
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_DefineUCFunctionP9JSContextN2JS6HandleIP8JSObjectEEPKDsjPFbS0_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_BufferIsCompilableUnitP9JSContextN2JS6HandleIP8JSObjectEEPKcj"]
pub fn JS_BufferIsCompilableUnit(cx: *mut JSContext,
obj: Handle<*mut JSObject>,
utf8: *const ::libc::c_char,
length: size_t) -> bool;
#[link_name =
"_Z16JS_CompileScriptP9JSContextPKcjRKN2JS14CompileOptionsENS3_13MutableHandleIP8JSScriptEE"]
pub fn JS_CompileScript(cx: *mut JSContext, ascii: *const ::libc::c_char,
length: size_t, options: &CompileOptions,
script: MutableHandleScript) -> bool;
#[link_name =
"_Z18JS_CompileUCScriptP9JSContextPKDsjRKN2JS14CompileOptionsENS3_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_22ReadOnlyCompileOptionsEPKcjNS_13MutableHandleIP8JSScriptEE"]
pub fn Compile1(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
bytes: *const ::libc::c_char, length: size_t,
script: MutableHandleScript) -> bool;
#[link_name =
"_ZN2JS7CompileEP9JSContextRKNS_22ReadOnlyCompileOptionsEPKDsjNS_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_22ReadOnlyCompileOptionsEj"]
pub fn CanCompileOffThread(cx: *mut JSContext,
options: &ReadOnlyCompileOptions,
length: size_t) -> bool;
#[link_name =
"_ZN2JS16CompileOffThreadEP9JSContextRKNS_22ReadOnlyCompileOptionsEPKDsjPFvPvS7_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_PKDsjNS_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_jNS_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_22ReadOnlyCompileOptionsEPKDsjNS_13MutableHandleINS_5ValueEEE"]
pub fn Evaluate2(cx: *mut JSContext, options: &ReadOnlyCompileOptions,
chars: *const u16, length: size_t,
rval: MutableHandleValue) -> bool;
#[link_name =
"_ZN2JS8EvaluateEP9JSContextRNS_16AutoObjectVectorERKNS_22ReadOnlyCompileOptionsEPKDsjNS_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_22ReadOnlyCompileOptionsEPKcjNS_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_NewStringCopyNP9JSContextPKcj"]
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_InternStringNP9JSContextPKcj"]
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_NewUCStringP9JSContextPDsj"]
pub fn JS_NewUCString(cx: *mut JSContext, chars: *mut u16, length: size_t)
-> *mut JSString;
#[link_name = "_Z19JS_NewUCStringCopyNP9JSContextPKDsj"]
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_InternUCStringNP9JSContextPKDsj"]
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_PutEscapedStringP9JSContextPcjP8JSStringc"]
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_GetLatin1StringCharsAndLengthP9JSContextRKN2JS17AutoCheckCannotGCEP8JSStringPj"]
pub fn JS_GetLatin1StringCharsAndLength(cx: *mut JSContext,
nogc: &AutoCheckCannotGC,
str: *mut JSString,
length: *mut size_t)
-> *const Latin1Char;
#[link_name =
"_Z33JS_GetTwoByteStringCharsAndLengthP9JSContextRKN2JS17AutoCheckCannotGCEP8JSStringPj"]
pub fn JS_GetTwoByteStringCharsAndLength(cx: *mut JSContext,
nogc: &AutoCheckCannotGC,
str: *mut JSString,
length: *mut size_t)
-> *const u16;
#[link_name = "_Z18JS_GetStringCharAtP9JSContextP8JSStringjPDs"]
pub fn JS_GetStringCharAt(cx: *mut JSContext, str: *mut JSString,
index: size_t, res: *mut u16) -> bool;
#[link_name = "_Z22JS_GetFlatStringCharAtP12JSFlatStringj"]
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_PutEscapedFlatStringPcjP12JSFlatStringc"]
pub fn JS_PutEscapedFlatString(buffer: *mut ::libc::c_char, size: size_t,
str: *mut JSFlatString,
quote: ::libc::c_char) -> size_t;
#[link_name =
"_Z21JS_NewDependentStringP9JSContextN2JS6HandleIP8JSStringEEjj"]
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_DecodeBytesP9JSContextPKcjPDsPj"]
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_EncodeStringToBufferP9JSContextP8JSStringPcj"]
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 = "_ZN2JS24PropertySpecNameIsSymbolEPKc"]
pub fn PropertySpecNameIsSymbol(name: *const ::libc::c_char) -> bool;
#[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_jPc"]
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_NewRegExpObjectP9JSContextN2JS6HandleIP8JSObjectEEPKcjj"]
pub fn JS_NewRegExpObject(cx: *mut JSContext, obj: HandleObject,
bytes: *const ::libc::c_char, length: size_t,
flags: u32) -> *mut JSObject;
#[link_name =
"_Z20JS_NewUCRegExpObjectP9JSContextN2JS6HandleIP8JSObjectEEPKDsjj"]
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_PDsjPjbNS1_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_NewRegExpObjectNoStaticsP9JSContextPcjj"]
pub fn JS_NewRegExpObjectNoStatics(cx: *mut JSContext,
bytes: *mut ::libc::c_char,
length: size_t, flags: u32)
-> *mut JSObject;
#[link_name = "_Z29JS_NewUCRegExpObjectNoStaticsP9JSContextPDsjj"]
pub fn JS_NewUCRegExpObjectNoStatics(cx: *mut JSContext, chars: *mut u16,
length: size_t, flags: u32)
-> *mut JSObject;
#[link_name =
"_Z25JS_ExecuteRegExpNoStaticsP9JSContextN2JS6HandleIP8JSObjectEEPDsjPjbNS1_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_IsIdentifierPKDsj"]
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 =
"_ZN2JS6detail19CallMethodIfWrappedEP9JSContextPFbNS_6HandleINS_5ValueEEEEPFbS2_NS_8CallArgsEES8_"]
pub fn CallMethodIfWrapped(cx: *mut JSContext, test: IsAcceptableThis,
_impl: NativeImpl, args: CallArgs) -> bool;
#[link_name =
"_ZN2JS20CallNonGenericMethodEP9JSContextPFbNS_6HandleINS_5ValueEEEEPFbS1_NS_8CallArgsEES7_"]
pub fn CallNonGenericMethod(cx: *mut JSContext, Test: IsAcceptableThis,
Impl: NativeImpl, args: CallArgs) -> 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 ObjectClassIs1(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 = "_ZN2js9DumpCharsEPKDsj"]
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 =
"_ZN2js13SetSourceHookEP9JSRuntimeN7mozilla9UniquePtrINS_10SourceHookENS2_13DefaultDeleteIS4_EEEE"]
pub fn SetSourceHook(rt: *mut JSRuntime,
hook:
UniquePtr<SourceHook,
DefaultDelete<SourceHook>>);
#[link_name = "_ZN2js16ForgetSourceHookEP9JSRuntime"]
pub fn ForgetSourceHook(rt: *mut JSRuntime)
-> UniquePtr<SourceHook, DefaultDelete<SourceHook>>;
#[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 = "_ZN2js14GetObjectClassEP8JSObject"]
pub fn GetObjectClass(obj: *mut JSObject) -> *const Class;
#[link_name = "_ZN2js16GetObjectJSClassEP8JSObject"]
pub fn GetObjectJSClass(obj: *mut JSObject) -> *const JSClass;
#[link_name = "_ZN2js15ProtoKeyToClassE10JSProtoKey"]
pub fn ProtoKeyToClass(key: JSProtoKey) -> *const Class;
#[link_name = "_ZN2js24StandardClassIsDependentE10JSProtoKey"]
pub fn StandardClassIsDependent(key: JSProtoKey) -> bool;
#[link_name = "_ZN2js25ParentKeyForStandardClassE10JSProtoKey"]
pub fn ParentKeyForStandardClass(key: JSProtoKey) -> JSProtoKey;
#[link_name = "_ZN2js13IsInnerObjectEP8JSObject"]
pub fn IsInnerObject(obj: *mut JSObject) -> bool;
#[link_name = "_ZN2js13IsOuterObjectEP8JSObject"]
pub fn IsOuterObject(obj: *mut JSObject) -> bool;
#[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 = "_ZN2js25GetFunctionNativeReservedEP8JSObjectj"]
pub fn GetFunctionNativeReserved(fun: *mut JSObject, which: size_t)
-> *const Value;
#[link_name =
"_ZN2js25SetFunctionNativeReservedEP8JSObjectjRKN2JS5ValueE"]
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 = "_ZN2js16GetObjectPrivateEP8JSObject"]
pub fn GetObjectPrivate(obj: *mut JSObject) -> *mut ::libc::c_void;
#[link_name = "_ZN2js15GetReservedSlotEP8JSObjectj"]
pub fn GetReservedSlot(obj: *mut JSObject, slot: size_t) -> *const Value;
#[link_name =
"_ZN2js40SetReservedOrProxyPrivateSlotWithBarrierEP8JSObjectjRKN2JS5ValueE"]
pub fn SetReservedOrProxyPrivateSlotWithBarrier(obj: *mut JSObject,
slot: size_t,
value: &Value);
#[link_name = "_ZN2js15SetReservedSlotEP8JSObjectjRKN2JS5ValueE"]
pub fn SetReservedSlot(obj: *mut JSObject, slot: size_t, value: &Value);
#[link_name = "_ZN2js17GetObjectSlotSpanEP8JSObject"]
pub fn GetObjectSlotSpan(obj: *mut JSObject) -> u32;
#[link_name = "_ZN2js13GetObjectSlotEP8JSObjectj"]
pub fn GetObjectSlot(obj: *mut JSObject, slot: size_t) -> *const Value;
#[link_name = "_ZN2js13GetAtomLengthEP6JSAtom"]
pub fn GetAtomLength(atom: *mut JSAtom) -> size_t;
#[link_name = "_ZN2js15GetStringLengthEP8JSString"]
pub fn GetStringLength(s: *mut JSString) -> size_t;
#[link_name = "_ZN2js19GetFlatStringLengthEP12JSFlatString"]
pub fn GetFlatStringLength(s: *mut JSFlatString) -> size_t;
#[link_name = "_ZN2js21GetLinearStringLengthEP14JSLinearString"]
pub fn GetLinearStringLength(s: *mut JSLinearString) -> size_t;
#[link_name = "_ZN2js26LinearStringHasLatin1CharsEP14JSLinearString"]
pub fn LinearStringHasLatin1Chars(s: *mut JSLinearString) -> bool;
#[link_name = "_ZN2js18AtomHasLatin1CharsEP6JSAtom"]
pub fn AtomHasLatin1Chars(atom: *mut JSAtom) -> bool;
#[link_name = "_ZN2js20StringHasLatin1CharsEP8JSString"]
pub fn StringHasLatin1Chars(s: *mut JSString) -> bool;
#[link_name =
"_ZN2js26GetLatin1LinearStringCharsERKN2JS17AutoCheckCannotGCEP14JSLinearString"]
pub fn GetLatin1LinearStringChars(nogc: &AutoCheckCannotGC,
linear: *mut JSLinearString)
-> *const Latin1Char;
#[link_name =
"_ZN2js27GetTwoByteLinearStringCharsERKN2JS17AutoCheckCannotGCEP14JSLinearString"]
pub fn GetTwoByteLinearStringChars(nogc: &AutoCheckCannotGC,
linear: *mut JSLinearString)
-> *const u16;
#[link_name = "_ZN2js18AtomToLinearStringEP6JSAtom"]
pub fn AtomToLinearString(atom: *mut JSAtom) -> *mut JSLinearString;
#[link_name = "_ZN2js24FlatStringToLinearStringEP12JSFlatString"]
pub fn FlatStringToLinearString(s: *mut JSFlatString)
-> *mut JSLinearString;
#[link_name =
"_ZN2js18GetLatin1AtomCharsERKN2JS17AutoCheckCannotGCEP6JSAtom"]
pub fn GetLatin1AtomChars(nogc: &AutoCheckCannotGC, atom: *mut JSAtom)
-> *const Latin1Char;
#[link_name =
"_ZN2js19GetTwoByteAtomCharsERKN2JS17AutoCheckCannotGCEP6JSAtom"]
pub fn GetTwoByteAtomChars(nogc: &AutoCheckCannotGC, atom: *mut JSAtom)
-> *const u16;
#[link_name = "_ZN2js24StringToLinearStringSlowEP9JSContextP8JSString"]
pub fn StringToLinearStringSlow(cx: *mut JSContext, str: *mut JSString)
-> *mut JSLinearString;
#[link_name = "_ZN2js20StringToLinearStringEP9JSContextP8JSString"]
pub fn StringToLinearString(cx: *mut JSContext, str: *mut JSString)
-> *mut JSLinearString;
#[link_name = "_ZN2js21CopyLinearStringCharsEPDsP14JSLinearStringj"]
pub fn CopyLinearStringChars(dest: *mut u16, s: *mut JSLinearString,
len: size_t);
#[link_name = "_ZN2js15CopyStringCharsEP9JSContextPDsP8JSStringj"]
pub fn CopyStringChars(cx: *mut JSContext, dest: *mut u16,
s: *mut JSString, len: size_t) -> bool;
#[link_name = "_ZN2js19CopyFlatStringCharsEPDsP12JSFlatStringj"]
pub fn CopyFlatStringChars(dest: *mut u16, s: *mut JSFlatString,
len: size_t);
#[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 = "_ZN2js19GetNativeStackLimitEP9JSContextNS_9StackKindEi"]
pub fn GetNativeStackLimit(cx: *mut JSContext, kind: StackKind,
extraAllowance: i32) -> uintptr_t;
#[link_name = "_ZN2js19GetNativeStackLimitEP9JSContexti"]
pub fn GetNativeStackLimit1(cx: *mut JSContext, extraAllowance: i32)
-> uintptr_t;
#[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 = "_ZN2js23GetPCCountScriptSummaryEP9JSContextj"]
pub fn GetPCCountScriptSummary(cx: *mut JSContext, script: size_t)
-> *mut JSString;
#[link_name = "_ZN2js24GetPCCountScriptContentsEP9JSContextj"]
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 = "_ZN2js14CastToJSFreeOpEPNS_6FreeOpE"]
pub fn CastToJSFreeOp(fop: *mut FreeOp) -> *mut JSFreeOp;
#[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 = "_ZN2js24GetDOMProxyHandlerFamilyEv"]
pub fn GetDOMProxyHandlerFamily() -> *const ::libc::c_void;
#[link_name = "_ZN2js22GetDOMProxyExpandoSlotEv"]
pub fn GetDOMProxyExpandoSlot() -> u32;
#[link_name = "_ZN2js23GetDOMProxyShadowsCheckEv"]
pub fn GetDOMProxyShadowsCheck() -> DOMProxyShadowsCheck;
#[link_name = "_ZN2js19DOMProxyIsShadowingENS_21DOMProxyShadowsResultE"]
pub fn DOMProxyIsShadowing(result: DOMProxyShadowsResult) -> bool;
#[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 = "_ZN2js25GetInt8ArrayLengthAndDataEP8JSObjectPjPPa"]
pub fn GetInt8ArrayLengthAndData(obj: *mut JSObject, length: *mut u32,
data: *mut *mut i8);
#[link_name = "_ZN2js26GetUint8ArrayLengthAndDataEP8JSObjectPjPPh"]
pub fn GetUint8ArrayLengthAndData(obj: *mut JSObject, length: *mut u32,
data: *mut *mut u8);
#[link_name = "_ZN2js33GetUint8ClampedArrayLengthAndDataEP8JSObjectPjPPh"]
pub fn GetUint8ClampedArrayLengthAndData(obj: *mut JSObject,
length: *mut u32,
data: *mut *mut u8);
#[link_name = "_ZN2js26GetInt16ArrayLengthAndDataEP8JSObjectPjPPs"]
pub fn GetInt16ArrayLengthAndData(obj: *mut JSObject, length: *mut u32,
data: *mut *mut i16);
#[link_name = "_ZN2js27GetUint16ArrayLengthAndDataEP8JSObjectPjPPt"]
pub fn GetUint16ArrayLengthAndData(obj: *mut JSObject, length: *mut u32,
data: *mut *mut u16);
#[link_name = "_ZN2js26GetInt32ArrayLengthAndDataEP8JSObjectPjPPi"]
pub fn GetInt32ArrayLengthAndData(obj: *mut JSObject, length: *mut u32,
data: *mut *mut i32);
#[link_name = "_ZN2js27GetUint32ArrayLengthAndDataEP8JSObjectPjPS2_"]
pub fn GetUint32ArrayLengthAndData(obj: *mut JSObject, length: *mut u32,
data: *mut *mut u32);
#[link_name = "_ZN2js28GetFloat32ArrayLengthAndDataEP8JSObjectPjPPf"]
pub fn GetFloat32ArrayLengthAndData(obj: *mut JSObject, length: *mut u32,
data: *mut *mut f32);
#[link_name = "_ZN2js28GetFloat64ArrayLengthAndDataEP8JSObjectPjPPd"]
pub fn GetFloat64ArrayLengthAndData(obj: *mut JSObject, length: *mut u32,
data: *mut *mut f64);
#[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 = "_ZN2js6detail13IdMatchesAtomE4jsidP6JSAtom"]
pub fn IdMatchesAtom(id: jsid, atom: *mut JSAtom) -> 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 = "_ZN2js24Debug_SetActiveJSContextEP9JSRuntimeP9JSContext"]
pub fn Debug_SetActiveJSContext(rt: *mut JSRuntime, cx: *mut JSContext);
#[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