Tails is really more secure.
from your hard disk. That was actually done by FBI
two years ago.
So, to avoid such things it is always better to run Firefox in a totally separate environment, such as VirtualBox. That's how you control what information is available to Firefox. Good practice is to have Tor running in ANOTHER Box, so the Box with Firefox doesn't even know it is 'torified', and has no direct access to Internet, no assigned WAN interface and only fake IP from localnet. Even in case of some exploit or malicious script, it will tell nothing to attacker - because it knows nothing. Your real IP is never used inside that VM.
The only way to de-anon such virtualized system is to pop-out from it and run some code on a host computer. This is very rare case (though not 100% impossible).
That's why TAILS is safer.