[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r14394: Check for exceptions in unwrap function.. We may have some i (torbutton/trunk/src/components)
Author: mikeperry
Date: 2008-04-17 23:45:00 -0400 (Thu, 17 Apr 2008)
New Revision: 14394
Modified:
torbutton/trunk/src/components/cssblocker.js
Log:
Check for exceptions in unwrap function.. We may have some
infinite recursion case here.
Modified: torbutton/trunk/src/components/cssblocker.js
===================================================================
--- torbutton/trunk/src/components/cssblocker.js 2008-04-18 03:39:42 UTC (rev 14393)
+++ torbutton/trunk/src/components/cssblocker.js 2008-04-18 03:45:00 UTC (rev 14394)
@@ -152,7 +152,10 @@
this.logger.log(1, "Cpolicy load of: "+contentLocation.spec+" from: "+
(( null == requestOrigin ) ? "<null>" : requestOrigin.spec));
- var utmp = unwrapURL(contentLocation.spec, false);
+ var utmp = null;
+ try { utmp = unwrapURL(contentLocation.spec, false); }
+ catch(e) { this.logger.log(5, "Exception on unwrap: "+e); }
+
if(utmp instanceof Ci.nsIURI) {
utmp = utmp.QueryInterface(Ci.nsIURI);
contentLocation = utmp;
@@ -184,7 +187,7 @@
// 4b) browser chrome requests are allowed
//
switch (requestOrigin.scheme) {
- case "x-jsd":
+ case "x-jsd":
case "chrome":
// privileged
if ((contentLocation.scheme in localSchemes) ||