Obsolete since JSAPI 29
This 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.

JSMarkOp is the type of the JSClass.mark callback in SpiderMonkey 1.7 and earlier. In SpiderMonkey 1.8, JSMarkOp will be deprecated. All new code using SpiderMonkey 1.8 or later should use a JSTraceOp instead to ensure that the tracing APIs work properly.

Syntax

typedef uint32
(* JSMarkOp)(JSContext *cx, JSObject *obj, void *arg);
Name Type Description
cx JSContext * The JS context in which the mark phase of garbage collection is occurring.
obj JSObject * The object to be marked.
arg void * Opaque data which the mark hook must pass through to JS_MarkGCThing.

Description

Call JS_MarkGCThing for each GC thing directly reachable from obj. Use JSVAL_IS_GCTHING to check whether a value needs to be marked and JSVAL_TO_GCTHING to convert the jsval to a pointer.

JSClass hooks

JSClass offers the following hook:

See Also