OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 void PendingScript::setElement(Element* element) | 110 void PendingScript::setElement(Element* element) |
111 { | 111 { |
112 m_element = element; | 112 m_element = element; |
113 } | 113 } |
114 | 114 |
115 PassRefPtrWillBeRawPtr<Element> PendingScript::releaseElementAndClear() | 115 PassRefPtrWillBeRawPtr<Element> PendingScript::releaseElementAndClear() |
116 { | 116 { |
117 setScriptResource(0); | 117 setScriptResource(0); |
118 m_watchingForLoad = false; | 118 m_watchingForLoad = false; |
119 m_startingPosition = TextPosition::belowRangePosition(); | 119 m_startingPosition = TextPosition::belowRangePosition(); |
| 120 m_integrityFailure = false; |
120 if (m_streamer) | 121 if (m_streamer) |
121 m_streamer->cancel(); | 122 m_streamer->cancel(); |
122 m_streamer.release(); | 123 m_streamer.release(); |
123 return m_element.release(); | 124 return m_element.release(); |
124 } | 125 } |
125 | 126 |
126 void PendingScript::setScriptResource(ScriptResource* resource) | 127 void PendingScript::setScriptResource(ScriptResource* resource) |
127 { | 128 { |
128 setResource(resource); | 129 setResource(resource); |
129 } | 130 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 bool PendingScript::isReady() const | 210 bool PendingScript::isReady() const |
210 { | 211 { |
211 if (resource() && !resource()->isLoaded()) | 212 if (resource() && !resource()->isLoaded()) |
212 return false; | 213 return false; |
213 if (m_streamer && !m_streamer->isFinished()) | 214 if (m_streamer && !m_streamer->isFinished()) |
214 return false; | 215 return false; |
215 return true; | 216 return true; |
216 } | 217 } |
217 | 218 |
218 } | 219 } |
OLD | NEW |