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

Side by Side Diff: third_party/WebKit/Source/core/xml/XSLStyleSheetLibxslt.cpp

Issue 2274573004: Replace ASSERT*() with DCHECK*() in core/xml/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 * This file is part of the XSL implementation. 2 * This file is part of the XSL implementation.
3 * 3 *
4 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 if (m_embedded) 232 if (m_embedded)
233 return xsltLoadStylesheetPI(document()); 233 return xsltLoadStylesheetPI(document());
234 234
235 // Certain libxslt versions are corrupting the xmlDoc on compilation 235 // Certain libxslt versions are corrupting the xmlDoc on compilation
236 // failures - hence attempting to recompile after a failure is unsafe. 236 // failures - hence attempting to recompile after a failure is unsafe.
237 if (m_compilationFailed) 237 if (m_compilationFailed)
238 return 0; 238 return 0;
239 239
240 // xsltParseStylesheetDoc makes the document part of the stylesheet 240 // xsltParseStylesheetDoc makes the document part of the stylesheet
241 // so we have to release our pointer to it. 241 // so we have to release our pointer to it.
242 ASSERT(!m_stylesheetDocTaken); 242 DCHECK(!m_stylesheetDocTaken);
243 xsltStylesheetPtr result = xsltParseStylesheetDoc(m_stylesheetDoc); 243 xsltStylesheetPtr result = xsltParseStylesheetDoc(m_stylesheetDoc);
244 if (result) 244 if (result)
245 m_stylesheetDocTaken = true; 245 m_stylesheetDocTaken = true;
246 else 246 else
247 m_compilationFailed = true; 247 m_compilationFailed = true;
248 return result; 248 return result;
249 } 249 }
250 250
251 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent) 251 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent)
252 { 252 {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 xmlDocPtr result = import->styleSheet()->locateStylesheetSubResource(par entDoc, uri); 296 xmlDocPtr result = import->styleSheet()->locateStylesheetSubResource(par entDoc, uri);
297 if (result) 297 if (result)
298 return result; 298 return result;
299 } 299 }
300 300
301 return 0; 301 return 0;
302 } 302 }
303 303
304 void XSLStyleSheet::markAsProcessed() 304 void XSLStyleSheet::markAsProcessed()
305 { 305 {
306 ASSERT(!m_processed); 306 DCHECK(!m_processed);
307 ASSERT(!m_stylesheetDocTaken); 307 DCHECK(!m_stylesheetDocTaken);
308 m_processed = true; 308 m_processed = true;
309 m_stylesheetDocTaken = true; 309 m_stylesheetDocTaken = true;
310 } 310 }
311 311
312 DEFINE_TRACE(XSLStyleSheet) 312 DEFINE_TRACE(XSLStyleSheet)
313 { 313 {
314 visitor->trace(m_ownerNode); 314 visitor->trace(m_ownerNode);
315 visitor->trace(m_children); 315 visitor->trace(m_children);
316 visitor->trace(m_parentStyleSheet); 316 visitor->trace(m_parentStyleSheet);
317 visitor->trace(m_ownerDocument); 317 visitor->trace(m_ownerDocument);
318 StyleSheet::trace(visitor); 318 StyleSheet::trace(visitor);
319 } 319 }
320 320
321 } // namespace blink 321 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/xml/XSLStyleSheet.h ('k') | third_party/WebKit/Source/core/xml/XSLTExtensions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698