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/Response.h" | 5 #include "modules/fetch/Response.h" |
6 | 6 |
7 #include "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ReadableStreamOperations.h" | 9 #include "bindings/core/v8/ReadableStreamOperations.h" |
10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 for (unsigned i = 0; i < statusText.length(); ++i) { | 94 for (unsigned i = 0; i < statusText.length(); ++i) { |
95 UChar c = statusText[i]; | 95 UChar c = statusText[i]; |
96 if (!(c == 0x09 // HTAB | 96 if (!(c == 0x09 // HTAB |
97 || (0x20 <= c && c <= 0x7E) // SP / VCHAR | 97 || (0x20 <= c && c <= 0x7E) // SP / VCHAR |
98 || (0x80 <= c && c <= 0xFF))) // obs-text | 98 || (0x80 <= c && c <= 0xFF))) // obs-text |
99 return false; | 99 return false; |
100 } | 100 } |
101 return true; | 101 return true; |
102 } | 102 } |
103 | 103 |
104 } | 104 } // namespace |
105 | 105 |
106 Response* Response::create(ScriptState* scriptState, ExceptionState& exceptionSt
ate) | 106 Response* Response::create(ScriptState* scriptState, ExceptionState& exceptionSt
ate) |
107 { | 107 { |
108 return create(scriptState->executionContext(), nullptr, String(), ResponseIn
it(), exceptionState); | 108 return create(scriptState->executionContext(), nullptr, String(), ResponseIn
it(), exceptionState); |
109 } | 109 } |
110 | 110 |
111 Response* Response::create(ScriptState* scriptState, ScriptValue bodyValue, cons
t Dictionary& init, ExceptionState& exceptionState) | 111 Response* Response::create(ScriptState* scriptState, ScriptValue bodyValue, cons
t Dictionary& init, ExceptionState& exceptionState) |
112 { | 112 { |
113 v8::Local<v8::Value> body = bodyValue.v8Value(); | 113 v8::Local<v8::Value> body = bodyValue.v8Value(); |
114 v8::Isolate* isolate = scriptState->isolate(); | 114 v8::Isolate* isolate = scriptState->isolate(); |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 } | 396 } |
397 | 397 |
398 DEFINE_TRACE(Response) | 398 DEFINE_TRACE(Response) |
399 { | 399 { |
400 Body::trace(visitor); | 400 Body::trace(visitor); |
401 visitor->trace(m_response); | 401 visitor->trace(m_response); |
402 visitor->trace(m_headers); | 402 visitor->trace(m_headers); |
403 } | 403 } |
404 | 404 |
405 } // namespace blink | 405 } // namespace blink |
OLD | NEW |