Bug 940974 - in Australis' CustomizableUI, don't call beginBatchUpdate before potentially bailing and throwing, leading to the batch update stack being forever non-0, r=mikedeboer
☠☠ backed out by 1dfe579939e4 ☠ ☠
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 28 Nov 2013 13:34:25 +0100
changeset 172683 e95f769be558d11f00ff51f6240102522c050511
parent 172682 59df4f1c7281e31ed24379bf6e0334df2b088905
child 172684 9edf20552d79e2bc4e7a281f8839fa85bdaaac9c
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs940974
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 940974 - in Australis' CustomizableUI, don't call beginBatchUpdate before potentially bailing and throwing, leading to the batch update stack being forever non-0, r=mikedeboer
browser/components/customizableui/src/CustomizableUI.jsm
--- a/browser/components/customizableui/src/CustomizableUI.jsm
+++ b/browser/components/customizableui/src/CustomizableUI.jsm
@@ -290,24 +290,24 @@ let CustomizableUIInternal = {
     this.endBatchUpdate(true);
   },
 
   registerToolbarNode: function(aToolbar, aExistingChildren) {
     let area = aToolbar.id;
     if (gBuildAreas.has(area) && gBuildAreas.get(area).has(aToolbar)) {
       return;
     }
-    this.beginBatchUpdate();
     let document = aToolbar.ownerDocument;
     let areaProperties = gAreas.get(area);
 
     if (!areaProperties) {
       throw new Error("Unknown customization area: " + area);
     }
 
+    this.beginBatchUpdate();
     let placements = gPlacements.get(area);
     if (!placements && areaProperties.has("legacy")) {
       let legacyState = aToolbar.getAttribute("currentset");
       if (legacyState) {
         legacyState = legacyState.split(",").filter(s => s);
       }
 
       // Manually restore the state here, so the legacy state can be converted.