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

Side by Side Diff: third_party/WebKit/Source/core/dom/PendingScript.cpp

Issue 1579503004: Clear integrity failure bit in PendingScript on release (Closed) Base URL: https://chromium.googlesource.com/chromium/src@2564
Patch Set: Created 4 years, 11 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) 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void PendingScript::setElement(Element* element) 111 void PendingScript::setElement(Element* element)
112 { 112 {
113 m_element = element; 113 m_element = element;
114 } 114 }
115 115
116 PassRefPtrWillBeRawPtr<Element> PendingScript::releaseElementAndClear() 116 PassRefPtrWillBeRawPtr<Element> PendingScript::releaseElementAndClear()
117 { 117 {
118 setScriptResource(0); 118 setScriptResource(0);
119 m_watchingForLoad = false; 119 m_watchingForLoad = false;
120 m_startingPosition = TextPosition::belowRangePosition(); 120 m_startingPosition = TextPosition::belowRangePosition();
121 m_integrityFailure = false;
121 if (m_streamer) 122 if (m_streamer)
122 m_streamer->cancel(); 123 m_streamer->cancel();
123 m_streamer.release(); 124 m_streamer.release();
124 return m_element.release(); 125 return m_element.release();
125 } 126 }
126 127
127 void PendingScript::setScriptResource(ScriptResource* resource) 128 void PendingScript::setScriptResource(ScriptResource* resource)
128 { 129 {
129 setResource(resource); 130 setResource(resource);
130 } 131 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 bool PendingScript::isReady() const 211 bool PendingScript::isReady() const
211 { 212 {
212 if (resource() && !resource()->isLoaded()) 213 if (resource() && !resource()->isLoaded())
213 return false; 214 return false;
214 if (m_streamer && !m_streamer->isFinished()) 215 if (m_streamer && !m_streamer->isFinished())
215 return false; 216 return false;
216 return true; 217 return true;
217 } 218 }
218 219
219 } 220 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698