Bug 844792 addendum - Adjust advice about multipart support removal in XHR and make the message non-localizable. r=smaug.

This commit is contained in:
Henri Sivonen 2013-03-01 16:42:39 +02:00
parent 2be52b930c
commit 105dd69a15
2 changed files with 8 additions and 2 deletions

View File

@ -3360,7 +3360,14 @@ nsXMLHttpRequest::SetMultipart(bool aMultipart, nsresult& aRv)
return;
}
LogMessage("MultipartXHRWarning", GetOwner());
nsCOMPtr<nsPIDOMWindow> window = GetOwner();
nsCOMPtr<nsIDocument> doc;
if (window) {
doc = do_QueryInterface(window->GetExtantDocument());
}
nsContentUtils::ReportToConsoleNonLocalized(
NS_LITERAL_STRING("Support for multipart responses in XMLHttpRequest is going to be removed in an upcoming version. Please migrate to checking the responseText from progress events, to Server-Sent Events or to Web Sockets."),
nsIScriptError::warningFlag, "DOM", doc);
if (aMultipart) {
mState |= XML_HTTP_REQUEST_MULTIPART;

View File

@ -83,7 +83,6 @@ RemovedFullScreenElement=Exited full-screen because full-screen element was remo
FocusedWindowedPluginWhileFullScreen=Exited full-screen because windowed plugin was focused.
HTMLMultipartXHRWarning=HTML parsing in XMLHttpRequest is not supported for multipart responses.
HTMLSyncXHRWarning=HTML parsing in XMLHttpRequest is not supported in the synchronous mode.
MultipartXHRWarning=Support for multipart responses in XMLHttpRequest is going to be removed in an upcoming version. Please migrate to chunked responses or to Web Sockets.
InvalidRedirectChannelWarning=Unable to redirect to %S because the channel doesn't implement nsIWritablePropertyBag2.
ReportOnlyCSPIgnored=Report-only CSP policy will be ignored because there are other non-report-only CSP policies applied.
ResponseTypeSyncXHRWarning=Use of XMLHttpRequest's responseType attribute is no longer supported in the synchronous mode in window context.