JavaScript-1.5 Reference

JSVAL_LOCK Macro Deprecated

Summary

Locks a JS value to prevent garbage collection on it.

Syntax

JSVAL_LOCK(cx,v)

Description

JSVAL_LOCK is a deprecated feature that is supported only for backward compatibility with existing applications. To lock a value, use local roots with JS_AddRoot.

JSVAL_LOCK locks a JS value, v, to prevent the value from being garbage collected. v is a JS object, string, or double value.

JSVAL_LOCK determines if v is an object, string, or double value, and if it is, it locks the value. If locking is successful, or v already cannot be garbage collected because it is not an object, string, or double value, JSVAL_LOCK evaluates to true. Otherwise JSVAL_LOCK evaluates to false.

See Also

Groups [ Deprecated | Macro ]
Documents [ LXR ID Search ]
Entries [ JSVAL_IS_GCTHING | JSVAL_TO_GCTHING | JSVAL_UNLOCK | JS_AddRoot | JS_LockGCThing ]

This page was generated by APIDOC