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
authorjonas@sicking.cc
Fri, 04 Apr 2008 17:20:38 -0700
changeset 13934 84ea2c3addce67bc07387dcedf3582ecc87b5db9
parent 13933 ea7be2746fb4c7a02cd4cf129ac755af999ba6cd
child 13935 b0e243ef3c89749a3bb10d56b0692914c2573c98
push id6
push userjorendorff@mozilla.com
push dateMon, 07 Apr 2008 22:38:53 +0000
treeherdermozilla-central@7531959482c7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil, neil
bugs408268
milestone1.9pre
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
toolkit/content/customizeToolbar.js
--- 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.