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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 } | 914 } |
915 | 915 |
916 m_exceptionCode = 0; | 916 m_exceptionCode = 0; |
917 m_error = false; | 917 m_error = false; |
918 | 918 |
919 if (m_async) { | 919 if (m_async) { |
920 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestAsynchron
ous); | 920 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestAsynchron
ous); |
921 if (m_upload) | 921 if (m_upload) |
922 request.setReportUploadProgress(true); | 922 request.setReportUploadProgress(true); |
923 | 923 |
924 // ThreadableLoader::create can return null here, for example if we're n
o longer attached to a page. | |
925 // This is true while running onunload handlers. | |
926 // FIXME: Maybe we need to be able to send XMLHttpRequests from onunload
, <http://bugs.webkit.org/show_bug.cgi?id=10904>. | |
927 // FIXME: Maybe create() can return null for other reasons too? | |
928 ASSERT(!m_loader); | 924 ASSERT(!m_loader); |
929 m_loader = ThreadableLoader::create(executionContext, this, request, opt
ions, resourceLoaderOptions); | 925 m_loader = ThreadableLoader::create(executionContext, this, options, res
ourceLoaderOptions); |
| 926 m_loader->start(request); |
930 | 927 |
931 return; | 928 return; |
932 } | 929 } |
933 | 930 |
934 // Use count for XHR synchronous requests. | 931 // Use count for XHR synchronous requests. |
935 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestSynchronous); | 932 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestSynchronous); |
936 ThreadableLoader::loadResourceSynchronously(executionContext, request, *this
, options, resourceLoaderOptions); | 933 ThreadableLoader::loadResourceSynchronously(executionContext, request, *this
, options, resourceLoaderOptions); |
937 | 934 |
938 throwForLoadFailureIfNeeded(exceptionState, String()); | 935 throwForLoadFailureIfNeeded(exceptionState, String()); |
939 } | 936 } |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 visitor->trace(m_responseDocumentParser); | 1701 visitor->trace(m_responseDocumentParser); |
1705 visitor->trace(m_progressEventThrottle); | 1702 visitor->trace(m_progressEventThrottle); |
1706 visitor->trace(m_upload); | 1703 visitor->trace(m_upload); |
1707 visitor->trace(m_blobLoader); | 1704 visitor->trace(m_blobLoader); |
1708 XMLHttpRequestEventTarget::trace(visitor); | 1705 XMLHttpRequestEventTarget::trace(visitor); |
1709 DocumentParserClient::trace(visitor); | 1706 DocumentParserClient::trace(visitor); |
1710 ActiveDOMObject::trace(visitor); | 1707 ActiveDOMObject::trace(visitor); |
1711 } | 1708 } |
1712 | 1709 |
1713 } // namespace blink | 1710 } // namespace blink |
OLD | NEW |