OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/fetch/RequestInit.h" | 5 #include "modules/fetch/RequestInit.h" |
6 | 6 |
7 #include "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
8 #include "bindings/core/v8/V8ArrayBuffer.h" | 8 #include "bindings/core/v8/V8ArrayBuffer.h" |
9 #include "bindings/core/v8/V8ArrayBufferView.h" | 9 #include "bindings/core/v8/V8ArrayBufferView.h" |
10 #include "bindings/core/v8/V8BindingForCore.h" | 10 #include "bindings/core/v8/V8BindingForCore.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } else { | 99 } else { |
100 exception_state.ThrowTypeError("Invalid referrer policy"); | 100 exception_state.ThrowTypeError("Invalid referrer policy"); |
101 return; | 101 return; |
102 } | 102 } |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 v8::Isolate* isolate = ToIsolate(context); | 106 v8::Isolate* isolate = ToIsolate(context); |
107 | 107 |
108 if (is_header_set) { | 108 if (is_header_set) { |
109 V8ByteStringSequenceSequenceOrByteStringByteStringRecordOrHeaders::toImpl( | 109 V8ByteStringSequenceSequenceOrByteStringByteStringRecord::toImpl( |
110 isolate, v8_headers, headers, UnionTypeConversionMode::kNotNullable, | 110 isolate, v8_headers, headers, UnionTypeConversionMode::kNotNullable, |
111 exception_state); | 111 exception_state); |
112 if (exception_state.HadException()) | 112 if (exception_state.HadException()) |
113 return; | 113 return; |
114 } | 114 } |
115 | 115 |
116 if (is_credential_set) { | 116 if (is_credential_set) { |
117 if (V8PasswordCredential::hasInstance(v8_credential, isolate)) { | 117 if (V8PasswordCredential::hasInstance(v8_credential, isolate)) { |
118 // TODO(mkwst): According to the spec, we'd serialize this once we touch | 118 // TODO(mkwst): According to the spec, we'd serialize this once we touch |
119 // the network. We're serializing it here, ahead of time, because lifetime | 119 // the network. We're serializing it here, ahead of time, because lifetime |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 AtomicString("application/x-www-form-urlencoded;charset=UTF-8"); | 163 AtomicString("application/x-www-form-urlencoded;charset=UTF-8"); |
164 body = new FormDataBytesConsumer(context, form_data.Release()); | 164 body = new FormDataBytesConsumer(context, form_data.Release()); |
165 } else if (v8_body->IsString()) { | 165 } else if (v8_body->IsString()) { |
166 content_type = "text/plain;charset=UTF-8"; | 166 content_type = "text/plain;charset=UTF-8"; |
167 body = new FormDataBytesConsumer( | 167 body = new FormDataBytesConsumer( |
168 ToUSVString(isolate, v8_body, exception_state)); | 168 ToUSVString(isolate, v8_body, exception_state)); |
169 } | 169 } |
170 } | 170 } |
171 | 171 |
172 } // namespace blink | 172 } // namespace blink |
OLD | NEW |