Bug 582442 - Make unserializable URIs less fatal. r=dougt
authorJosh Matthews <josh@joshmatthews.net>
Tue, 27 Jul 2010 19:40:17 -0700
changeset 48296 f9214514d547d172141f4c5ee4ae975b83b70488
parent 48295 210e4d354aec5c69cbbe9c82ec3b7cf29a779f20
child 48297 9ebd1145c98ae09287bfb80f7b07a24c37d3229b
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersdougt
bugs582442
milestone2.0b3pre
Bug 582442 - Make unserializable URIs less fatal. r=dougt
netwerk/ipc/NeckoMessageUtils.h
--- a/netwerk/ipc/NeckoMessageUtils.h
+++ b/netwerk/ipc/NeckoMessageUtils.h
@@ -79,19 +79,20 @@ struct ParamTraits<URI>
     WriteParam(aMsg, isNull);
     if (isNull)
       return;
     
     nsCOMPtr<nsIIPCSerializable> serializable = do_QueryInterface(aParam.mURI);
     if (!serializable) {
       nsCString scheme;
       aParam.mURI->GetScheme(scheme);
-      NS_ABORT_IF_FALSE(scheme.EqualsASCII("about:") ||
-                        scheme.EqualsASCII("javascript:"),
-                        "All IPDL URIs must be serializable or an allowed scheme");
+      if (!scheme.EqualsASCII("about:") &&
+          !scheme.EqualsASCII("javascript:") &&
+          !scheme.EqualsASCII("javascript"))
+        NS_WARNING("All IPDL URIs must be serializable or an allowed scheme");
     }
     
     bool isSerialized = !!serializable;
     WriteParam(aMsg, isSerialized);
     if (!isSerialized) {
       nsCString spec, charset;
       aParam.mURI->GetSpec(spec);
       aParam.mURI->GetOriginCharset(charset);