From my research,currently a French employee can only be fired if the company is going bankrupt. The new law which is causing the riots would allow employers to fire an employee for just cause, but only for the first two years.
It isn't being fired when you lose your job because the factory/business closes.