Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 7 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 554 | 554 |
| 555 return true; | 555 return true; |
| 556 } | 556 } |
| 557 | 557 |
| 558 void ScriptLoader::execute() { | 558 void ScriptLoader::execute() { |
| 559 DCHECK(!m_willBeParserExecuted); | 559 DCHECK(!m_willBeParserExecuted); |
| 560 DCHECK(m_asyncExecType != ScriptRunner::None); | 560 DCHECK(m_asyncExecType != ScriptRunner::None); |
| 561 DCHECK(m_pendingScript->resource()); | 561 DCHECK(m_pendingScript->resource()); |
| 562 bool errorOccurred = false; | 562 bool errorOccurred = false; |
| 563 ScriptSourceCode source = m_pendingScript->getSource(KURL(), errorOccurred); | 563 ScriptSourceCode source = m_pendingScript->getSource(KURL(), errorOccurred); |
| 564 Element* element = m_pendingScript->releaseElementAndClear(); | 564 m_pendingScript->dispose(); |
|
yhirano
2016/11/29 01:29:00
Can you tell me why we can call stopWatchingLoad h
kouhei (in TOK)
2016/11/29 01:52:57
At this point, we are certain that we have finishe
| |
| 565 ALLOW_UNUSED_LOCAL(element); | |
| 566 if (errorOccurred) { | 565 if (errorOccurred) { |
| 567 dispatchErrorEvent(); | 566 dispatchErrorEvent(); |
| 568 } else if (!m_resource->wasCanceled()) { | 567 } else if (!m_resource->wasCanceled()) { |
| 569 if (executeScript(source)) | 568 if (executeScript(source)) |
| 570 dispatchLoadEvent(); | 569 dispatchLoadEvent(); |
| 571 else | 570 else |
| 572 dispatchErrorEvent(); | 571 dispatchErrorEvent(); |
| 573 } | 572 } |
| 574 m_resource = nullptr; | 573 m_resource = nullptr; |
| 575 } | 574 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 647 if (isHTMLScriptLoader(element)) | 646 if (isHTMLScriptLoader(element)) |
| 648 return toHTMLScriptElement(element)->loader(); | 647 return toHTMLScriptElement(element)->loader(); |
| 649 | 648 |
| 650 if (isSVGScriptLoader(element)) | 649 if (isSVGScriptLoader(element)) |
| 651 return toSVGScriptElement(element)->loader(); | 650 return toSVGScriptElement(element)->loader(); |
| 652 | 651 |
| 653 return 0; | 652 return 0; |
| 654 } | 653 } |
| 655 | 654 |
| 656 } // namespace blink | 655 } // namespace blink |
| OLD | NEW |