Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Side by Side Diff: Source/core/dom/ScriptLoader.h

Issue 1010433007: Fire error event when script integrity check fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual ~ScriptLoader(); 46 virtual ~ScriptLoader();
47 DECLARE_VIRTUAL_TRACE(); 47 DECLARE_VIRTUAL_TRACE();
48 48
49 Element* element() const { return m_element; } 49 Element* element() const { return m_element; }
50 50
51 enum LegacyTypeSupport { DisallowLegacyTypeInTypeAttribute, AllowLegacyTypeI nTypeAttribute }; 51 enum LegacyTypeSupport { DisallowLegacyTypeInTypeAttribute, AllowLegacyTypeI nTypeAttribute };
52 bool prepareScript(const TextPosition& scriptStartPosition = TextPosition::m inimumPosition(), LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute); 52 bool prepareScript(const TextPosition& scriptStartPosition = TextPosition::m inimumPosition(), LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute);
53 53
54 String scriptCharset() const { return m_characterEncoding; } 54 String scriptCharset() const { return m_characterEncoding; }
55 String scriptContent() const; 55 String scriptContent() const;
56 void executeScript(const ScriptSourceCode&, double* compilationFinishTime = 0); 56 // Returns false if and only if there was a fatal execution error, namely
Mike West 2015/03/23 19:49:43 Hrm. Perhaps "if execution was blocked"? What do w
jww 2015/03/23 21:56:52 Done. See responses in ScriptLoader.cpp for more d
57 // an integrity check failure.
58 bool executeScript(const ScriptSourceCode&, double* compilationFinishTime = 0);
57 virtual void execute(); 59 virtual void execute();
58 60
59 // XML parser calls these 61 // XML parser calls these
60 void dispatchLoadEvent(); 62 void dispatchLoadEvent();
61 void dispatchErrorEvent(); 63 void dispatchErrorEvent();
62 bool isScriptTypeSupported(LegacyTypeSupport) const; 64 bool isScriptTypeSupported(LegacyTypeSupport) const;
63 65
64 bool haveFiredLoadEvent() const { return m_haveFiredLoad; } 66 bool haveFiredLoadEvent() const { return m_haveFiredLoad; }
65 bool willBeParserExecuted() const { return m_willBeParserExecuted; } 67 bool willBeParserExecuted() const { return m_willBeParserExecuted; }
66 bool readyToBeParserExecuted() const { return m_readyToBeParserExecuted; } 68 bool readyToBeParserExecuted() const { return m_readyToBeParserExecuted; }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool m_willExecuteWhenDocumentFinishedParsing : 1; 116 bool m_willExecuteWhenDocumentFinishedParsing : 1;
115 bool m_forceAsync : 1; 117 bool m_forceAsync : 1;
116 bool m_willExecuteInOrder : 1; 118 bool m_willExecuteInOrder : 1;
117 }; 119 };
118 120
119 ScriptLoader* toScriptLoaderIfPossible(Element*); 121 ScriptLoader* toScriptLoaderIfPossible(Element*);
120 122
121 } // namespace blink 123 } // namespace blink
122 124
123 #endif // ScriptLoader_h 125 #endif // ScriptLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698