зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1182120 - Fix Request mode for XMLDocument.load(). r=bkelly
This commit is contained in:
Родитель
455c60a5ea
Коммит
ee4c08d4bb
|
@ -22,7 +22,7 @@
|
|||
#include "nsIDOMDocumentType.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIHttpChannelInternal.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
@ -421,6 +421,14 @@ XMLDocument::Load(const nsAString& aUrl, ErrorResult& aRv)
|
|||
return false;
|
||||
}
|
||||
|
||||
// TODO Bug 1189945: Remove nsIChannel CorsMode flag and set Request.mode
|
||||
// based on nsILoadInfo securityFlags instead. This block will be removed
|
||||
// when Request.mode set correctly.
|
||||
nsCOMPtr<nsIHttpChannelInternal> httpChannel = do_QueryInterface(channel);
|
||||
if (httpChannel) {
|
||||
httpChannel->SetCorsMode(nsIHttpChannelInternal::CORS_MODE_SAME_ORIGIN);
|
||||
}
|
||||
|
||||
// StartDocumentLoad asserts that readyState is uninitialized, so
|
||||
// uninitialize it. SetReadyStateInternal make this transition invisible to
|
||||
// Web content. But before doing that, assert that the current readyState
|
||||
|
|
Загрузка…
Ссылка в новой задаче