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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 376 |
377 ReadableStream* XMLHttpRequest::responseStream() | 377 ReadableStream* XMLHttpRequest::responseStream() |
378 { | 378 { |
379 ASSERT(m_responseTypeCode == ResponseTypeStream); | 379 ASSERT(m_responseTypeCode == ResponseTypeStream); |
380 if (m_error || (m_state != LOADING && m_state != DONE)) | 380 if (m_error || (m_state != LOADING && m_state != DONE)) |
381 return 0; | 381 return 0; |
382 | 382 |
383 return m_responseStream; | 383 return m_responseStream; |
384 } | 384 } |
385 | 385 |
386 void XMLHttpRequest::setTimeout(unsigned long timeout, ExceptionState& exception
State) | 386 void XMLHttpRequest::setTimeout(unsigned timeout, ExceptionState& exceptionState
) |
387 { | 387 { |
388 // FIXME: Need to trigger or update the timeout Timer here, if needed. http:
//webkit.org/b/98156 | 388 // FIXME: Need to trigger or update the timeout Timer here, if needed. http:
//webkit.org/b/98156 |
389 // 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." | 389 // 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." |
390 if (executionContext()->isDocument() && !m_async) { | 390 if (executionContext()->isDocument() && !m_async) { |
391 exceptionState.throwDOMException(InvalidAccessError, "Timeouts cannot be
set for synchronous requests made from a document."); | 391 exceptionState.throwDOMException(InvalidAccessError, "Timeouts cannot be
set for synchronous requests made from a document."); |
392 return; | 392 return; |
393 } | 393 } |
394 | 394 |
395 m_timeoutMilliseconds = timeout; | 395 m_timeoutMilliseconds = timeout; |
396 | 396 |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1656 visitor->trace(m_responseDocument); | 1656 visitor->trace(m_responseDocument); |
1657 visitor->trace(m_responseDocumentParser); | 1657 visitor->trace(m_responseDocumentParser); |
1658 visitor->trace(m_progressEventThrottle); | 1658 visitor->trace(m_progressEventThrottle); |
1659 visitor->trace(m_upload); | 1659 visitor->trace(m_upload); |
1660 visitor->trace(m_blobLoader); | 1660 visitor->trace(m_blobLoader); |
1661 XMLHttpRequestEventTarget::trace(visitor); | 1661 XMLHttpRequestEventTarget::trace(visitor); |
1662 DocumentParserClient::trace(visitor); | 1662 DocumentParserClient::trace(visitor); |
1663 } | 1663 } |
1664 | 1664 |
1665 } // namespace blink | 1665 } // namespace blink |
OLD | NEW |