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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
232 | 232 |
233 // We will not have a scriptRunner when parsing a DocumentFragment. | 233 // We will not have a scriptRunner when parsing a DocumentFragment. |
234 if (m_scriptRunner) | 234 if (m_scriptRunner) |
235 document()->setReadyState(Document::Interactive); | 235 document()->setReadyState(Document::Interactive); |
236 | 236 |
237 // Setting the ready state above can fire mutation event and detach us | 237 // Setting the ready state above can fire mutation event and detach us |
238 // from underneath. In that case, just bail out. | 238 // from underneath. In that case, just bail out. |
239 if (isDetached()) | 239 if (isDetached()) |
240 return; | 240 return; |
241 | 241 |
242 #if ENABLE(OILPAN) | |
243 // The Oilpan sub-variant of the above; the document (parser) may | |
244 // only have stopped by this stage, but the parser hasn't been cancelled | |
245 // and detached. (The will not currently happen when the LocalFrame | |
246 // is finalized either.) Hence, a stopped parser is the strongest | |
247 // condition we can test for here. Bail, if so. | |
248 if (isStopped()) | |
haraken
2014/09/08 07:25:58
Can we simply replace the above isDetached() with
sof
2014/09/08 21:17:46
I thought it worthwhile to call out as separate at
| |
249 return; | |
250 #endif | |
251 | |
252 | |
242 attemptToRunDeferredScriptsAndEnd(); | 253 attemptToRunDeferredScriptsAndEnd(); |
243 } | 254 } |
244 | 255 |
245 bool HTMLDocumentParser::isParsingFragment() const | 256 bool HTMLDocumentParser::isParsingFragment() const |
246 { | 257 { |
247 return m_treeBuilder->isParsingFragment(); | 258 return m_treeBuilder->isParsingFragment(); |
248 } | 259 } |
249 | 260 |
250 bool HTMLDocumentParser::processingData() const | 261 bool HTMLDocumentParser::processingData() const |
251 { | 262 { |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1071 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) | 1082 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) |
1072 { | 1083 { |
1073 ASSERT(decoder); | 1084 ASSERT(decoder); |
1074 DecodedDataDocumentParser::setDecoder(decoder); | 1085 DecodedDataDocumentParser::setDecoder(decoder); |
1075 | 1086 |
1076 if (m_haveBackgroundParser) | 1087 if (m_haveBackgroundParser) |
1077 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco der, m_backgroundParser, takeDecoder())); | 1088 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco der, m_backgroundParser, takeDecoder())); |
1078 } | 1089 } |
1079 | 1090 |
1080 } | 1091 } |
OLD | NEW |