[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r13779: How is a bandaid supposed to stop a truck when you don't eve (torbutton/trunk/src/chrome/content)



Author: mikeperry
Date: 2008-02-28 22:17:04 -0500 (Thu, 28 Feb 2008)
New Revision: 13779

Modified:
   torbutton/trunk/src/chrome/content/jshooks.js
Log:

How is a bandaid supposed to stop a truck when you don't even
put the bandaid in the right place? There, this will totally
stop that truck now.



Modified: torbutton/trunk/src/chrome/content/jshooks.js
===================================================================
--- torbutton/trunk/src/chrome/content/jshooks.js	2008-02-29 01:45:06 UTC (rev 13778)
+++ torbutton/trunk/src/chrome/content/jshooks.js	2008-02-29 03:17:04 UTC (rev 13779)
@@ -267,6 +267,11 @@
     var Date = newDate;
   }
 
+  // FINALLY. We got a break! WAHOO ECMA-262 compliance!
+  with(window) {
+      var XPCNativeWrapper = function(a) { return a; };
+  }
+
   // Gain access to the implict global object (which interestingly claims
   // to be a 'Window' but is not the same class as 'window'...) and 
   // replace its __proto__ with a copy of 'window'.
@@ -274,17 +279,17 @@
   var wintmp = window;
   with(window.valueOf.call()) {
     for(var i in wintmp) {
-      tmp[i] = wintmp[i];                  
+      if(i == "globalStorage" || i == "sessionStorage") {
+          //Causes an exception without this. 
+          //Disabled for now anyways.
+          tmp[i] = new Object();
+      } else {
+          tmp[i] = wintmp[i];                  
+      }
     }
-
     var __proto__ = tmp;
   }
 
-  // FINALLY. We got a break! WAHOO ECMA-262 compliance!
-  with(window) {
-      var XPCNativeWrapper = function(a) { return a; };
-  }
-
   window.__proto__ = null; // Prevent delete from unmasking our properties.
 
   return true;