Macbook Air crashes/restarts when something doing something heavy on it
Welcome to Ask Different!

I don't think it's enough details to answer for sure. The best would probably be to go to an Apple Store ask them to run there diagnostic tool on your computer.

What it looks like is that the computer gets too hot and enter in safe mode leading to the shut down to avoid the melting down of the processor.

That said maybe there is too much dust and your computer is actually too hot, or maybe one of the sensor is wrong and then it will show on the diagnostic tool. 

You can also use a software like iStat Menu or HWSensors to read yourself the sensors and try to spot something wrong.