Bug 1065216 - Dispatch a fetch event to workers when controlled pages initiate a network load. r=baku,mayhemer,smaug

This commit is contained in:
Josh Matthews
2015-02-18 14:10:52 -05:00
parent 4ae1c1fcea
commit 6857251ced
27 changed files with 1450 additions and 148 deletions

View File

@@ -1933,6 +1933,12 @@ HttpBaseChannel::GetURIPrincipal()
return mPrincipal;
}
bool
HttpBaseChannel::IsNavigation()
{
return mLoadFlags & LOAD_DOCUMENT_URI;
}
bool
HttpBaseChannel::ShouldIntercept()
{
@@ -1940,7 +1946,9 @@ HttpBaseChannel::ShouldIntercept()
GetCallback(controller);
bool shouldIntercept = false;
if (controller && !mForceNoIntercept) {
nsresult rv = controller->ShouldPrepareForIntercept(mURI, &shouldIntercept);
nsresult rv = controller->ShouldPrepareForIntercept(mURI,
IsNavigation(),
&shouldIntercept);
NS_ENSURE_SUCCESS(rv, false);
}
return shouldIntercept;