From 9d9da75ab4769312d5e77e0003e649fbea304f7e Mon Sep 17 00:00:00 2001 From: Timothy Guan-tin Chien Date: Sat, 1 Dec 2018 22:28:46 +0000 Subject: [PATCH] Bug 1511130 - Part I, Backed out changeset faacbb32e16a (Bug 1511130) r=bgrins My approach in bug 1505957 turned out to be flawed. Differential Revision: https://phabricator.services.mozilla.com/D13607 --HG-- extra : moz-landing-system : lando --- toolkit/actors/UAWidgetsChild.jsm | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/toolkit/actors/UAWidgetsChild.jsm b/toolkit/actors/UAWidgetsChild.jsm index 09a4f49e4575..e557a638b085 100644 --- a/toolkit/actors/UAWidgetsChild.jsm +++ b/toolkit/actors/UAWidgetsChild.jsm @@ -79,16 +79,7 @@ class UAWidgetsChild extends ActorChild { 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); } @@ -98,14 +89,7 @@ class UAWidgetsChild extends ActorChild { 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. - aElement.openOrClosedShadowRoot.innerHTML = ""; - Cu.reportError(ex); - } + widget.wrappedJSObject.destructor(); } this.widgets.delete(aElement); }