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

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

Issue 2181243002: Move ThreadableLoader to Oilpan heap (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onheap-bridge-peer-in-worker-threadable-loader
Patch Set: fix Created 4 years, 4 months 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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 if (!m_loader) 1013 if (!m_loader)
1014 return true; 1014 return true;
1015 1015
1016 // Cancelling the ThreadableLoader m_loader may result in calling 1016 // Cancelling the ThreadableLoader m_loader may result in calling
1017 // window.onload synchronously. If such an onload handler contains open() 1017 // window.onload synchronously. If such an onload handler contains open()
1018 // call on the same XMLHttpRequest object, reentry happens. 1018 // call on the same XMLHttpRequest object, reentry happens.
1019 // 1019 //
1020 // If, window.onload contains open() and send(), m_loader will be set to 1020 // If, window.onload contains open() and send(), m_loader will be set to
1021 // non 0 value. So, we cannot continue the outer open(). In such case, 1021 // non 0 value. So, we cannot continue the outer open(). In such case,
1022 // just abort the outer open() by returning false. 1022 // just abort the outer open() by returning false.
1023 std::unique_ptr<ThreadableLoader> loader = std::move(m_loader); 1023 ThreadableLoader* loader = m_loader.release();
1024 loader->cancel(); 1024 loader->cancel();
1025 1025
1026 // If abort() called internalAbort() and a nested open() ended up 1026 // If abort() called internalAbort() and a nested open() ended up
1027 // clearing the error flag, but didn't send(), make sure the error 1027 // clearing the error flag, but didn't send(), make sure the error
1028 // flag is still set. 1028 // flag is still set.
1029 bool newLoadStarted = m_loader.get(); 1029 bool newLoadStarted = m_loader.get();
1030 if (!newLoadStarted) 1030 if (!newLoadStarted)
1031 m_error = true; 1031 m_error = true;
1032 1032
1033 return !newLoadStarted; 1033 return !newLoadStarted;
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 1696
1697 ExecutionContext* XMLHttpRequest::getExecutionContext() const 1697 ExecutionContext* XMLHttpRequest::getExecutionContext() const
1698 { 1698 {
1699 return ActiveDOMObject::getExecutionContext(); 1699 return ActiveDOMObject::getExecutionContext();
1700 } 1700 }
1701 1701
1702 DEFINE_TRACE(XMLHttpRequest) 1702 DEFINE_TRACE(XMLHttpRequest)
1703 { 1703 {
1704 visitor->trace(m_responseBlob); 1704 visitor->trace(m_responseBlob);
1705 visitor->trace(m_responseLegacyStream); 1705 visitor->trace(m_responseLegacyStream);
1706 visitor->trace(m_loader);
1706 visitor->trace(m_responseDocument); 1707 visitor->trace(m_responseDocument);
1707 visitor->trace(m_responseDocumentParser); 1708 visitor->trace(m_responseDocumentParser);
1708 visitor->trace(m_responseArrayBuffer); 1709 visitor->trace(m_responseArrayBuffer);
1709 visitor->trace(m_progressEventThrottle); 1710 visitor->trace(m_progressEventThrottle);
1710 visitor->trace(m_upload); 1711 visitor->trace(m_upload);
1711 visitor->trace(m_blobLoader); 1712 visitor->trace(m_blobLoader);
1712 XMLHttpRequestEventTarget::trace(visitor); 1713 XMLHttpRequestEventTarget::trace(visitor);
1713 DocumentParserClient::trace(visitor); 1714 DocumentParserClient::trace(visitor);
1714 ActiveDOMObject::trace(visitor); 1715 ActiveDOMObject::trace(visitor);
1715 } 1716 }
1716 1717
1717 DEFINE_TRACE_WRAPPERS(XMLHttpRequest) 1718 DEFINE_TRACE_WRAPPERS(XMLHttpRequest)
1718 { 1719 {
1719 visitor->traceWrappers(m_responseBlob); 1720 visitor->traceWrappers(m_responseBlob);
1720 visitor->traceWrappers(m_responseLegacyStream); 1721 visitor->traceWrappers(m_responseLegacyStream);
1721 visitor->traceWrappers(m_responseDocument); 1722 visitor->traceWrappers(m_responseDocument);
1722 visitor->traceWrappers(m_responseArrayBuffer); 1723 visitor->traceWrappers(m_responseArrayBuffer);
1723 } 1724 }
1724 1725
1725 } // namespace blink 1726 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698