You know what ? Just keep learning to make sure you are marketable and can find another job. Microsoft just laid off 200+ staff earlier in the week. No prior notice. So anyone can be laid off any time and any where.
This is the only point worth considering. Being employable is the only way to counter layoffs. As simple as that.