Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 XMLHttpRequest* xmlHttpRequest = new XMLHttpRequest(context, nullptr); 217 XMLHttpRequest* xmlHttpRequest = new XMLHttpRequest(context, nullptr);
218 xmlHttpRequest->suspendIfNeeded(); 218 xmlHttpRequest->suspendIfNeeded();
219 219
220 return xmlHttpRequest; 220 return xmlHttpRequest;
221 } 221 }
222 222
223 XMLHttpRequest::XMLHttpRequest( 223 XMLHttpRequest::XMLHttpRequest(
224 ExecutionContext* context, 224 ExecutionContext* context,
225 PassRefPtr<SecurityOrigin> isolatedWorldSecurityOrigin) 225 PassRefPtr<SecurityOrigin> isolatedWorldSecurityOrigin)
226 : ActiveScriptWrappable(this), 226 : ActiveScriptWrappable(this),
227 ActiveDOMObject(context), 227 SuspendableObject(context),
228 m_timeoutMilliseconds(0), 228 m_timeoutMilliseconds(0),
229 m_responseBlob(this, nullptr), 229 m_responseBlob(this, nullptr),
230 m_state(kUnsent), 230 m_state(kUnsent),
231 m_responseDocument(this, nullptr), 231 m_responseDocument(this, nullptr),
232 m_lengthDownloadedToFile(0), 232 m_lengthDownloadedToFile(0),
233 m_responseArrayBuffer(this, nullptr), 233 m_responseArrayBuffer(this, nullptr),
234 m_receivedLength(0), 234 m_receivedLength(0),
235 m_exceptionCode(0), 235 m_exceptionCode(0),
236 m_progressEventThrottle( 236 m_progressEventThrottle(
237 XMLHttpRequestProgressEventThrottle::create(this)), 237 XMLHttpRequestProgressEventThrottle::create(this)),
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 if (m_loader || m_responseDocumentParser) 1818 if (m_loader || m_responseDocumentParser)
1819 return true; 1819 return true;
1820 return m_eventDispatchRecursionLevel > 0; 1820 return m_eventDispatchRecursionLevel > 0;
1821 } 1821 }
1822 1822
1823 const AtomicString& XMLHttpRequest::interfaceName() const { 1823 const AtomicString& XMLHttpRequest::interfaceName() const {
1824 return EventTargetNames::XMLHttpRequest; 1824 return EventTargetNames::XMLHttpRequest;
1825 } 1825 }
1826 1826
1827 ExecutionContext* XMLHttpRequest::getExecutionContext() const { 1827 ExecutionContext* XMLHttpRequest::getExecutionContext() const {
1828 return ActiveDOMObject::getExecutionContext(); 1828 return SuspendableObject::getExecutionContext();
1829 } 1829 }
1830 1830
1831 DEFINE_TRACE(XMLHttpRequest) { 1831 DEFINE_TRACE(XMLHttpRequest) {
1832 visitor->trace(m_responseBlob); 1832 visitor->trace(m_responseBlob);
1833 visitor->trace(m_loader); 1833 visitor->trace(m_loader);
1834 visitor->trace(m_responseDocument); 1834 visitor->trace(m_responseDocument);
1835 visitor->trace(m_responseDocumentParser); 1835 visitor->trace(m_responseDocumentParser);
1836 visitor->trace(m_responseArrayBuffer); 1836 visitor->trace(m_responseArrayBuffer);
1837 visitor->trace(m_progressEventThrottle); 1837 visitor->trace(m_progressEventThrottle);
1838 visitor->trace(m_upload); 1838 visitor->trace(m_upload);
1839 visitor->trace(m_blobLoader); 1839 visitor->trace(m_blobLoader);
1840 XMLHttpRequestEventTarget::trace(visitor); 1840 XMLHttpRequestEventTarget::trace(visitor);
1841 DocumentParserClient::trace(visitor); 1841 DocumentParserClient::trace(visitor);
1842 ActiveDOMObject::trace(visitor); 1842 SuspendableObject::trace(visitor);
1843 } 1843 }
1844 1844
1845 DEFINE_TRACE_WRAPPERS(XMLHttpRequest) { 1845 DEFINE_TRACE_WRAPPERS(XMLHttpRequest) {
1846 visitor->traceWrappers(m_responseBlob); 1846 visitor->traceWrappers(m_responseBlob);
1847 visitor->traceWrappers(m_responseDocument); 1847 visitor->traceWrappers(m_responseDocument);
1848 visitor->traceWrappers(m_responseArrayBuffer); 1848 visitor->traceWrappers(m_responseArrayBuffer);
1849 XMLHttpRequestEventTarget::traceWrappers(visitor); 1849 XMLHttpRequestEventTarget::traceWrappers(visitor);
1850 } 1850 }
1851 1851
1852 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr) { 1852 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr) {
1853 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr); 1853 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr);
1854 } 1854 }
1855 1855
1856 } // namespace blink 1856 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698