| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |