JS_ReportError(xdr->cx, "illegal seek beyond start");
JS_ReportErrorNumber(xdr->cx, NULL, JSMSG_SEEK_BEYOND_START);
mem_seek(JSXDRState *xdr, int32 offset, JSXDRWhence whence){    switch (whence) {      case JSXDR_SEEK_CUR:	if ((int32)MEM_COUNT(xdr) + offset < 0) {	    JS_ReportError(xdr->cx, "illegal seek beyond start");	    return JS_FALSE;	}	if (offset > 0)	    MEM_NEED(xdr, offset);	MEM_COUNT(xdr) += offset;	return JS_TRUE;      case JSXDR_SEEK_SET:	if (offset < 0) {	    JS_ReportError(xdr->cx, "illegal seek beyond start");	    return JS_FALSE;	}	if (xdr->mode == JSXDR_ENCODE) {	    if ((uint32)offset > MEM_COUNT(xdr))		MEM_NEED(xdr, offset - MEM_COUNT(xdr));	    MEM_COUNT(xdr) = offset;	} else {	    if ((uint32)offset > MEM_LIMIT(xdr)) {		JS_ReportError(xdr->cx, "illegal seek beyond end");		return JS_FALSE;	    }	    MEM_COUNT(xdr) = offset;	}	return JS_TRUE;      case JSXDR_SEEK_END:	if (offset >= 0 ||	    xdr->mode == JSXDR_ENCODE ||	    (int32)MEM_LIMIT(xdr) + offset < 0) {	    JS_ReportError(xdr->cx, "illegal end-based seek");	    return JS_FALSE;	}	MEM_COUNT(xdr) = MEM_LIMIT(xdr) + offset;	return JS_TRUE;      default:	JS_ReportError(xdr->cx, "unknown seek whence: %d", whence);	return JS_FALSE;    }}