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

Side by Side Diff: third_party/WebKit/Source/core/html/PluginDocument.cpp

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. Created 4 years, 4 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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 PluginView* pluginView() const; 73 PluginView* pluginView() const;
74 74
75 Member<HTMLEmbedElement> m_embedElement; 75 Member<HTMLEmbedElement> m_embedElement;
76 }; 76 };
77 77
78 void PluginDocumentParser::createDocumentStructure() 78 void PluginDocumentParser::createDocumentStructure()
79 { 79 {
80 // FIXME: Assert we have a loader to figure out why the original null checks 80 // FIXME: Assert we have a loader to figure out why the original null checks
81 // and assert were added for the security bug in http://trac.webkit.org/chan geset/87566 81 // and assert were added for the security bug in http://trac.webkit.org/chan geset/87566
82 ASSERT(document()); 82 DCHECK(document());
83 RELEASE_ASSERT(document()->loader()); 83 RELEASE_ASSERT(document()->loader());
84 84
85 LocalFrame* frame = document()->frame(); 85 LocalFrame* frame = document()->frame();
86 if (!frame) 86 if (!frame)
87 return; 87 return;
88 88
89 // FIXME: Why does this check settings? 89 // FIXME: Why does this check settings?
90 if (!frame->settings() || !frame->loader().allowPlugins(NotAboutToInstantiat ePlugin)) 90 if (!frame->settings() || !frame->loader().allowPlugins(NotAboutToInstantiat ePlugin))
91 return; 91 return;
92 92
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 void PluginDocumentParser::finish() 148 void PluginDocumentParser::finish()
149 { 149 {
150 m_embedElement = nullptr; 150 m_embedElement = nullptr;
151 RawDataDocumentParser::finish(); 151 RawDataDocumentParser::finish();
152 } 152 }
153 153
154 PluginView* PluginDocumentParser::pluginView() const 154 PluginView* PluginDocumentParser::pluginView() const
155 { 155 {
156 if (Widget* widget = toPluginDocument(document())->pluginWidget()) { 156 if (Widget* widget = toPluginDocument(document())->pluginWidget()) {
157 ASSERT_WITH_SECURITY_IMPLICATION(widget->isPluginContainer()); 157 SECURITY_DCHECK(widget->isPluginContainer());
158 return toPluginView(widget); 158 return toPluginView(widget);
159 } 159 }
160 return 0; 160 return 0;
161 } 161 }
162 162
163 PluginDocument::PluginDocument(const DocumentInit& initializer) 163 PluginDocument::PluginDocument(const DocumentInit& initializer)
164 : HTMLDocument(initializer, PluginDocumentClass) 164 : HTMLDocument(initializer, PluginDocumentClass)
165 { 165 {
166 setCompatibilityMode(QuirksMode); 166 setCompatibilityMode(QuirksMode);
167 lockCompatibilityMode(); 167 lockCompatibilityMode();
(...skipping 28 matching lines...) Expand all
196 HTMLDocument::detachLayoutTree(context); 196 HTMLDocument::detachLayoutTree(context);
197 } 197 }
198 198
199 DEFINE_TRACE(PluginDocument) 199 DEFINE_TRACE(PluginDocument)
200 { 200 {
201 visitor->trace(m_pluginNode); 201 visitor->trace(m_pluginNode);
202 HTMLDocument::trace(visitor); 202 HTMLDocument::trace(visitor);
203 } 203 }
204 204
205 } // namespace blink 205 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/MediaFragmentURIParser.cpp ('k') | third_party/WebKit/Source/core/html/RadioNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698