From 266f944c44f0d5e2cdb6541a161b5999fbc24a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Sat, 9 Nov 2013 12:32:40 -0800 Subject: [PATCH] Bug 935973 - ThirdPartyCookieProbe errors r=yoric --- toolkit/components/telemetry/ThirdPartyCookieProbe.jsm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toolkit/components/telemetry/ThirdPartyCookieProbe.jsm b/toolkit/components/telemetry/ThirdPartyCookieProbe.jsm index 9035909fde0c..29309ba02183 100644 --- a/toolkit/components/telemetry/ThirdPartyCookieProbe.jsm +++ b/toolkit/components/telemetry/ThirdPartyCookieProbe.jsm @@ -6,6 +6,7 @@ let Ci = Components.interfaces; let Cu = Components.utils; +let Cr = Components.results; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); @@ -88,7 +89,13 @@ this.ThirdPartyCookieProbe.prototype = { data.addRejected(firstParty); } } catch (ex) { - // Errors should not remain silent + if (ex instanceof Ci.nsIXPCException) { + if (ex.result == Cr.NS_ERROR_HOST_IS_IP_ADDRESS || + ex.result == Cr.NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS) { + return; + } + } + // Other errors should not remain silent. Services.console.logStringMessage("ThirdPartyCookieProbe: Uncaught error " + ex + "\n" + ex.stack); } },