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

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

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 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
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 c2762f5409fdf4caa46f60dd6a7f844c4724a4fb..ebb6d0ae35d08052b0880555af7d98ff0afa6f33 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -71,7 +71,7 @@ ScriptLoader::ScriptLoader(Element* element, bool parserInserted, bool alreadySt
, m_forceAsync(!parserInserted)
, m_createdDuringDocumentWrite(createdDuringDocumentWrite)
{
- ASSERT(m_element);
+ DCHECK(m_element);
if (parserInserted && element->document().scriptableDocumentParser() && !element->document().isInDocumentWrite())
m_startLineNumber = element->document().scriptableDocumentParser()->lineNumber();
}
@@ -284,13 +284,13 @@ bool ScriptLoader::prepareScript(const TextPosition& scriptStartPosition, Legacy
bool ScriptLoader::fetchScript(const String& sourceUrl, FetchRequest::DeferOption defer)
{
- ASSERT(m_element);
+ DCHECK(m_element);
RawPtr<Document> elementDocument(m_element->document());
if (!m_element->inShadowIncludingDocument() || m_element->document() != elementDocument)
return false;
- ASSERT(!m_resource);
+ DCHECK(!m_resource);
if (!stripLeadingAndTrailingHTMLSpaces(sourceUrl).isEmpty()) {
FetchRequest request(ResourceRequest(elementDocument->completeURL(sourceUrl)), m_element->localName());
@@ -335,13 +335,13 @@ bool ScriptLoader::fetchScript(const String& sourceUrl, FetchRequest::DeferOptio
bool isHTMLScriptLoader(Element* element)
{
- ASSERT(element);
+ DCHECK(element);
return isHTMLScriptElement(*element);
}
bool isSVGScriptLoader(Element* element)
{
- ASSERT(element);
+ DCHECK(element);
return isSVGScriptElement(*element);
}
@@ -360,7 +360,7 @@ void ScriptLoader::logScriptMimetype(ScriptResource* resource, LocalFrame* frame
bool ScriptLoader::executeScript(const ScriptSourceCode& sourceCode, double* compilationFinishTime)
{
- ASSERT(m_alreadyStarted);
+ DCHECK(m_alreadyStarted);
if (sourceCode.isEmpty())
return true;
@@ -434,7 +434,7 @@ bool ScriptLoader::executeScript(const ScriptSourceCode& sourceCode, double* com
frame->script().executeScriptInMainWorld(sourceCode, accessControlStatus, compilationFinishTime);
if (isHTMLScriptLoader(m_element)) {
- ASSERT(contextDocument->currentScript() == m_element);
+ DCHECK(contextDocument->currentScript() == m_element);
contextDocument->popCurrentScript();
}
@@ -443,8 +443,8 @@ bool ScriptLoader::executeScript(const ScriptSourceCode& sourceCode, double* com
void ScriptLoader::execute()
{
- ASSERT(!m_willBeParserExecuted);
- ASSERT(m_pendingScript->resource());
+ DCHECK(!m_willBeParserExecuted);
+ DCHECK(m_pendingScript->resource());
bool errorOccurred = false;
ScriptSourceCode source = m_pendingScript->getSource(KURL(), errorOccurred);
RawPtr<Element> element = m_pendingScript->releaseElementAndClear();
@@ -462,7 +462,7 @@ void ScriptLoader::execute()
void ScriptLoader::notifyFinished(Resource* resource)
{
- ASSERT(!m_willBeParserExecuted);
+ DCHECK(!m_willBeParserExecuted);
RawPtr<Document> elementDocument(m_element->document());
RawPtr<Document> contextDocument = elementDocument->contextDocument().get();
« no previous file with comments | « third_party/WebKit/Source/core/dom/RemoteSecurityContext.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698