b=339530. Basic auth fails with XMLHttpRequest. r=peterv, sr=jst
git-svn-id: svn://10.0.0.236/trunk@199176 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
eac60be8ef
commit
0aac378e5e
@ -1108,7 +1108,7 @@ nsXMLHttpRequest::Open(const nsACString& method, const nsACString& url)
|
||||
::JS_ValueToBoolean(cx, argv[2], &asyncBool);
|
||||
async = (PRBool)asyncBool;
|
||||
|
||||
if (argc > 3) {
|
||||
if (argc > 3 && !JSVAL_IS_NULL(argv[3]) && !JSVAL_IS_VOID(argv[3])) {
|
||||
JSString* userStr = ::JS_ValueToString(cx, argv[3]);
|
||||
|
||||
if (userStr) {
|
||||
@ -1117,7 +1117,7 @@ nsXMLHttpRequest::Open(const nsACString& method, const nsACString& url)
|
||||
::JS_GetStringLength(userStr));
|
||||
}
|
||||
|
||||
if (argc > 4) {
|
||||
if (argc > 4 && !JSVAL_IS_NULL(argv[4]) && !JSVAL_IS_VOID(argv[4])) {
|
||||
JSString* passwdStr = JS_ValueToString(cx, argv[4]);
|
||||
|
||||
if (passwdStr) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user