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

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

Issue 248013002: Elaborate error handling on ScriptLoader::finishLoading() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Landing Created 6 years, 7 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 | Annotate | Revision Log
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool fetchScript(const String& sourceUrl); 83 bool fetchScript(const String& sourceUrl);
84 void stopLoadRequest(); 84 void stopLoadRequest();
85 85
86 ScriptLoaderClient* client() const; 86 ScriptLoaderClient* client() const;
87 87
88 // ResourceClient 88 // ResourceClient
89 virtual void notifyFinished(Resource*) OVERRIDE; 89 virtual void notifyFinished(Resource*) OVERRIDE;
90 90
91 enum FinishType { 91 enum FinishType {
92 FinishSuccessfully, 92 FinishSuccessfully,
93 FinishWithErrorOrCancel 93 FinishWithCancel,
94 FinishWithError
94 }; 95 };
95 96
96 void finishLoading(Document* contextDocument, FinishType); 97 void finishLoading(Document* contextDocument, FinishType);
97 98
98 Element* m_element; 99 Element* m_element;
99 ResourcePtr<ScriptResource> m_resource; 100 ResourcePtr<ScriptResource> m_resource;
100 WTF::OrdinalNumber m_startLineNumber; 101 WTF::OrdinalNumber m_startLineNumber;
101 bool m_parserInserted : 1; 102 bool m_parserInserted : 1;
102 bool m_isExternalScript : 1; 103 bool m_isExternalScript : 1;
103 bool m_alreadyStarted : 1; 104 bool m_alreadyStarted : 1;
(...skipping 11 matching lines...) Expand all
115 116
116 inline PassOwnPtr<ScriptLoader> ScriptLoader::create(Element* element, bool crea tedByParser, bool isEvaluated) 117 inline PassOwnPtr<ScriptLoader> ScriptLoader::create(Element* element, bool crea tedByParser, bool isEvaluated)
117 { 118 {
118 return adoptPtr(new ScriptLoader(element, createdByParser, isEvaluated)); 119 return adoptPtr(new ScriptLoader(element, createdByParser, isEvaluated));
119 } 120 }
120 121
121 } 122 }
122 123
123 124
124 #endif 125 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/HTMLScriptElement/resources/do-nothing.js ('k') | Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698