~ubuntu-branches/ubuntu/lucid/webkit/lucid-security

« back to all changes in this revision

Viewing changes to WebCore/bindings/js/JSXMLHttpRequestCustom.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-03-17 15:05:11 UTC
  • mfrom: (1.2.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100317150511-nyun8s32wgt8dhh9
Tags: 1.1.90-1
* New upstream release
- This marks the preparation for the 1.2 stable branch
* debian/copyright:
- updated with changes since 1.1.22
* debian/libwebkit-1.0-2.symbols:
- added new API introduced in 1.1.23

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "JSXMLHttpRequest.h"
31
31
 
32
32
#include "Blob.h"
 
33
#include "DOMFormData.h"
33
34
#include "DOMWindow.h"
34
35
#include "Document.h"
35
36
#include "Event.h"
37
38
#include "FrameLoader.h"
38
39
#include "HTMLDocument.h"
39
40
#include "JSBlob.h"
 
41
#include "JSDOMFormData.h"
40
42
#include "JSDOMWindowCustom.h"
41
43
#include "JSDocument.h"
42
44
#include "JSEvent.h"
67
69
 
68
70
    const KURL& url = impl()->scriptExecutionContext()->completeURL(args.at(1).toString(exec));
69
71
    String method = args.at(0).toString(exec);
70
 
    bool async = true;
71
 
    if (args.size() >= 3)
72
 
        async = args.at(2).toBoolean(exec);
73
72
 
74
73
    ExceptionCode ec = 0;
75
 
    if (args.size() >= 4 && !args.at(3).isUndefined()) {
76
 
        String user = valueToStringWithNullCheck(exec, args.at(3));
 
74
    if (args.size() >= 3) {
 
75
        bool async = args.at(2).toBoolean(exec);
77
76
 
78
 
        if (args.size() >= 5 && !args.at(4).isUndefined()) {
79
 
            String password = valueToStringWithNullCheck(exec, args.at(4));
80
 
            impl()->open(method, url, async, user, password, ec);
 
77
        if (args.size() >= 4 && !args.at(3).isUndefined()) {
 
78
            String user = valueToStringWithNullCheck(exec, args.at(3));
 
79
            
 
80
            if (args.size() >= 5 && !args.at(4).isUndefined()) {
 
81
                String password = valueToStringWithNullCheck(exec, args.at(4));
 
82
                impl()->open(method, url, async, user, password, ec);
 
83
            } else
 
84
                impl()->open(method, url, async, user, ec);
81
85
        } else
82
 
            impl()->open(method, url, async, user, ec);
 
86
            impl()->open(method, url, async, ec);
83
87
    } else
84
 
        impl()->open(method, url, async, ec);
 
88
        impl()->open(method, url, ec);
85
89
 
86
90
    setDOMException(exec, ec);
87
91
    return jsUndefined();
111
115
            impl()->send(toDocument(val), ec);
112
116
        else if (val.inherits(&JSBlob::s_info))
113
117
            impl()->send(toBlob(val), ec);
 
118
        else if (val.inherits(&JSDOMFormData::s_info))
 
119
            impl()->send(toDOMFormData(val), ec);
114
120
        else
115
121
            impl()->send(val.toString(exec), ec);
116
122
    }