Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1350)

Side by Side Diff: WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp

Issue 5569001: Merge 72866 - Add send(ArrayBuffer) to XMLHttpRequest per XMLHttpRequest Leve... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « WebCore/bindings/js/JSXMLHttpRequestCustom.cpp ('k') | WebCore/xml/XMLHttpRequest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « WebCore/bindings/js/JSXMLHttpRequestCustom.cpp ('k') | WebCore/xml/XMLHttpRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698