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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 void HTMLDocumentParser::end() | 821 void HTMLDocumentParser::end() |
822 { | 822 { |
823 ASSERT(!isDetached()); | 823 ASSERT(!isDetached()); |
824 ASSERT(!isScheduledForResume()); | 824 ASSERT(!isScheduledForResume()); |
825 | 825 |
826 if (m_haveBackgroundParser) | 826 if (m_haveBackgroundParser) |
827 stopBackgroundParser(); | 827 stopBackgroundParser(); |
828 | 828 |
829 // Informs the the rest of WebCore that parsing is really finished (and dele
tes this). | 829 // Informs the the rest of WebCore that parsing is really finished (and dele
tes this). |
830 m_treeBuilder->finished(); | 830 m_treeBuilder->finished(); |
| 831 |
| 832 DocumentParser::stopParsing(); |
831 } | 833 } |
832 | 834 |
833 void HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd() | 835 void HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd() |
834 { | 836 { |
835 ASSERT(isStopping()); | 837 ASSERT(isStopping()); |
836 // FIXME: It may not be correct to disable this for the background parser. | 838 // FIXME: It may not be correct to disable this for the background parser. |
837 // That means hasInsertionPoint() may not be correct in some cases. | 839 // That means hasInsertionPoint() may not be correct in some cases. |
838 ASSERT(!hasInsertionPoint() || m_haveBackgroundParser); | 840 ASSERT(!hasInsertionPoint() || m_haveBackgroundParser); |
839 if (m_scriptRunner && !m_scriptRunner->executeScriptsWaitingForParsing()) | 841 if (m_scriptRunner && !m_scriptRunner->executeScriptsWaitingForParsing()) |
840 return; | 842 return; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) | 1071 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) |
1070 { | 1072 { |
1071 ASSERT(decoder); | 1073 ASSERT(decoder); |
1072 DecodedDataDocumentParser::setDecoder(decoder); | 1074 DecodedDataDocumentParser::setDecoder(decoder); |
1073 | 1075 |
1074 if (m_haveBackgroundParser) | 1076 if (m_haveBackgroundParser) |
1075 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco
der, m_backgroundParser, takeDecoder())); | 1077 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco
der, m_backgroundParser, takeDecoder())); |
1076 } | 1078 } |
1077 | 1079 |
1078 } | 1080 } |
OLD | NEW |