Mozilla.com

Table of contents
  1. 1. Syntax
  2. 2. Description
Table of contents
  1. 1. Syntax
  2. 2. Description

The JavaScript engine calls the JSClass.mark callback during the mark phase of garbage collection.

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.

Page last modified 17:06, 14 Apr 2008 by Jorend

Files (0)