Firefox 5 has a provision for displaying a warning message when users closes the window with open tabs. If this warning message is turned off then you can enable this using the Firefox advanced settings. Firefox 5 advanced settings can be accessed by typing about:config in the address bar. In the advanced settings screen navigate to Filter and type the text as warn. This would display the following list of Preferences.
From the above list select browser.showQuitWarning and change the value to true. Now whenever you close Firefox window with tabs opened, you will be prompted with “Do you want Firefox to save your tabs for the next time it starts” as shown below.