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

Side by Side Diff: Source/core/html/imports/HTMLImportLoader.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/html/TextDocument.cpp ('k') | Source/core/html/parser/HTMLDocumentParser.h » ('j') | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 setState(finishWriting()); 110 setState(finishWriting());
111 } 111 }
112 112
113 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR esponse& response) 113 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR esponse& response)
114 { 114 {
115 ASSERT(!m_imports.isEmpty()); 115 ASSERT(!m_imports.isEmpty());
116 DocumentInit init = DocumentInit(response.url(), 0, m_controller->master()-> contextDocument(), m_controller) 116 DocumentInit init = DocumentInit(response.url(), 0, m_controller->master()-> contextDocument(), m_controller)
117 .withRegistrationContext(m_controller->master()->registrationContext()); 117 .withRegistrationContext(m_controller->master()->registrationContext());
118 m_document = HTMLDocument::create(init); 118 m_document = HTMLDocument::create(init);
119 m_writer = DocumentWriter::create(m_document.get(), response.mimeType(), "UT F-8"); 119 m_writer = DocumentWriter::create(m_document.get(), AllowAsynchronousParsing , response.mimeType(), "UTF-8");
120 120
121 DocumentParser* parser = m_document->parser(); 121 DocumentParser* parser = m_document->parser();
122 ASSERT(parser); 122 ASSERT(parser);
123 parser->addClient(this); 123 parser->addClient(this);
124 124
125 return StateLoading; 125 return StateLoading;
126 } 126 }
127 127
128 HTMLImportLoader::State HTMLImportLoader::finishWriting() 128 HTMLImportLoader::State HTMLImportLoader::finishWriting()
129 { 129 {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 #if ENABLE(OILPAN) 231 #if ENABLE(OILPAN)
232 visitor->trace(m_imports); 232 visitor->trace(m_imports);
233 #endif 233 #endif
234 visitor->trace(m_document); 234 visitor->trace(m_document);
235 visitor->trace(m_writer); 235 visitor->trace(m_writer);
236 visitor->trace(m_microtaskQueue); 236 visitor->trace(m_microtaskQueue);
237 DocumentParserClient::trace(visitor); 237 DocumentParserClient::trace(visitor);
238 } 238 }
239 239
240 } // namespace blink 240 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/TextDocument.cpp ('k') | Source/core/html/parser/HTMLDocumentParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698