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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 UseCounter::count(frame, UseCounter::BlockedSniffingCSVToScript); | 728 UseCounter::count(frame, UseCounter::BlockedSniffingCSVToScript); |
729 return false; | 729 return false; |
730 } | 730 } |
731 | 731 |
732 logScriptMIMEType(frame, resource, mimeType); | 732 logScriptMIMEType(frame, resource, mimeType); |
733 } | 733 } |
734 | 734 |
735 AccessControlStatus accessControlStatus = NotSharableCrossOrigin; | 735 AccessControlStatus accessControlStatus = NotSharableCrossOrigin; |
736 if (!m_isExternalScript) { | 736 if (!m_isExternalScript) { |
737 accessControlStatus = SharableCrossOrigin; | 737 accessControlStatus = SharableCrossOrigin; |
738 } else if (sourceCode.resource()) { | 738 } else { |
| 739 CHECK(sourceCode.resource()); |
739 accessControlStatus = sourceCode.resource()->calculateAccessControlStatus( | 740 accessControlStatus = sourceCode.resource()->calculateAccessControlStatus( |
740 m_element->document().getSecurityOrigin()); | 741 m_element->document().getSecurityOrigin()); |
741 } | 742 } |
742 | 743 |
743 const bool isImportedScript = contextDocument != elementDocument; | 744 const bool isImportedScript = contextDocument != elementDocument; |
744 | 745 |
745 // 3. "If the script is from an external file, | 746 // 3. "If the script is from an external file, |
746 // or the script's type is module", | 747 // or the script's type is module", |
747 // then increment the ignore-destructive-writes counter of the | 748 // then increment the ignore-destructive-writes counter of the |
748 // script element's node document. Let neutralized doc be that Document." | 749 // script element's node document. Let neutralized doc be that Document." |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 // then abort these steps at this point. The script is not executed. | 864 // then abort these steps at this point. The script is not executed. |
864 return equalIgnoringCase(eventAttribute, "onload") || | 865 return equalIgnoringCase(eventAttribute, "onload") || |
865 equalIgnoringCase(eventAttribute, "onload()"); | 866 equalIgnoringCase(eventAttribute, "onload()"); |
866 } | 867 } |
867 | 868 |
868 String ScriptLoader::scriptContent() const { | 869 String ScriptLoader::scriptContent() const { |
869 return m_element->textFromChildren(); | 870 return m_element->textFromChildren(); |
870 } | 871 } |
871 | 872 |
872 } // namespace blink | 873 } // namespace blink |
OLD | NEW |