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

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

Issue 779393002: Turn DocumentParser::pinToMainThread into a cleaner api (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/core/loader/DocumentWriter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 } 1603 }
1604 1604
1605 void XMLHttpRequest::parseDocumentChunk(const char* data, unsigned len) 1605 void XMLHttpRequest::parseDocumentChunk(const char* data, unsigned len)
1606 { 1606 {
1607 if (!m_responseDocumentParser) { 1607 if (!m_responseDocumentParser) {
1608 ASSERT(!m_responseDocument); 1608 ASSERT(!m_responseDocument);
1609 initResponseDocument(); 1609 initResponseDocument();
1610 if (!m_responseDocument) 1610 if (!m_responseDocument)
1611 return; 1611 return;
1612 1612
1613 m_responseDocumentParser = m_responseDocument->implicitOpen(); 1613 m_responseDocumentParser = m_responseDocument->implicitOpen(AllowAsynchr onousParsing);
1614 m_responseDocumentParser->addClient(this); 1614 m_responseDocumentParser->addClient(this);
1615 } 1615 }
1616 ASSERT(m_responseDocumentParser); 1616 ASSERT(m_responseDocumentParser);
1617 1617
1618 if (m_responseDocumentParser->needsDecoder()) 1618 if (m_responseDocumentParser->needsDecoder())
1619 m_responseDocumentParser->setDecoder(createDecoder()); 1619 m_responseDocumentParser->setDecoder(createDecoder());
1620 1620
1621 m_responseDocumentParser->appendBytes(data, len); 1621 m_responseDocumentParser->appendBytes(data, len);
1622 } 1622 }
1623 1623
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 visitor->trace(m_responseDocument); 1792 visitor->trace(m_responseDocument);
1793 visitor->trace(m_responseDocumentParser); 1793 visitor->trace(m_responseDocumentParser);
1794 visitor->trace(m_progressEventThrottle); 1794 visitor->trace(m_progressEventThrottle);
1795 visitor->trace(m_upload); 1795 visitor->trace(m_upload);
1796 visitor->trace(m_blobLoader); 1796 visitor->trace(m_blobLoader);
1797 XMLHttpRequestEventTarget::trace(visitor); 1797 XMLHttpRequestEventTarget::trace(visitor);
1798 DocumentParserClient::trace(visitor); 1798 DocumentParserClient::trace(visitor);
1799 } 1799 }
1800 1800
1801 } // namespace blink 1801 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentWriter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698