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

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

Issue 2401523002: Replace ASSERT family with DCHECK and so on in core/dom/. (Closed)
Patch Set: Created 4 years, 2 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 7 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 } 595 }
596 596
597 DCHECK(m_asyncExecType != ScriptRunner::None); 597 DCHECK(m_asyncExecType != ScriptRunner::None);
598 598
599 Document* contextDocument = m_element->document().contextDocument(); 599 Document* contextDocument = m_element->document().contextDocument();
600 if (!contextDocument) { 600 if (!contextDocument) {
601 detach(); 601 detach();
602 return; 602 return;
603 } 603 }
604 604
605 ASSERT_UNUSED(resource, resource == m_resource); 605 DCHECK_EQ(resource, m_resource);
606 606
607 if (m_resource->errorOccurred()) { 607 if (m_resource->errorOccurred()) {
608 contextDocument->scriptRunner()->notifyScriptLoadError(this, 608 contextDocument->scriptRunner()->notifyScriptLoadError(this,
609 m_asyncExecType); 609 m_asyncExecType);
610 detach(); 610 detach();
611 dispatchErrorEvent(); 611 dispatchErrorEvent();
612 return; 612 return;
613 } 613 }
614 contextDocument->scriptRunner()->notifyScriptReady(this, m_asyncExecType); 614 contextDocument->scriptRunner()->notifyScriptReady(this, m_asyncExecType);
615 m_pendingScript->stopWatchingForLoad(); 615 m_pendingScript->stopWatchingForLoad();
(...skipping 22 matching lines...) Expand all
638 return m_element->textFromChildren(); 638 return m_element->textFromChildren();
639 } 639 }
640 640
641 ScriptLoaderClient* ScriptLoader::client() const { 641 ScriptLoaderClient* ScriptLoader::client() const {
642 if (isHTMLScriptLoader(m_element)) 642 if (isHTMLScriptLoader(m_element))
643 return toHTMLScriptElement(m_element); 643 return toHTMLScriptElement(m_element);
644 644
645 if (isSVGScriptLoader(m_element)) 645 if (isSVGScriptLoader(m_element))
646 return toSVGScriptElement(m_element); 646 return toSVGScriptElement(m_element);
647 647
648 ASSERT_NOT_REACHED(); 648 NOTREACHED();
649 return 0; 649 return 0;
650 } 650 }
651 651
652 ScriptLoader* toScriptLoaderIfPossible(Element* element) { 652 ScriptLoader* toScriptLoaderIfPossible(Element* element) {
653 if (isHTMLScriptLoader(element)) 653 if (isHTMLScriptLoader(element))
654 return toHTMLScriptElement(element)->loader(); 654 return toHTMLScriptElement(element)->loader();
655 655
656 if (isSVGScriptLoader(element)) 656 if (isSVGScriptLoader(element))
657 return toSVGScriptElement(element)->loader(); 657 return toSVGScriptElement(element)->loader();
658 658
659 return 0; 659 return 0;
660 } 660 }
661 661
662 } // namespace blink 662 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/RawDataDocumentParser.h ('k') | third_party/WebKit/Source/core/dom/SecurityContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698