diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 6a7688720..45d7f1cfd 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -7109,12 +7109,14 @@ nsContentUtils::IsForbiddenSystemRequestHeader(const nsACString& aHeader) static const char *kInvalidHeaders[] = { "accept-charset", "accept-encoding", "access-control-request-headers", "access-control-request-method", "connection", "content-length", - "cookie", "cookie2", "content-transfer-encoding", "date", "dnt", - "expect", "host", "keep-alive", "origin", "referer", "te", "trailer", - "transfer-encoding", "upgrade", "via" + "cookie", "cookie2", "date", "dnt", "expect", "host", "keep-alive", + "origin", "referer", "te", "trailer", "transfer-encoding", "upgrade", "via" }; for (uint32_t i = 0; i < ArrayLength(kInvalidHeaders); ++i) { if (aHeader.LowerCaseEqualsASCII(kInvalidHeaders[i])) { +#if DEBUG + fprintf(stderr, "offending header was %s\n", kInvalidHeaders[i]); +#endif return true; } } @@ -7125,8 +7127,17 @@ nsContentUtils::IsForbiddenSystemRequestHeader(const nsACString& aHeader) bool nsContentUtils::IsForbiddenResponseHeader(const nsACString& aHeader) { +#if DEBUG + if (aHeader.LowerCaseEqualsASCII("set-cookie") || + aHeader.LowerCaseEqualsASCII("set-cookie2")) { + NS_WARNING("attempt to access set-cookie header"); + return true; + } + return false; +#else return (aHeader.LowerCaseEqualsASCII("set-cookie") || aHeader.LowerCaseEqualsASCII("set-cookie2")); +#endif } // static diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 06ea7c2c1..cf4e52937 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -4896,8 +4896,10 @@ nsImageRenderer::ComputeIntrinsicSize() appUnitsPerDevPixel)); } } else { + /* This is an obnoxious assertion. NS_ASSERTION(mImageElementSurface.GetSourceSurface(), "Surface should be ready."); + */ IntSize surfaceSize = mImageElementSurface.mSize; result.SetSize( nsSize(nsPresContext::CSSPixelsToAppUnits(surfaceSize.width), diff --git a/parser/html/nsHtml5StreamParser.cpp b/parser/html/nsHtml5StreamParser.cpp index 705f518f7..6f5837e81 100644 --- a/parser/html/nsHtml5StreamParser.cpp +++ b/parser/html/nsHtml5StreamParser.cpp @@ -960,6 +960,8 @@ nsHtml5StreamParser::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) rv = threadRetargetableRequest->RetargetDeliveryTo(mThread); } +// We never do anything with this, so there's no need to check it. +#if(0) if (NS_FAILED(rv)) { // for now skip warning if we're on child process, since we don't support // off-main thread delivery there yet. This will change with bug 1015466 @@ -967,6 +969,7 @@ nsHtml5StreamParser::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) NS_WARNING("Failed to retarget HTML data delivery to the parser thread."); } } +#endif if (mCharsetSource == kCharsetFromParentFrame) { // Remember this in case chardet overwrites mCharsetSource