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 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 810 // if it was incremented in the earlier step." | 810 // if it was incremented in the earlier step." |
| 811 // Implemented as the scope out of IgnoreDestructiveWriteCountIncrementer. | 811 // Implemented as the scope out of IgnoreDestructiveWriteCountIncrementer. |
| 812 } | 812 } |
| 813 | 813 |
| 814 void ScriptLoader::execute() { | 814 void ScriptLoader::execute() { |
| 815 DCHECK(!m_willBeParserExecuted); | 815 DCHECK(!m_willBeParserExecuted); |
| 816 DCHECK(m_asyncExecType != ScriptRunner::None); | 816 DCHECK(m_asyncExecType != ScriptRunner::None); |
| 817 DCHECK(m_pendingScript->resource()); | 817 DCHECK(m_pendingScript->resource()); |
| 818 bool errorOccurred = false; | 818 bool errorOccurred = false; |
| 819 ScriptSourceCode source = m_pendingScript->getSource(KURL(), errorOccurred); | 819 ScriptSourceCode source = m_pendingScript->getSource(KURL(), errorOccurred); |
| 820 m_pendingScript->dispose(); | 820 m_pendingScript->dispose(); |
|
sof
2017/02/16 08:15:15
Call detach() instead? Actually, I think we should
hiroshige
2017/02/17 23:15:15
Done.
| |
| 821 m_pendingScript = nullptr; | |
| 821 if (errorOccurred) { | 822 if (errorOccurred) { |
| 822 dispatchErrorEvent(); | 823 dispatchErrorEvent(); |
| 823 } else if (!m_resource->wasCanceled()) { | 824 } else if (!m_resource->wasCanceled()) { |
| 824 if (executeScript(source)) | 825 if (executeScript(source)) |
| 825 dispatchLoadEvent(); | 826 dispatchLoadEvent(); |
| 826 else | 827 else |
| 827 dispatchErrorEvent(); | 828 dispatchErrorEvent(); |
| 828 } | 829 } |
| 829 m_resource = nullptr; | 830 m_resource = nullptr; |
| 830 } | 831 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 917 if (isHTMLScriptLoader(element)) | 918 if (isHTMLScriptLoader(element)) |
| 918 return toHTMLScriptElement(element)->loader(); | 919 return toHTMLScriptElement(element)->loader(); |
| 919 | 920 |
| 920 if (isSVGScriptLoader(element)) | 921 if (isSVGScriptLoader(element)) |
| 921 return toSVGScriptElement(element)->loader(); | 922 return toSVGScriptElement(element)->loader(); |
| 922 | 923 |
| 923 return 0; | 924 return 0; |
| 924 } | 925 } |
| 925 | 926 |
| 926 } // namespace blink | 927 } // namespace blink |
| OLD | NEW |