Bug 1024388: Attempt to retarget OnDataAvailable to the HTML parser thread for all channels, not just HTTP channels. r=bz
This commit is contained in:
@@ -933,14 +933,18 @@ nsHtml5StreamParser::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext)
|
|||||||
mReparseForbidden = true;
|
mReparseForbidden = true;
|
||||||
mFeedChardet = false; // can't restart anyway
|
mFeedChardet = false; // can't restart anyway
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Attempt to retarget delivery of data (via OnDataAvailable) to the parser
|
// Attempt to retarget delivery of data (via OnDataAvailable) to the parser
|
||||||
// thread, rather than through the main thread.
|
// thread, rather than through the main thread.
|
||||||
nsCOMPtr<nsIThreadRetargetableRequest> threadRetargetableRequest =
|
nsCOMPtr<nsIThreadRetargetableRequest> threadRetargetableRequest =
|
||||||
do_QueryInterface(mRequest);
|
do_QueryInterface(mRequest, &rv);
|
||||||
if (threadRetargetableRequest) {
|
if (threadRetargetableRequest) {
|
||||||
threadRetargetableRequest->RetargetDeliveryTo(mThread);
|
rv = threadRetargetableRequest->RetargetDeliveryTo(mThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (NS_FAILED(rv)) {
|
||||||
|
NS_WARNING("Failed to retarget HTML data delivery to the parser thread.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCharsetSource == kCharsetFromParentFrame) {
|
if (mCharsetSource == kCharsetFromParentFrame) {
|
||||||
|
|||||||
Reference in New Issue
Block a user