summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2016-10-16 09:54:18 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2016-10-16 09:54:18 +0200
commitfc6b6724a0f48628f64762e4aab27375a31f8105 (patch)
tree46a98901692db44b38c27f0f0a9425999440dd81
parentc252a6129faf7f30beab4f9d146e46a6cfdea1ef (diff)
downloadpalemoon-gre-fc6b6724a0f48628f64762e4aab27375a31f8105.tar.gz
Minor fix: Places - controllers - throws an error
-rw-r--r--browser/components/places/content/browserPlacesViews.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js
index ff17052cb..a268a7843 100644
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -701,8 +701,16 @@ PlacesViewBase.prototype = {
if (this._controller) {
this._controller.terminate();
- this._viewElt.controllers.removeController(this._controller);
- this._controller = null;
+ // Removing the controller will fail if it is already no longer there.
+ // This can happen if the view element was removed/reinserted without
+ // our knowledge. There is no way to check for that having happened
+ // without the possibility of an exception. :-(
+ try {
+ this._viewElt.controllers.removeController(this._controller);
+ } catch (ex) {
+ } finally {
+ this._controller = null;
+ }
}
delete this._viewElt._placesView;