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

Side by Side Diff: third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.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, 2007, 2008 Apple, Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved.
5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if (!len) 148 if (!len)
149 return 0; 149 return 0;
150 150
151 StringBuffer<UChar> stringBuffer(len); 151 StringBuffer<UChar> stringBuffer(len);
152 UChar* bufferUChar = stringBuffer.characters(); 152 UChar* bufferUChar = stringBuffer.characters();
153 UChar* bufferUCharEnd = bufferUChar + len; 153 UChar* bufferUCharEnd = bufferUChar + len;
154 154
155 const char* stringCurrent = buffer; 155 const char* stringCurrent = buffer;
156 WTF::Unicode::ConversionResult result = WTF::Unicode::convertUTF8ToUTF16(&st ringCurrent, buffer + len, &bufferUChar, bufferUCharEnd); 156 WTF::Unicode::ConversionResult result = WTF::Unicode::convertUTF8ToUTF16(&st ringCurrent, buffer + len, &bufferUChar, bufferUCharEnd);
157 if (result != WTF::Unicode::conversionOK && result != WTF::Unicode::sourceEx hausted) { 157 if (result != WTF::Unicode::conversionOK && result != WTF::Unicode::sourceEx hausted) {
158 ASSERT_NOT_REACHED(); 158 NOTREACHED();
159 return -1; 159 return -1;
160 } 160 }
161 161
162 int utf16Length = bufferUChar - stringBuffer.characters(); 162 int utf16Length = bufferUChar - stringBuffer.characters();
163 resultOutput.append(stringBuffer.characters(), utf16Length); 163 resultOutput.append(stringBuffer.characters(), utf16Length);
164 return stringCurrent - buffer; 164 return stringCurrent - buffer;
165 } 165 }
166 166
167 static bool saveResultToString(xmlDocPtr resultDoc, xsltStylesheetPtr sheet, Str ing& resultString) 167 static bool saveResultToString(xmlDocPtr resultDoc, xsltStylesheetPtr sheet, Str ing& resultString)
168 { 168 {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 sheet->method = origMethod; 355 sheet->method = origMethod;
356 setXSLTLoadCallBack(0, 0, 0); 356 setXSLTLoadCallBack(0, 0, 0);
357 xsltFreeStylesheet(sheet); 357 xsltFreeStylesheet(sheet);
358 m_stylesheet = nullptr; 358 m_stylesheet = nullptr;
359 359
360 return success; 360 return success;
361 } 361 }
362 362
363 } // namespace blink 363 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/xml/XSLTProcessor.h ('k') | third_party/WebKit/Source/core/xml/parser/MarkupTokenizerInlines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698