b=339530. Basic auth fails with XMLHttpRequest. r=peterv, sr=jst, a=drivers

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_0_BRANCH@200258 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sayrer%gmail.com
2006-06-19 02:02:26 +00:00
parent e0cdc617b5
commit 8dcc330428

View File

@@ -1031,7 +1031,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) {
@@ -1040,7 +1040,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) {