| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 TOSTRING_VOID(V8StringResource<>, method, info[0]); | 170 TOSTRING_VOID(V8StringResource<>, method, info[0]); |
| 171 TOSTRING_VOID(V8StringResource<>, urlstring, info[1]); | 171 TOSTRING_VOID(V8StringResource<>, urlstring, info[1]); |
| 172 | 172 |
| 173 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); | 173 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); |
| 174 KURL url = context->completeURL(urlstring); | 174 KURL url = context->completeURL(urlstring); |
| 175 | 175 |
| 176 if (info.Length() >= 3) { | 176 if (info.Length() >= 3) { |
| 177 bool async = info[2]->BooleanValue(); | 177 bool async = info[2]->BooleanValue(); |
| 178 | 178 |
| 179 if (info.Length() >= 4 && !info[3]->IsUndefined()) { | 179 if (info.Length() >= 4 && !info[3]->IsUndefined()) { |
| 180 TOSTRING_VOID(V8StringResource<WithNullCheck>, user, info[3]); | 180 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, user, info[3]
); |
| 181 | 181 |
| 182 if (info.Length() >= 5 && !info[4]->IsUndefined()) { | 182 if (info.Length() >= 5 && !info[4]->IsUndefined()) { |
| 183 TOSTRING_VOID(V8StringResource<WithNullCheck>, password, info[4]
); | 183 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, password,
info[4]); |
| 184 xmlHttpRequest->open(method, url, async, user, password, excepti
onState); | 184 xmlHttpRequest->open(method, url, async, user, password, excepti
onState); |
| 185 } else { | 185 } else { |
| 186 xmlHttpRequest->open(method, url, async, user, exceptionState); | 186 xmlHttpRequest->open(method, url, async, user, exceptionState); |
| 187 } | 187 } |
| 188 } else { | 188 } else { |
| 189 xmlHttpRequest->open(method, url, async, exceptionState); | 189 xmlHttpRequest->open(method, url, async, exceptionState); |
| 190 } | 190 } |
| 191 } else { | 191 } else { |
| 192 xmlHttpRequest->open(method, url, exceptionState); | 192 xmlHttpRequest->open(method, url, exceptionState); |
| 193 } | 193 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); | 233 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); |
| 234 ArrayBuffer* arrayBuffer = V8ArrayBuffer::toNative(object); | 234 ArrayBuffer* arrayBuffer = V8ArrayBuffer::toNative(object); |
| 235 ASSERT(arrayBuffer); | 235 ASSERT(arrayBuffer); |
| 236 xmlHttpRequest->send(arrayBuffer, exceptionState); | 236 xmlHttpRequest->send(arrayBuffer, exceptionState); |
| 237 } else if (V8ArrayBufferView::hasInstance(arg, info.GetIsolate())) { | 237 } else if (V8ArrayBufferView::hasInstance(arg, info.GetIsolate())) { |
| 238 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); | 238 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); |
| 239 ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(objec
t); | 239 ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(objec
t); |
| 240 ASSERT(arrayBufferView); | 240 ASSERT(arrayBufferView); |
| 241 xmlHttpRequest->send(arrayBufferView, exceptionState); | 241 xmlHttpRequest->send(arrayBufferView, exceptionState); |
| 242 } else { | 242 } else { |
| 243 TOSTRING_VOID(V8StringResource<WithNullCheck>, argString, arg); | 243 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, argString, ar
g); |
| 244 xmlHttpRequest->send(argString, exceptionState); | 244 xmlHttpRequest->send(argString, exceptionState); |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 | 247 |
| 248 exceptionState.throwIfNeeded(); | 248 exceptionState.throwIfNeeded(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace WebCore | 251 } // namespace WebCore |
| OLD | NEW |