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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 } | 926 } |
927 | 927 |
928 m_exceptionCode = 0; | 928 m_exceptionCode = 0; |
929 m_error = false; | 929 m_error = false; |
930 | 930 |
931 if (m_async) { | 931 if (m_async) { |
932 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestAsynchron
ous); | 932 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestAsynchron
ous); |
933 if (m_upload) | 933 if (m_upload) |
934 request.setReportUploadProgress(true); | 934 request.setReportUploadProgress(true); |
935 | 935 |
936 // ThreadableLoader::create can return null here, for example if we're n
o longer attached to a page. | |
937 // This is true while running onunload handlers. | |
938 // FIXME: Maybe we need to be able to send XMLHttpRequests from onunload
, <http://bugs.webkit.org/show_bug.cgi?id=10904>. | |
939 // FIXME: Maybe create() can return null for other reasons too? | |
940 ASSERT(!m_loader); | 936 ASSERT(!m_loader); |
941 m_loader = ThreadableLoader::create(executionContext, this, request, opt
ions, resourceLoaderOptions); | 937 m_loader = ThreadableLoader::create(executionContext, this, options, res
ourceLoaderOptions); |
| 938 m_loader->start(request); |
942 | 939 |
943 return; | 940 return; |
944 } | 941 } |
945 | 942 |
946 // Use count for XHR synchronous requests. | 943 // Use count for XHR synchronous requests. |
947 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestSynchronous); | 944 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestSynchronous); |
948 ThreadableLoader::loadResourceSynchronously(executionContext, request, *this
, options, resourceLoaderOptions); | 945 ThreadableLoader::loadResourceSynchronously(executionContext, request, *this
, options, resourceLoaderOptions); |
949 | 946 |
950 throwForLoadFailureIfNeeded(exceptionState, String()); | 947 throwForLoadFailureIfNeeded(exceptionState, String()); |
951 } | 948 } |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 visitor->trace(m_responseDocumentParser); | 1690 visitor->trace(m_responseDocumentParser); |
1694 visitor->trace(m_progressEventThrottle); | 1691 visitor->trace(m_progressEventThrottle); |
1695 visitor->trace(m_upload); | 1692 visitor->trace(m_upload); |
1696 visitor->trace(m_blobLoader); | 1693 visitor->trace(m_blobLoader); |
1697 XMLHttpRequestEventTarget::trace(visitor); | 1694 XMLHttpRequestEventTarget::trace(visitor); |
1698 DocumentParserClient::trace(visitor); | 1695 DocumentParserClient::trace(visitor); |
1699 ActiveDOMObject::trace(visitor); | 1696 ActiveDOMObject::trace(visitor); |
1700 } | 1697 } |
1701 | 1698 |
1702 } // namespace blink | 1699 } // namespace blink |
OLD | NEW |