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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptLoader.cpp

Issue 2658213004: [TEST] Forbid reentering ScriptLoader::prepareScript()
Patch Set: more DCHECK Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index 16c5e50d74c88c5fa276f2fe1e64983009b9733e..5842611d592b99789b232eea1723f8e9f1b8ba29 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -202,6 +202,13 @@ bool ScriptLoader::isScriptTypeSupported(
// http://dev.w3.org/html5/spec/Overview.html#prepare-a-script
bool ScriptLoader::prepareScript(const TextPosition& scriptStartPosition,
LegacyTypeSupport supportLegacyTypes) {
+ DCHECK(!m_inPrepareScript);
+ AutoReset<bool> inPrepareScriptScope(&m_inPrepareScript, true);
+
+ DCHECK(!m_willBeParserExecuted);
+ DCHECK(!m_willExecuteWhenDocumentFinishedParsing);
+ DCHECK(!m_readyToBeParserExecuted);
+
if (m_alreadyStarted)
return false;
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698