I use Ubuntu 16.04 with Firefox 53 in my office. I lock my computer every night but I don't close Firefox.
Other people might have access to my machine, with the same user, using VNC o directly unlocking the machine with the Ubuntu password.
How can I force Firefox to ask for the master password if the computer was unlocked or accessed on a remote session?