Search completed in 1.14 seconds.
JS::HandleValueArray
This article covers features introduced in SpiderMonkey 31 A handle to an array of rooted values. Syntax
JS::HandleValueArray(const JS::RootedValue& value);
JS::HandleValueArray(const JS::AutoValueVector& values);
JS::HandleValueArray(const JS::AutoValueArray<N>& values);
JS::HandleValueArray(const JS::CallArgs& args);
JS::HandleValueArray::fromMarkedLocation(size_t len, const JS::Value *elements);
JS::HandleValueArray::subarray(const
JS::HandleValueArray& values, size_t startIndex, size_t len);
JS::HandleValueArray::empty(); Name Type Description value JS::RootedValue & An element of newly created 1-length array. values JS::AutoValueVector & Elements of newly created array. values JS::AutoValue...
...::AutoValueArray & Elements of newly created array. args JS::CallArgs & Elements of newly created array. len size_t (fromMarkedLocation only) Length of elements array or (subarray only) Length of sub array of values. elements JS::Value * (fromMarkedLocation only) A pointer to the first element of an array of JS::Value. ...
... values
JS::HandleValueArray (subarray only) An array to get sub array. startIndex size_t (subarray only) An index of the first element of subarray of values. Methods Method Description size_t length() const Returns the length of the array. const Value *begin() const Returns the pointer to the first element of the array.
JS::HandleValue operator[](size_t i) const Returns i-th element of the array. Description
JS::HandleValueArray is a handle to an array of rooted values. This is useful as a parameter type, or a temporal local variable for it. ...
...rns the length of the array. const Value *begin() const Returns the pointer to the first element of the array.
JS::HandleValue operator[](size_t i) const Returns i-th element of the array. Description
JS::HandleValueArray is a handle to an array of rooted values. This is useful as a parameter type, or a temporal local variable for it. ...
JS::Call
This article covers features introduced in SpiderMonkey 17 Call a specified JS function. ...
... This article covers features introduced in SpiderMonkey 17 Call a specified JS function. ...
...7 Call a specified JS function. ...
...And 3 more matches
Index
SAPI Reference, Reference, Reference(2), SpiderMonkey JS::AutoSaveExceptionState saves and later restores the current exception state of a given JSContext. 25 JS::AutoValueArray JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::AutoValueArray<N> holds a rooted array of JS::Value. This is typically used for local variables being passed to function which requires
JS::HandleValueArray or a pointer to JS::Value array. 26 JS::AutoVectorRooter JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::AutoVectorRooter<T> holds a variable-size rooted array of type T. 27 JS::BooleanValue JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::BooleanValue converts a C boolean of type bool to JS::Value, the type of JavaScript values.
...e method to JSType. 46 JS::GetSelfHostedFunction JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::GetSelfHostedFunction creates a new JavaScript function implemented in self-hosted JavaScript. 47 JS::Handle JSAPI Reference, Reference, Reference(2), SpiderMonkey Here, ptr represents the private member of JS::Handle<T>, typed with T. 48
JS::HandleValueArray JSAPI Reference, Reference, Reference(2), SpiderMonkey
JS::HandleValueArray is a handle to an array of rooted values. This is useful as a parameter type, or a temporal local variable for it. 49 JS::IdentifyStandardInstance JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::IdentifyStandardInstance determines if the given object is an instance for a stan...
... 53 JS::NewFunctionFromSpec JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::NewFunctionFromSpec creates a new function based on the given JSFunctionSpec, *fs. id is the result of a successful call to PropertySpecNameToPermanentId(cx, fs->name, &id). 54 JS::NullHandleValue JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::NullHandleValue is a
JS::HandleValue constant that represents the JavaScript value null. 55 JS::NullValue JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::NullValue creates a JS::Value that represents the JavaScript value null. 56 JS::NumberValue JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::NumberValue converts a C integer or floating-point value to JS::Value, the typ...
...And 2 more matches
JS_CallFunction
Calls a specified JS function. ...
... Calls a specified JS function. ...
..._CallFunction(JSContext *cx, JS::HandleObject obj, JS::HandleFunction fun, const
JS::HandleValueArray& args, JS::MutableHandleValue rval); bool JS_CallFunctionName(JSContext *cx, JS::HandleObject obj, const char *name, const
JS::HandleValueArray& args, JS::MutableHandleValue rval); bool JS_CallFunctionValue(JSContext *cx, JS::HandleObject obj,
JS::HandleValue fval, const
JS::HandleValueArray& args, JS::MutableHandleValue rval); /* Obsolete since JSAPI 30 */ bool JS_CallFunction(JSContext *cx, JSObject *obj, JSFunction *fun, unsigned argc, jsval *argv, jsval *rval); bool JS_CallFunctionName(JSContext *cx, JSObject *obj, const char *name, unsigned argc, jsval *argv, jsval *rval); bool JS_CallF...
...is JSContext. obj JS::HandleObject The "current" object on which the function operates; the object specified here is "this" when the function executes. fun JS::HandleFunction Pointer to the function to call. fun should be a native function or JSAPI-compiled function. See below. name const char * Pointer to the name of function to call. fval
JS::HandleValue Pointer to the function value to call. args const
JS::HandleValueArray & Reference to the array of argument values to pass to the function. Added in SpiderMonkey 31 argc unsigned Number of arguments you are passing to the function. Obsolete since JSAPI 30 argv jsval * Pointer to the array of argument values to pass to the function. Obsolete sinc...
JS_DefineProperty
Create a new property on an object. ...
...ttrs, JSNative getter = nullptr, JSNative setter = nullptr); bool JS_DefineProperty(JSContext *cx, JS::HandleObject obj, const char *name, double value, unsigned attrs, JSNative getter = nullptr, JSNative setter = nullptr); bool JS_DefineUCProperty(JSContext *cx, JS::HandleObject obj, const char16_t *name, size_t namelen,
JS::HandleValue value, unsigned attrs, JSNative getter = nullptr, JSNative setter = nullptr); bool JS_DefineUCProperty(JSContext *cx, JS::HandleObject obj, const char16_t *name, size_t namelen, JS::HandleObject value, unsigned attrs, JSNative getter = nullptr, JSNative setter = nullptr); bool JS_DefineUCProperty(JSContext *cx, JS::HandleObject obj, co...
...Context *cx, JS::HandleObject obj, JS::HandleId id, JS::Handle<JSPropertyDescriptor> desc); bool JS_DefineUCProperty(JSContext *cx, JS::HandleObject obj, const char16_t *name, size_t namelen, JS::Handle<JSPropertyDescriptor> desc); // ---- Added in SpiderMonkey 1.8.1 ---- bool JS_DefinePropertyById(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
JS::HandleValue value, unsigned attrs, JSNative getter = nullptr, JSNative setter = nullptr); bool JS_DefinePropertyById(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::HandleObject value, unsigned attrs, JSNative getter = nullptr, JSNative setter = nullptr); bool JS_DefinePropertyById(JSContext *cx, JS::HandleObj...
...r must be in a request on this JSContext. obj JS::HandleObject The object on which to create the new property. name or id const char * or const char16_t *or JS::HandleId The name of the new property. namelen size_t (only in JS_DefineUCProperty) The length of name, in characters; or (size_t) -1 to indicate that name is null-terminated. value
JS::HandleValue or JS::HandleObject or JS::HandleString or int32_t or uint32_t or double Initial stored value for the new property. getter JSNative The property getter callback, which the JavaScript engine will call each time the property's value is accessed; or NULL. setter JSNative The property setter callback, which the JavaScript engine will call each time the property is ass...
JS_IsArrayObject
obj JS::HandleObject The object to examine. isArray bool Whether the value/object is an array. ...
... obj JS::HandleObject The object to examine. isArray bool Whether the value/object is an array. ...
... obj JS::HandleObject The object to examine. isArray bool Whether the value/object is an array. Description JS_IsArrayObject determines if a specified object, obj or value, is an Array object. On success, returns true and sets isArray indicating whether obj is an Array object or a wrapper around one. ...
JS::AutoValueArray
me Type Description cx JSContext * The context in which to add the root. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. N size_t Size of a JS::Value array. Description JS::AutoValueArray<N> holds a rooted array of JS::Value. This is typically used for local variables being passed to function which requires
JS::HandleValueArray or a pointer to JS::Value array. Examples Pass to function as a pointer to JS::Value. bool someFunction1(JSContext *cx, unsigned argc, const JS::Value *argv) { /* ... */ } JS::AutoValueArray<2> args(cx); /* ... Initialize args[0] and args[1] here ... */ someFunction1(cx, 2, args.begin()); Pass to function as
JS::HandleValueArray. bool someFunction2(JSContext *cx, const JS::HandleVal...
...<2> args(cx); /* ... Initialize args[0] and args[1] here ... */ someFunction1(cx, 2, args.begin()); Pass to function as
JS::HandleValueArray. bool someFunction2(JSContext *cx, const
JS::HandleValueArray &args) { /* ... */ } JS::AutoValueArray<2> args(cx); /* ... Initialize args[0] and args[1] here ... ...
JS::CallArgs
igned required) Returns true if there are at least required arguments passed in. If false, it reports an error message on the context. Methods inherited from JS::CallArgsBase Method Description unsigned length() const Returns the number of arguments.. JS::MutableHandleValue operator[](unsigned i) const Returns the i-th zero-indexed argument.
JS::HandleValue get(unsigned i) const Returns the i-th zero-indexed argument, or undefined if there's no such argument. bool hasDefined(unsigned i) const Returns true if the i-th zero-indexed argument is present and is not undefined. Methods inherited from JS::detail::CallReceiverBase Method Description JSObject &callee() const Returns the function being called, as ...
...r undefined if there's no such argument. bool hasDefined(unsigned i) const Returns true if the i-th zero-indexed argument is present and is not undefined. Methods inherited from JS::detail::CallReceiverBase Method Description JSObject &callee() const Returns the function being called, as an object. Must not be called after rval() has been used!
JS::HandleValue calleev() const Returns the function being called, as a value. Must not be called after rval() has been used!
JS::HandleValue thisv() const Returns the this value passed to the function. This method must not be called when the function is being called as a constructor via new. The value may or may not be an object: it is the individual function's responsibility to box the value if ...
JS::ToBoolean
Description JS::ToBoolean converts a JavaScript value to a boolean. ...
... Description JS::ToBoolean converts a JavaScript value to a boolean. ...
JS::ToInt32
out int32_t * Out parameter. On success, *out receives the converted floating-point value. ...
... out int32_t * Out parameter. On success, *out receives the converted floating-point value. Description JS::ToInt32 converts a JavaScript value to a signed 32bit integer. ...
JS::ToInt64
out int64_t * Out parameter. On success, *out receives the converted floating-point value. ...
... out int64_t * Out parameter. On success, *out receives the converted floating-point value. Description JS::ToInt64 converts a JavaScript value to a signed 64bit integer. ...
JS::ToNumber
out double * Out parameter. On success, *out receives the converted floating-point value. Description JS::ToNumber converts a JavaScript value to a number. ...
... out double * Out parameter. On success, *out receives the converted floating-point value. Description JS::ToNumber converts a JavaScript value to a number. ...
JS::ToUint16
out uint16_t * Out parameter. On success, *out receives the converted floating-point value. ...
... out uint16_t * Out parameter. On success, *out receives the converted floating-point value. Description JS::ToInt16 converts a JavaScript value to an unsigned 16bit integer. ...
JS::ToUint32
out int32_t * Out parameter. On success, *out receives the converted floating-point value. ...
... out int32_t * Out parameter. On success, *out receives the converted floating-point value. Description JS::ToUint32 converts a JavaScript value to an unsigned 32bit integer. ...
JS::ToUint64
out uint64_t * Out parameter. On success, *out receives the converted floating-point value. ...
... out uint64_t * Out parameter. On success, *out receives the converted floating-point value. Description JS::ToInt64 converts a JavaScript value to an unsigned 64bit integer. ...
JS_DefineElement
Creates a numeric property on a specified object. ...
...rs); Name Type Description cx JSContext * The context in which to create the new property. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. obj JS::HandleObject or JSObject * The object on which to create the new property. index uint32_t The index of the property to define. value
JS::HandleValue or JS::HandleObject or JS::HandleString or int32_t or uint32_t or double or jsval Initial value to assign to the property. getter JSNative or JSPropertyOp getProperty method for retrieving the current property value. setter JSNative or JSStrictPropertyOp setProperty method for specifying a new property value. flags unsigned Property attributes. Ob...
JS_SetElement
Assign a value to a numeric property of an object. ...
...JS::MutableHandleValue vp); Name Type Description cx JSContext * The context in which to set the element. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. obj JS::HandleObject The object to modify, commonly an Array object. index uint32_t Index number of the element to set. v
JS::HandleValue or JS::HandleObject or JS::HandleString or int32_t or uint32_t or double The value to assign to the element. Added in SpiderMonkey 31 vp JS::MutableHandleValue In/out parameter. *vp is the value to assign to the element. JS_SetElement ordinarily leaves *vp unchanged, but a JSClass.addProperty hook or non-default setter may modify it. Obsolete since JSAPI 29 Description JS...
JS_SetPendingException
Description JS_SetPendingException sets the current exception being thrown within a context. If an exception is already being thrown, it is replaced with the new one given. v is the new value to throw as an exception. ...
... Description JS_SetPendingException sets the current exception being thrown within a context. If an exception is already being thrown, it is replaced with the new one given. v is the new value to throw as an exception. ...
JS_SetProperty
Assign a value to a property of an object. Syntax bool JS_SetProperty(JSContext *cx, JS::HandleObject obj, const char *name,
JS::HandleValue v); bool JS_SetUCProperty(JSContext *cx, JS::HandleObject obj, const char16_t *name, size_t namelen,
JS::HandleValue v); bool JS_SetPropertyById(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
JS::HandleValue v); // Added in SpiderMonkey 1.8.1 Name Type Description cx JSContext * Pointer to a JS context from which to derive runtime information. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. obj
JS::HandleValue Object to which the property to set belongs. name or id const char * or ...
...*vp is the value to assign to the property. Ordinarily this function leaves v unchanged, but it is possible for a JSClass.addProperty hook or a non-default setter to assign to v. Description JS_SetProperty assigns the value v to the property name of the object obj. ...
JS_ValueToFunction
Description JS_ValueToFunction converts a specified JavaScript value, v, to a function. JS_ValueToConstructor is the exactly same function as JS_ValueToFunction. ...
... Description JS_ValueToFunction converts a specified JavaScript value, v, to a function. JS_ValueToConstructor is the exactly same function as JS_ValueToFunction. ...
JS_ValueToObject
objp JS::MutableHandleObject Out parameter. On success, *objp receives NULL or a pointer to the resulting object. Description JS_ValueToObject converts a specified JavaScript value, v, to an object. ...
... objp JS::MutableHandleObject Out parameter. On success, *objp receives NULL or a pointer to the resulting object. Description JS_ValueToObject converts a specified JavaScript value, v, to an object. ...
JSAPI reference
edValue Added in SpiderMonkey 17 class JS::Handle<T> Added in SpiderMonkey 17 class JS::HandleFunction Added in SpiderMonkey 17 class JS::HandleId Added in SpiderMonkey 17 class JS::HandleObject Added in SpiderMonkey 17 class JS::HandleScript Added in SpiderMonkey 17 class JS::HandleString Added in SpiderMonkey 17 class JS::HandleSymbol Added in SpiderMonkey 38 class
JS::HandleValue Added in SpiderMonkey 17 class JS::MutableHandle<T> Added in SpiderMonkey 17 class JS::MutableHandleFunction Added in SpiderMonkey 17 class JS::MutableHandleId Added in SpiderMonkey 17 class JS::MutableHandleObject Added in SpiderMonkey 17 class JS::MutableHandleScript Added in SpiderMonkey 17 class JS::MutableHandleString Added in SpiderMonkey 17 class JS::MutableHandl...
... class JS::AutoValueArray<N> Added in SpiderMonkey 31 class JS::AutoVectorRooter<T> Added in SpiderMonkey 17 class JS::AutoValueVector Added in SpiderMonkey 17 class JS::AutoIdVector Added in SpiderMonkey 17 class JS::AutoObjectVector Added in SpiderMonkey 24 class JS::AutoFunctionVector Added in SpiderMonkey 31 class JS::AutoScriptVector Added in SpiderMonkey 17 class
JS::HandleValueArray Added in SpiderMonkey 31 JS::Add*Root Added in SpiderMonkey 31 Obsolete since JSAPI 38 JS::AddValueRoot Added in SpiderMonkey 31 Obsolete since JSAPI 38 JS::AddStringRoot Added in SpiderMonkey 31 Obsolete since JSAPI 38 JS::AddObjectRoot Added in SpiderMonkey 31 Obsolete since JSAPI 38 JS::AddNamedValueRoot Added in SpiderMonkey 31 Obsolete since JSAPI 38 JS::AddNamedV...
GC Rooting Guide
ugh it only costs a few cycles). Thus, it makes more sense to only root the GC thing once and reuse it through an indirect reference. Like a reference, a JS::Handle is immutable: it can only ever refer to the JS::Rooted<T> that it was created for. Similarly to JS::Rooted<T>, there are typedefs available for the main types: Template class Typedef JS::Handle<JS::Value>
JS::HandleValue JS::Handle<JSObject*> JS::HandleObject JS::Handle<JSString*> JS::HandleString JS::Handle<JSScript*> JS::HandleScript JS::Handle<jsid> JS::HandleId You should use JS::Handle<T> for all function parameters taking GC thing pointers (except out-parameters, which are described below). For example, instead of: JSObject * someFunction(JSContext *c...
JS::Construct
This article covers features introduced in SpiderMonkey 38 Call a specified JS constructor. Syntax bool JS::Construct(JSContext *cx,
JS::HandleValue fun, const
JS::HandleValueArray& args, JS::MutableHandleValue rval); Name Type Description cx JSContext * Pointer to a JS context from which to derive runtime information. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. fun
JS::HandleValue Pointer to the function to call. Should be a native function or JSAPI-compiled function.. args
JS::HandleValueArray & Arguments you are passing to the function. rval JS::MutableHandleValue Out parameter. On success, *rval receives the newly created obje...
JS::Handle
dleString; typedef Handle<JS::Symbol*> HandleSymbol; // Added in SpiderMonkey 38 typedef Handle<Value> HandleValue; } See Also MXR ID Search for JS::Handle MXR ID Search for JS::HandleFunction MXR ID Search for JS::HandleId MXR ID Search for JS::HandleObject MXR ID Search for JS::HandleScript MXR ID Search for JS::HandleString MXR ID Search for JS::HandleSymbol MXR ID Search for
JS::HandleValue JS::Rooted JS::MutableHandle GC Rooting Guide bug 714647 bug 761391 - added JS::HandleScript bug 645416 - added JS::HandleSymbol ...
JS::NullHandleValue
This article covers features introduced in SpiderMonkey 24 The JS::Value that represents the JavaScript value null. Syntax const
JS::HandleValue JS::NullHandleValue; Description JS::NullHandleValue is a
JS::HandleValue constant that represents the JavaScript value null. See Also MXR ID Search for JS::NullHandleValue JS::UndefinedHandleValue JS::TrueHandleValue JS::FalseHandleValue bug 865969 ...
JS::ToString
This article covers features introduced in SpiderMonkey 31 Convert any JavaScript value to a string. Syntax #include "js/Conversions.h" // as of SpiderMonkey 38; previously in jsapi.h JSString* JS::ToString(JSContext *cx,
JS::HandleValue v) Name Type Description cx JSContext * The context in which to perform the conversion. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. v
JS::HandleValue The value to convert. Description JS::ToString returns a string representation of a JavaScript value. If v.isString() is true, it calls v.toString(). Otherwise, it converts the value to string. On success, JS::ToString returns a JSString instance. On error or exception, it returns nullptr. See Also MX...
JS::TrueHandleValue
This article covers features introduced in SpiderMonkey 38 The JS::Value that represents the JavaScript value true. Syntax const
JS::HandleValue JS::TrueHandleValue; const
JS::HandleValue JS::FalseHandleValue; Description JS::TrueHandleValue and JS::FalseHandleValue are
JS::HandleValue constants that represent the JavaScript values true and false. See Also MXR ID Search for JS::TrueHandleValue MXR ID Search for JS::FalseHandleValue JS::NullHandleValue JS::UndefinedHandleValue bug 959787 ...
JS::UndefinedHandleValue
This article covers features introduced in SpiderMonkey 24 The JS::Value that represents the JavaScript value undefined. Syntax const
JS::HandleValue JS::UndefinedHandleValue; Description JS::UndefinedHandleValue is a
JS::HandleValue constant that represents the JavaScript value undefined. See Also MXR ID Search for JS::UndefinedHandleValue JS::NullHandleValue JS::TrueHandleValue JS::FalseHandleValue bug 865969 ...
JS_ConvertValue
Obsolete since JSAPI 38This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Converts a JavaScript value to a value of a specific JavaScript type. Syntax bool JS_ConvertValue(JSContext *cx,
JS::HandleValue v, JSType type, JS::MutableHandleValue vp); Name Type Description cx JSContext * The context in which to perform the conversion. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. v
JS::HandleValue The value to convert. type JSType The type to which the value is to be converted. type must be one of JSTYPE_VOID, JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_STRING, JSTYPE_NUMBER, or JSTYPE_...
JS_DefineOwnProperty
ete since JSAPI 33This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. This article covers features introduced in SpiderMonkey 1.8.5 Please provide a description for this function. Syntax bool JS_DefineOwnProperty(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
JS::HandleValue descriptor, bool *bp); Name Type Description cx JSContext * The context. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. obj JS::HandleObject Object on which the property should be defined own. id JS::HandleId The jsid of the property that should be defined. descriptor JS::Handl...
JS_GetPropertyDefault
JS::MutableHandle<JS::Value> vp); Name Type Description cx JSContext * A context. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. obj JS::HandleObject Object to search on for the property. name or id const char * or JS::HandleId Name of the property to look up. def
JS::HandleValue Default value if the property is not found. vp JS::MutableHandleValue Out parameter. On success, *vp receives the current value of the property, or undefined if no such property is found. Description JS_GetPropertyDefault examines a specified JS object obj and its prototype chain for a property with the specified name. On success, these functions set *vp to the current val...
JS_New
This article covers features introduced in SpiderMonkey 1.8 Create an object as though by using the new keyword and a JavaScript function. Syntax JSObject * JS_New(JSContext *cx, JS::HandleObject ctor, const
JS::HandleValueArray& args); // Added in JSAPI 32 JSObject * JS_New(JSContext *cx, JSObject *ctor, unsigned argc, jsval *argv); // Obsolete since JSAPI 32 Name Type Description cx JSContext * The context in which to create the new object. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. ctor JS::HandleObject The constructor function object. args
JS::HandleValueArray & An array of argument values to pass to the constructor. Added in SpiderMonkey 38 argc unsigned T...
JS_NewArrayObject
Create a new Array object. Syntax JSObject * JS_NewArrayObject(JSContext *cx, const
JS::HandleValueArray& contents); // Added in SpiderMonkey 31 JSObject * JS_NewArrayObject(JSContext *cx, size_t length); // Added in SpiderMonkey 31 JSObject * JS_NewArrayObject(JSContext *cx, int length, jsval *vector); // Obsolete since JSAPI 30 Name Type Description cx JSContext * The context in which to create the new array. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. contents
JS::HandleValueArray& Reference to the initial values for the array's elements. Added in SpiderMonkey 31 length size_t or int The length of the new array. This must not be negative. vector jsval * Pointer to ...
JS_ValueToId
Convert a JS::Value to type jsid. Syntax bool JS_ValueToId(JSContext *cx,
JS::HandleValue v, JS::MutableHandleId idp); bool JS_StringToId(JSContext *cx, JS::HandleString s, JS::MutableHandleId idp); // Added in SpiderMonkey 38 bool JS_IndexToId(JSContext *cx, uint32_t index, JS::MutableHandleId idp); // Added in SpiderMonkey 17 bool JS_CharsToId(JSContext* cx, JS::TwoByteChars chars, JS::MutableHandleId idp); // Added in SpiderMonkey 24 void JS::ProtoKeyToId(JSContext *cx, JSProtoKey key, JS::MutableHandleId idp); // Added in SpiderMonkey 38 Name Type Description cx JSContext * A context. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. v
JS::HandleValue The JS value to convert. s JS::HandleS...