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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 return m_textPosition; | 376 return m_textPosition; |
| 377 } | 377 } |
| 378 | 378 |
| 379 bool HTMLDocumentParser::isWaitingForScripts() const | 379 bool HTMLDocumentParser::isWaitingForScripts() const |
| 380 { | 380 { |
| 381 return m_treeBuilder->hasParserBlockingScript() || m_scriptRunner.hasPending Scripts(); | 381 return m_treeBuilder->hasParserBlockingScript() || m_scriptRunner.hasPending Scripts(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 void HTMLDocumentParser::resumeAfterWaitingForImports() | 384 void HTMLDocumentParser::resumeAfterWaitingForImports() |
| 385 { | 385 { |
| 386 if (isStopped()) | |
| 387 return; | |
|
esprehn
2015/01/14 19:00:47
Why don't we always detach the parser when stoppin
abarth-chromium
2015/01/14 19:04:11
Oops. This branch shouldn't be here. That was ju
| |
| 386 RefPtr<HTMLDocumentParser> protect(this); | 388 RefPtr<HTMLDocumentParser> protect(this); |
| 387 if (m_scriptRunner.hasPendingScripts()) | 389 if (m_scriptRunner.hasPendingScripts()) |
| 388 m_scriptRunner.executePendingScripts(); | 390 m_scriptRunner.executePendingScripts(); |
| 389 ASSERT(!isExecutingScript()); | 391 ASSERT(!isExecutingScript()); |
| 390 ASSERT(!isWaitingForScripts()); | 392 ASSERT(!isWaitingForScripts()); |
| 393 if (m_speculations.isEmpty()) | |
| 394 return; | |
| 391 ASSERT(m_haveBackgroundParser); | 395 ASSERT(m_haveBackgroundParser); |
| 392 pumpPendingSpeculations(); | 396 pumpPendingSpeculations(); |
| 393 } | 397 } |
| 394 | 398 |
| 395 } | 399 } |
| OLD | NEW |