Entire system hangs when using Firefox

Ever since this week my system frequently hanged when using Firefox. It's not just Firefox itself hanging, but the entire OS, forcing a reboot. Maybe it's because of high memory usage, but I'm not sure. The hangs occur even where there aren't many tabs open. I'm using Ubuntu MATE 18.04.