OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> |
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> |
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. |
6 * Copyright (C) 2012 Intel Corporation | 6 * Copyright (C) 2012 Intel Corporation |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 return 0; | 305 return 0; |
306 | 306 |
307 if (!m_responseArrayBuffer.get() && m_binaryResponseBuilder.get() && m_binar
yResponseBuilder->size() > 0) { | 307 if (!m_responseArrayBuffer.get() && m_binaryResponseBuilder.get() && m_binar
yResponseBuilder->size() > 0) { |
308 m_responseArrayBuffer = m_binaryResponseBuilder->getAsArrayBuffer(); | 308 m_responseArrayBuffer = m_binaryResponseBuilder->getAsArrayBuffer(); |
309 m_binaryResponseBuilder.clear(); | 309 m_binaryResponseBuilder.clear(); |
310 } | 310 } |
311 | 311 |
312 return m_responseArrayBuffer.get(); | 312 return m_responseArrayBuffer.get(); |
313 } | 313 } |
314 | 314 |
315 void XMLHttpRequest::setTimeout(unsigned long timeout, ExceptionCode& ec) | 315 void XMLHttpRequest::setTimeout(unsigned timeout, ExceptionCode& ec) |
316 { | 316 { |
317 // FIXME: Need to trigger or update the timeout Timer here, if needed. http:
//webkit.org/b/98156 | 317 // FIXME: Need to trigger or update the timeout Timer here, if needed. http:
//webkit.org/b/98156 |
318 // XHR2 spec, 4.7.3. "This implies that the timeout attribute can be set whi
le fetching is in progress. If that occurs it will still be measured relative to
the start of fetching." | 318 // XHR2 spec, 4.7.3. "This implies that the timeout attribute can be set whi
le fetching is in progress. If that occurs it will still be measured relative to
the start of fetching." |
319 if (scriptExecutionContext()->isDocument() && !m_async) { | 319 if (scriptExecutionContext()->isDocument() && !m_async) { |
320 logConsoleError(scriptExecutionContext(), "XMLHttpRequest.timeout cannot
be set for synchronous HTTP(S) requests made from the window context."); | 320 logConsoleError(scriptExecutionContext(), "XMLHttpRequest.timeout cannot
be set for synchronous HTTP(S) requests made from the window context."); |
321 ec = InvalidAccessError; | 321 ec = InvalidAccessError; |
322 return; | 322 return; |
323 } | 323 } |
324 m_timeoutMilliseconds = timeout; | 324 m_timeoutMilliseconds = timeout; |
325 } | 325 } |
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 { | 1249 { |
1250 return &m_eventTargetData; | 1250 return &m_eventTargetData; |
1251 } | 1251 } |
1252 | 1252 |
1253 EventTargetData* XMLHttpRequest::ensureEventTargetData() | 1253 EventTargetData* XMLHttpRequest::ensureEventTargetData() |
1254 { | 1254 { |
1255 return &m_eventTargetData; | 1255 return &m_eventTargetData; |
1256 } | 1256 } |
1257 | 1257 |
1258 } // namespace WebCore | 1258 } // namespace WebCore |
OLD | NEW |