]> source.dussan.org Git - sonarqube.git/commitdiff
Revert "SONAR-10564 Exception when opening rule description in Google Chrome"
authorPascal Mugnier <pascal.mugnier@sonarsource.com>
Fri, 13 Apr 2018 05:44:08 +0000 (07:44 +0200)
committerPascal Mugnier <pascal.mugnier@sonarsource.com>
Fri, 13 Apr 2018 05:44:08 +0000 (07:44 +0200)
This reverts commit 4676d0dfd9d3c629e9a4a926001632bcbe2066e8.

server/sonar-web/src/main/js/app/components/RecentHistory.js
server/sonar-web/src/main/js/components/workspace/models/items.js

index 23e4ff59f2066231ee32a478b42c77c9f67fe173..1bc7d308621ad8f6daf99441255d3479ba560c1a 100644 (file)
@@ -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);
     }
   }
 
index d619d8d72ff08ff3dc9ee5b0c5f8db483d8bc3ad..655b836da8b87b8ae07719b3665873dd3e0ea4e7 100644 (file)
@@ -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() {