couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1023807 - in /couchdb/trunk: THANKS share/www/script/futon.js
Date Mon, 18 Oct 2010 14:05:44 GMT
Author: jan
Date: Mon Oct 18 14:05:44 2010
New Revision: 1023807

URL: http://svn.apache.org/viewvc?rev=1023807&view=rev
Log:
Avoid occasional stalling of Futon in Firefox.

Closes COUCHDB-896.

Patch by Dale Harvey.

Modified:
    couchdb/trunk/THANKS
    couchdb/trunk/share/www/script/futon.js

Modified: couchdb/trunk/THANKS
URL: http://svn.apache.org/viewvc/couchdb/trunk/THANKS?rev=1023807&r1=1023806&r2=1023807&view=diff
==============================================================================
--- couchdb/trunk/THANKS (original)
+++ couchdb/trunk/THANKS Mon Oct 18 14:05:44 2010
@@ -69,5 +69,6 @@ suggesting improvements or submitting ch
  * Lim Yue Chuan <shasderias@gmail.com>
  * David Davis <xantus@xantus.org>
  * Klaus Trainer <klaus.trainer@web.de>
+ * Dale Harvey <dale@arandomurl.com>
 
 For a list of authors see the `AUTHORS` file.

Modified: couchdb/trunk/share/www/script/futon.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/futon.js?rev=1023807&r1=1023806&r2=1023807&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/futon.js (original)
+++ couchdb/trunk/share/www/script/futon.js Mon Oct 18 14:05:44 2010
@@ -334,6 +334,14 @@ function $$(node) {
       return callback(decl);
     }
 
+    function windowName() {
+      try {
+        return JSON.parse(window.name || "{}");
+      } catch (e) {
+        return {};
+      }
+    }
+
     // add suffix to cookie names to be able to separate between ports
     var cookiePrefix = location.port + "_";
 
@@ -366,15 +374,15 @@ function $$(node) {
 
       "window": {
         get: function(name) {
-          return JSON.parse(window.name || "{}")[name];
+          return windowName()[name];
         },
         set: function(name, value) {
-          var obj = JSON.parse(window.name || "{}");
+          var obj = windowName();
           obj[name] = value || null;
           window.name = JSON.stringify(obj);
         },
         del: function(name) {
-          var obj = JSON.parse(window.name || "{}");
+          var obj = windowName();
           delete obj[name];
           window.name = JSON.stringify(obj);
         }



Mime
View raw message