Chromium Code Reviews| 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 550 ASSERT(token().isUninitialized()); | 550 ASSERT(token().isUninitialized()); |
| 551 } | 551 } |
| 552 | 552 |
| 553 // Ensure we haven't been totally deref'ed after pumping. Any caller of this | 553 // Ensure we haven't been totally deref'ed after pumping. Any caller of this |
| 554 // function should be holding a RefPtr to this to ensure we weren't deleted. | 554 // function should be holding a RefPtr to this to ensure we weren't deleted. |
| 555 ASSERT(refCount() >= 1); | 555 ASSERT(refCount() >= 1); |
| 556 | 556 |
| 557 if (isStopped()) | 557 if (isStopped()) |
| 558 return; | 558 return; |
| 559 | 559 |
| 560 if (mode == ForceSynchronous) | |
| 561 m_treeBuilder->flush(); | |
|
abarth-chromium
2013/10/11 18:54:04
Don't you need to check
if (isStopped())
ret
| |
| 562 | |
| 560 if (session.needsYield) | 563 if (session.needsYield) |
| 561 m_parserScheduler->scheduleForResume(); | 564 m_parserScheduler->scheduleForResume(); |
| 562 | 565 |
| 563 if (isWaitingForScripts()) { | 566 if (isWaitingForScripts()) { |
| 564 ASSERT(m_tokenizer->state() == HTMLTokenizer::DataState); | 567 ASSERT(m_tokenizer->state() == HTMLTokenizer::DataState); |
| 565 if (!m_preloadScanner) { | 568 if (!m_preloadScanner) { |
| 566 m_preloadScanner = adoptPtr(new HTMLPreloadScanner(m_options, docume nt()->url(), document()->devicePixelRatio())); | 569 m_preloadScanner = adoptPtr(new HTMLPreloadScanner(m_options, docume nt()->url(), document()->devicePixelRatio())); |
| 567 m_preloadScanner->appendToEnd(m_input.current()); | 570 m_preloadScanner->appendToEnd(m_input.current()); |
| 568 } | 571 } |
| 569 m_preloadScanner->scan(m_preloader.get(), document()->baseElementURL()); | 572 m_preloadScanner->scan(m_preloader.get(), document()->baseElementURL()); |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 957 m_parserScheduler->suspend(); | 960 m_parserScheduler->suspend(); |
| 958 } | 961 } |
| 959 | 962 |
| 960 void HTMLDocumentParser::resumeScheduledTasks() | 963 void HTMLDocumentParser::resumeScheduledTasks() |
| 961 { | 964 { |
| 962 if (m_parserScheduler) | 965 if (m_parserScheduler) |
| 963 m_parserScheduler->resume(); | 966 m_parserScheduler->resume(); |
| 964 } | 967 } |
| 965 | 968 |
| 966 } | 969 } |
| OLD | NEW |