Bug 408268 Closing the browser without dismissing the Customize Toolbar dialog leads to loss of all toolbar items. r=Neil Deakin sr=neil@parkwaycc.co.uk
--- a/toolkit/content/customizeToolbar.js
+++ b/toolkit/content/customizeToolbar.js
@@ -138,17 +138,17 @@ function getToolbarAt(i)
}
/**
* Persist the current set of buttons in all customizable toolbars to
* localstore.
*/
function persistCurrentSets()
{
- if (!gToolboxChanged)
+ if (!gToolboxChanged || gToolboxDocument.defaultView.closed)
return;
var customCount = 0;
for (var i = 0; i < gToolbox.childNodes.length; ++i) {
// Look for customizable toolbars that need to be persisted.
var toolbar = getToolbarAt(i);
if (isCustomizableToolbar(toolbar)) {
// Calculate currentset and store it in the attribute.