Chromium Code Reviews| Index: Source/core/dom/PendingScript.cpp |
| diff --git a/Source/core/dom/PendingScript.cpp b/Source/core/dom/PendingScript.cpp |
| index 143e6680b7c9f92eb4a9087fd54e9b2a75240e34..a3601a960d17c1cecec68ce2bb2e77bf44715148 100644 |
| --- a/Source/core/dom/PendingScript.cpp |
| +++ b/Source/core/dom/PendingScript.cpp |
| @@ -40,13 +40,12 @@ PendingScript::~PendingScript() |
| void PendingScript::watchForLoad(ScriptResourceClient* client) |
| { |
| ASSERT(!m_watchingForLoad); |
| - ASSERT(!isReady()); |
|
haraken
2014/10/15 15:09:41
Can we keep this ASSERT? The comment implies that
marja
2014/10/16 15:19:03
Ditto
|
| + // addClient() will call notifyFinished() if the load is complete. Callers |
| + // who do not expect to be re-entered from this call should not call |
| + // watchForLoad for a PendingScript which isReady. |
| if (m_streamer) { |
| m_streamer->addClient(client); |
| } else { |
| - // addClient() will call notifyFinished() if the load is |
| - // complete. Callers do not expect to be re-entered from this call, so |
| - // they should not become a client of an already-loaded Resource. |
| resource()->addClient(client); |
| } |
| m_watchingForLoad = true; |