diff --git a/dom/src/jsurl/crashtests/457050-1-inner.html b/dom/src/jsurl/crashtests/457050-1-inner.html new file mode 100644 index 00000000000..54521c9a50d --- /dev/null +++ b/dom/src/jsurl/crashtests/457050-1-inner.html @@ -0,0 +1,8 @@ + +
+ + + +Hello
+ + diff --git a/dom/src/jsurl/crashtests/457050-1.html b/dom/src/jsurl/crashtests/457050-1.html new file mode 100644 index 00000000000..17e3faf8e22 --- /dev/null +++ b/dom/src/jsurl/crashtests/457050-1.html @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/dom/src/jsurl/crashtests/crashtests.list b/dom/src/jsurl/crashtests/crashtests.list index 6ff35ca7ad7..51f92d51b52 100644 --- a/dom/src/jsurl/crashtests/crashtests.list +++ b/dom/src/jsurl/crashtests/crashtests.list @@ -1,3 +1,4 @@ load 341963-1.html load 344874-1.html load 344996-1.xhtml +load 457050-1.html diff --git a/dom/src/jsurl/nsJSProtocolHandler.cpp b/dom/src/jsurl/nsJSProtocolHandler.cpp index 7d214e2bf20..c2c4cc5b4a2 100644 --- a/dom/src/jsurl/nsJSProtocolHandler.cpp +++ b/dom/src/jsurl/nsJSProtocolHandler.cpp @@ -849,6 +849,25 @@ nsJSChannel::GetLoadFlags(nsLoadFlags *aLoadFlags) NS_IMETHODIMP nsJSChannel::SetLoadFlags(nsLoadFlags aLoadFlags) { + // Figure out whether the LOAD_BACKGROUND bit in aLoadFlags is + // actually right. + PRBool bogusLoadBackground = PR_FALSE; + if (mIsActive && !(mActualLoadFlags & LOAD_BACKGROUND) && + (aLoadFlags & LOAD_BACKGROUND)) { + // We're getting a LOAD_BACKGROUND, but it's probably just our own fake + // flag being mirrored to us. The one exception is if our loadgroup is + // LOAD_BACKGROUND. + PRBool loadGroupIsBackground = PR_FALSE; + nsCOMPtr