OLD | NEW |
---|---|
1 // Copyright 2011, Google Inc. | 1 // Copyright 2011, Google Inc. |
2 // All rights reserved. | 2 // 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 Blob* asBlob = DartBlob::toNative(arg1, exception); | 142 Blob* asBlob = DartBlob::toNative(arg1, exception); |
143 if (exception) | 143 if (exception) |
144 goto fail; | 144 goto fail; |
145 receiver->send(asBlob, es); | 145 receiver->send(asBlob, es); |
146 } else if (DartDOMWrapper::instanceOf<DartFormData>(arg1)) { | 146 } else if (DartDOMWrapper::instanceOf<DartFormData>(arg1)) { |
147 DOMFormData* asDOMFormData = DartFormData::toNative(arg1, exception) ; | 147 DOMFormData* asDOMFormData = DartFormData::toNative(arg1, exception) ; |
148 if (exception) | 148 if (exception) |
149 goto fail; | 149 goto fail; |
150 receiver->send(asDOMFormData, es); | 150 receiver->send(asDOMFormData, es); |
151 } else if (DartUtilities::isTypedData(arg1)) { | 151 } else if (DartUtilities::isTypedData(arg1)) { |
152 RefPtr<ArrayBuffer> asArrayBuffer = DartUtilities::dartToArrayBuffer (arg1, exception); | 152 RefPtr<ArrayBufferView> asArrayBufferView = DartUtilities::dartToArr ayBufferView(arg1, exception); |
153 if (exception) | 153 if (exception) |
154 goto fail; | 154 goto fail; |
155 receiver->send(asArrayBuffer.get(), es); | 155 receiver->send(asArrayBufferView.get(), es); |
siva
2013/08/23 20:06:53
I think there is a bug in both
DartUtilities::dart
| |
156 } else { | 156 } else { |
157 DartStringAdapter asString = DartUtilities::dartToString(arg1, excep tion); | 157 DartStringAdapter asString = DartUtilities::dartToString(arg1, excep tion); |
158 if (exception) | 158 if (exception) |
159 goto fail; | 159 goto fail; |
160 receiver->send(asString, es); | 160 receiver->send(asString, es); |
161 } | 161 } |
162 | 162 |
163 if (es.hadException()) { | 163 if (es.hadException()) { |
164 exception = DartDOMWrapper::exceptionCodeToDartException(es); | 164 exception = DartDOMWrapper::exceptionCodeToDartException(es); |
165 goto fail; | 165 goto fail; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
273 } | 273 } |
274 | 274 |
275 fail: | 275 fail: |
276 Dart_ThrowException(exception); | 276 Dart_ThrowException(exception); |
277 ASSERT_NOT_REACHED(); | 277 ASSERT_NOT_REACHED(); |
278 } | 278 } |
279 | 279 |
280 } // DartXMLHttpRequestInternal | 280 } // DartXMLHttpRequestInternal |
281 | 281 |
282 } // WebCore | 282 } // WebCore |
OLD | NEW |