| 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. With Oilpan, parser cancellation won't happen when |
| 246 // the LocalFrame is finalized. Hence, a stopped parser is the strongest |
| 247 // condition we can test for here. Bail, if so. |
| 248 if (isStopped()) |
| 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) | 1085 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) |
| 1075 { | 1086 { |
| 1076 ASSERT(decoder); | 1087 ASSERT(decoder); |
| 1077 DecodedDataDocumentParser::setDecoder(decoder); | 1088 DecodedDataDocumentParser::setDecoder(decoder); |
| 1078 | 1089 |
| 1079 if (m_haveBackgroundParser) | 1090 if (m_haveBackgroundParser) |
| 1080 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco
der, m_backgroundParser, takeDecoder())); | 1091 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco
der, m_backgroundParser, takeDecoder())); |
| 1081 } | 1092 } |
| 1082 | 1093 |
| 1083 } | 1094 } |
| OLD | NEW |