Backed out changeset 6eb370cb386c (bug 1505957) for eslint failure
authorAndreea Pavel <apavel@mozilla.com>
Thu, 15 Nov 2018 01:06:45 +0200
changeset 502876 2a16ee42df97043cdaf29f0b90c1ab786af6af45
parent 502875 ef3f6e06858d763ccb252c88b442985622036295
child 502877 e4c942b55e5b26189f221f421dde9dd5b2a02b38
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1505957
milestone65.0a1
backs out6eb370cb386c62e17f1a58bb0cc7d9e788587f83
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
Backed out changeset 6eb370cb386c (bug 1505957) for eslint failure
toolkit/actors/UAWidgetsChild.jsm
--- a/toolkit/actors/UAWidgetsChild.jsm
+++ b/toolkit/actors/UAWidgetsChild.jsm
@@ -70,39 +70,23 @@ class UAWidgetsChild extends ActorChild 
     let shadowRoot = aElement.openOrClosedShadowRoot;
     let sandbox = aElement.nodePrincipal.isSystemPrincipal ?
       Object.create(null) : Cu.getUAWidgetScope(aElement.nodePrincipal);
 
     if (!sandbox[widgetName]) {
       Services.scriptloader.loadSubScript(uri, sandbox, "UTF-8");
     }
 
-    let widget;
-    try {
-      widget = new sandbox[widgetName](shadowRoot);
-    } catch (ex) {
-      // The widget may have thrown during construction.
-      // Report the failure and recover by clearing the Shadow DOM.
-      shadowRoot.innerHTML = "";
-      Cu.reportError(ex);
-      return;
-    }
+    let widget = new sandbox[widgetName](shadowRoot);
     this.widgets.set(aElement, widget);
   }
 
   teardownWidget(aElement) {
     let widget = this.widgets.get(aElement);
     if (!widget) {
       return;
     }
     if (typeof widget.wrappedJSObject.destructor == "function") {
-      try {
-        widget.wrappedJSObject.destructor();
-      } catch (ex) {
-        // The widget may have thrown during destruction.
-        // Report the failure and recover by clearing the Shadow DOM.
-        shadowRoot.innerHTML = "";
-        Cu.reportError(ex);
-      }
+      widget.wrappedJSObject.destructor();
     }
     this.widgets.delete(aElement);
   }
 }