couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1023808 - in /couchdb/branches/1.0.x: THANKS share/www/script/futon.js
Date Mon, 18 Oct 2010 14:08:51 GMT
Author: jan
Date: Mon Oct 18 14:08:51 2010
New Revision: 1023808

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

Closes COUCHDB-896.

Patch by Dale Harvey.

Modified:
    couchdb/branches/1.0.x/THANKS
    couchdb/branches/1.0.x/share/www/script/futon.js

Modified: couchdb/branches/1.0.x/THANKS
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/THANKS?rev=1023808&r1=1023807&r2=1023808&view=diff
==============================================================================
--- couchdb/branches/1.0.x/THANKS (original)
+++ couchdb/branches/1.0.x/THANKS Mon Oct 18 14:08:51 2010
@@ -65,5 +65,6 @@ suggesting improvements or submitting ch
  * Juhani Ränkimies <juhani@juranki.com>
  * Lim Yue Chuan <shasderias@gmail.com>
  * David Davis <xantus@xantus.org>
+ * Dale Harvey <dale@arandomurl.com>
 
 For a list of authors see the `AUTHORS` file.

Modified: couchdb/branches/1.0.x/share/www/script/futon.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/futon.js?rev=1023808&r1=1023807&r2=1023808&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/futon.js (original)
+++ couchdb/branches/1.0.x/share/www/script/futon.js Mon Oct 18 14:08:51 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