Macbook Air crashes/restarts when something doing something heavy on it Might be a little confusing to explain but I'll try my best to give a detailed response.

Basically it's a Macbook Air (2014 model) running Yosamite 10.10.2.  

I noticed this issue a while back and couldn't find an answer to it on Google. 

Whenever I run anything that's a little CPU extensive like a game, a heavy website, or anything which activates the fan in the Macbook, it just crashes/restarts after freezing. 

You can hear the fan just turning on and speeding up, but before it gets to full speed the Macbook just freezes and then crashes and reboots to the Apple logo.

In the past, it worked just fine. I played a few games on it even though the Macbook Air would be running its fan for an hour, it never caused issues like this before.

I'm just confused, could this be an OSX error, like maybe upgrading to Yosamite 10.10.2 caused this(was on 10.10 when things ran fine).

Could it be that something is damaged? (The fan seems fine because I used a fan control App to test running the fan on full mode and it ran just perfectly)

Anything would be greatly helpful guys...
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.