| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } else if (V8Blob::HasInstance(arg)) { | 186 } else if (V8Blob::HasInstance(arg)) { |
| 187 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); | 187 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); |
| 188 Blob* blob = V8Blob::toNative(object); | 188 Blob* blob = V8Blob::toNative(object); |
| 189 ASSERT(blob); | 189 ASSERT(blob); |
| 190 xmlHttpRequest->send(blob, ec); | 190 xmlHttpRequest->send(blob, ec); |
| 191 } else if (V8DOMFormData::HasInstance(arg)) { | 191 } else if (V8DOMFormData::HasInstance(arg)) { |
| 192 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); | 192 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); |
| 193 DOMFormData* domFormData = V8DOMFormData::toNative(object); | 193 DOMFormData* domFormData = V8DOMFormData::toNative(object); |
| 194 ASSERT(domFormData); | 194 ASSERT(domFormData); |
| 195 xmlHttpRequest->send(domFormData, ec); | 195 xmlHttpRequest->send(domFormData, ec); |
| 196 #if ENABLE(3D_CANVAS) || ENABLE(BLOB) |
| 197 } else if (V8ArrayBuffer::HasInstance(arg)) { |
| 198 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); |
| 199 ArrayBuffer* arrayBuffer = V8ArrayBuffer::toNative(object); |
| 200 ASSERT(arrayBuffer); |
| 201 xmlHttpRequest->send(arrayBuffer, ec); |
| 202 #endif |
| 196 } else | 203 } else |
| 197 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec); | 204 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec); |
| 198 } | 205 } |
| 199 | 206 |
| 200 if (ec) | 207 if (ec) |
| 201 return throwError(ec); | 208 return throwError(ec); |
| 202 | 209 |
| 203 return v8::Undefined(); | 210 return v8::Undefined(); |
| 204 } | 211 } |
| 205 | 212 |
| 206 } // namespace WebCore | 213 } // namespace WebCore |
| OLD | NEW |