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

Side by Side Diff: Source/core/html/parser/HTMLDocumentParser.cpp

Issue 298863010: Oilpan: have PendingScripts trace their script elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add PendingScript::m_element comment + GC plugin annotation. Created 6 years, 7 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) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ASSERT(!m_haveBackgroundParser); 154 ASSERT(!m_haveBackgroundParser);
155 // FIXME: We should be able to ASSERT(m_speculations.isEmpty()), 155 // FIXME: We should be able to ASSERT(m_speculations.isEmpty()),
156 // but there are cases where that's not true currently. For example, 156 // but there are cases where that's not true currently. For example,
157 // we we're told to stop parsing before we've consumed all the input. 157 // we we're told to stop parsing before we've consumed all the input.
158 #endif 158 #endif
159 } 159 }
160 160
161 void HTMLDocumentParser::trace(Visitor* visitor) 161 void HTMLDocumentParser::trace(Visitor* visitor)
162 { 162 {
163 visitor->trace(m_treeBuilder); 163 visitor->trace(m_treeBuilder);
164 // FIXME: Oilpan: m_scriptRunner is a traced OwnPtr. This is done
165 // so as to allow its destructor to refer to its 'host' (this
166 // HTMLDocumentParser object) when tidying up. Determine if there
167 // is a way to put HTMLScriptRunner on the heap while taking care
168 // of its finalization. It cannot be a part object, as
169 // m_scriptRunner isn't set for DocumentFragment parsing.
170 //
171 // See PendingScript::trace() comment for more background.
172 visitor->trace(m_scriptRunner);
164 ScriptableDocumentParser::trace(visitor); 173 ScriptableDocumentParser::trace(visitor);
165 } 174 }
166 175
167 void HTMLDocumentParser::pinToMainThread() 176 void HTMLDocumentParser::pinToMainThread()
168 { 177 {
169 ASSERT(!m_haveBackgroundParser); 178 ASSERT(!m_haveBackgroundParser);
170 ASSERT(!m_isPinnedToMainThread); 179 ASSERT(!m_isPinnedToMainThread);
171 m_isPinnedToMainThread = true; 180 m_isPinnedToMainThread = true;
172 if (!m_tokenizer) { 181 if (!m_tokenizer) {
173 ASSERT(!m_token); 182 ASSERT(!m_token);
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) 1077 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder)
1069 { 1078 {
1070 ASSERT(decoder); 1079 ASSERT(decoder);
1071 DecodedDataDocumentParser::setDecoder(decoder); 1080 DecodedDataDocumentParser::setDecoder(decoder);
1072 1081
1073 if (m_haveBackgroundParser) 1082 if (m_haveBackgroundParser)
1074 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco der, m_backgroundParser, takeDecoder())); 1083 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco der, m_backgroundParser, takeDecoder()));
1075 } 1084 }
1076 1085
1077 } 1086 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698