JSRuntime *rt; JSTrap *trap;
size_t nbytes, pbytes; JSObject *obj; jsatomid i; jssrcnote *sn, *notes; JSTryNote *tn, *tnotes; JSPrincipals *principals;
JS_PUBLIC_API(JSBool)JS_SetTrap(JSContext *cx, JSScript *script, jsbytecode *pc,	   JSTrapHandler handler, void *closure){    JSRuntime *rt;    JSTrap *trap;    rt = cx->runtime;    trap = FindTrap(rt, script, pc);    if (trap) {	/* Restore opcode at pc so it can be saved again. */	*pc = (jsbytecode)trap->op;    } else {	trap = (JSTrap *) JS_malloc(cx, sizeof *trap);	if (!trap || !js_AddRoot(cx, &trap->closure, "trap->closure")) {	    if (trap)		JS_free(cx, trap);	    return JS_FALSE;	}    }    JS_APPEND_LINK(&trap->links, &rt->trapList);    trap->script = script;    trap->pc = pc;    trap->op = (JSOp)*pc;    trap->handler = handler;    trap->closure = closure;    *pc = JSOP_TRAP;    return JS_TRUE;}