Search completed in 1.17 seconds.
5 results for "js_newexternalstringwithclosure":
JS_NewExternalString
Mozilla › Projects › SpiderMonkey › JSAPI reference › JS NewExternalString
Requires request. ...
...cript engine will call the string finalizer callback, allowing the application to free the array.) The array does not need to be zero-terminated. length size_t The number of characters in the array chars. fin JSStringFinalizer A string finalizer the JavaScript engine should use (later) to free the string buffer chars. ...
...later) to free the string buffer chars. Added in SpiderMonkey 17 type int (JS_NewExternalStringWithClosure only) Indicates which string finalizer callback the JavaScript engine should use (later) to free the string buffer chars. This must be an id number previously returned by a successful call to JS_AddExternalStringFinalizer. Obsolete since JSAPI 13 closure void * (JS_NewExternalStringWithClosure only) Arbitrary, application-defined data to include in the string object after it's created. If you use this as a pointer, you should clean it up in the external string finalizer that was previously set up using JS_AddExternalStringFinalizer. ...
...And 3 more matches
JS_GetExternalStringClosure
Mozilla › Projects › SpiderMonkey › JSAPI reference › JS GetExternalStringClosure
Obsolete since JSAPI 13This 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 6 Returns the string closure stored in a JSString created by calling JS_NewExternalStringWithClosure. Syntax void * JS_GetExternalStringClosure(JSContext *cx, JSString *str); Name Type Description cx JSContext * The context from which to retrieve the closure for a string. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. str JSString * The string for which to return the closure. The result is NULL if the external string was created without one (that is, by calling JS_NewExternalString rath...
...Type Description cx JSContext * The context from which to retrieve the closure for a string. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. str JSString * The string for which to return the closure. The result is NULL if the external string was created without one (that is, by calling JS_NewExternalString rather than JS_NewExternalStringWithClosure). Description To determine if a string was created as an external string, you can call JS_IsExternalString. See Also bug 724810 ...
Index
Mozilla › Projects › SpiderMonkey › Index
n the JavaScript garbage collection heap. This function is not very useful. To convert a jsdouble to a jsval, use JS_NewNumberValue instead. 402 JS_NewDoubleValue JSAPI Reference, Obsolete, SpiderMonkey JS_NewDoubleValue creates a floating-point jsval. 403 JS_NewExternalString JSAPI Reference, Reference, Reference(2), SpiderMonkey JS_NewExternalString and JS_NewExternalStringWithClosure create a new JSString whose characters are stored in external memory, i.e., memory allocated by the application, not the JavaScript engine. Since the program allocated the memory, it will need to free it; this happens in an external string finalizer indicated by the type parameter. 404 JS_NewFunction JSAPI Reference, Reference, Reference(2), SpiderMonkey JS_NewFunction create...
JS_IsExternalString
Mozilla › Projects › SpiderMonkey › JSAPI reference › JS IsExternalString
This article covers features introduced in SpiderMonkey 17 Determines whether or not the specified JSString is an external string (that is, a string created by calling JS_NewExternalString rather than JS_NewExternalStringWithClosure). Syntax bool JS_IsExternalString(JSString *str); Name Type Description str JSString * The string to check. Description JS_IsExternalString returns true if the string is an external string; otherwise it's false. See Also MXR ID Search for JS_IsExternalString bug 651041 ...
JSAPI reference
Mozilla › Projects › SpiderMonkey › JSAPI reference
ruct JSStringFinalizer Added in SpiderMonkey 17 JS_NewExternalString JS_IsExternalString Added in SpiderMonkey 17 JS_GetTwoByteExternalStringChars Added in SpiderMonkey 38 JS_GetExternalStringFinalizer Added in SpiderMonkey 17 JS_AddExternalStringFinalizer Obsolete since JSAPI 13 JS_RemoveExternalStringFinalizer Obsolete since JSAPI 13 JS_GetExternalStringGCType Obsolete since JSAPI 13 JS_NewExternalStringWithClosure Added in SpiderMonkey 6 Obsolete since JSAPI 13 JS_GetExternalStringClosure Added in SpiderMonkey 6 Obsolete since JSAPI 13 Objects typedef JSObject JS_DefineObject JS_NewObject JS_NewPlainObject Added in SpiderMonkey 38 JS_NewObjectForConstructor Added in SpiderMonkey 1.8.5 JS_NewGlobalObject Added in SpiderMonkey 1.8 JS_NewObjectWithGivenProto JS_New Added in SpiderMonkey 1.8 J...