From 080f8a2e78f90b21406e9ef35eefd482ede17773 Mon Sep 17 00:00:00 2001 From: Pascal Mugnier Date: Fri, 13 Apr 2018 07:44:08 +0200 Subject: [PATCH] Revert "SONAR-10564 Exception when opening rule description in Google Chrome" This reverts commit 4676d0dfd9d3c629e9a4a926001632bcbe2066e8. --- .../src/main/js/app/components/RecentHistory.js | 12 ++---------- .../src/main/js/components/workspace/models/items.js | 6 +----- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/RecentHistory.js b/server/sonar-web/src/main/js/app/components/RecentHistory.js index 23e4ff59f20..1bc7d308621 100644 --- a/server/sonar-web/src/main/js/app/components/RecentHistory.js +++ b/server/sonar-web/src/main/js/app/components/RecentHistory.js @@ -51,21 +51,13 @@ export default class RecentHistory { static set(newHistory /*: History */) /*: void */ { if (window.localStorage) { - try { - window.localStorage.setItem(STORAGE_KEY, JSON.stringify(newHistory)); - } catch (e) { - /* Fail silently*/ - } + window.localStorage.setItem(STORAGE_KEY, JSON.stringify(newHistory)); } } static clear() /*: void */ { if (window.localStorage) { - try { - window.localStorage.removeItem(STORAGE_KEY); - } catch (e) { - /* Fail silently*/ - } + window.localStorage.removeItem(STORAGE_KEY); } } diff --git a/server/sonar-web/src/main/js/components/workspace/models/items.js b/server/sonar-web/src/main/js/components/workspace/models/items.js index d619d8d72ff..655b836da8b 100644 --- a/server/sonar-web/src/main/js/components/workspace/models/items.js +++ b/server/sonar-web/src/main/js/components/workspace/models/items.js @@ -31,11 +31,7 @@ export default Backbone.Collection.extend({ save() { const dump = JSON.stringify(this.toJSON()); - try { - window.localStorage.setItem(STORAGE_KEY, dump); - } catch (e) { - /* Fail silently*/ - } + window.localStorage.setItem(STORAGE_KEY, dump); }, load() { -- 2.39.5