I can't find anything but if you can write a small program (may be some available for free from internet) that can monitor a specific process, then you could have this program start whenever you start FireFox by starting a batch file that would first start the monitoring program, then start FireFox. When the program detects FF goes away it could run another batch file which would do whatever you want.
More ideas here:
Batch file to check process - Windows
This works, just tried it:
To check if a process is running, you can use the tasklist command. To check if firefox is running, I would use the following command:
tasklist /FI "IMAGENAME eq firefox.exe" /NH
which will return (note: extra whitespace is not shown by whirlpool):
firefox.exe 2660 Console 0 155,476 K
If a process is not running it will return something like this:
INFO: No tasks running with the specified criteria.
If you use this together with a for statement, you could check if the first returned word is the process name (e.g. firefox.exe) or INFO:. I hope that helps a bit. I'll leave the exact syntax for the for statement up to you...