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

Side by Side Diff: Source/core/html/parser/HTMLToken.h

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2013 Google, 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 m_attributes.clear(); 284 m_attributes.clear();
285 285
286 m_data.appendVector(characters); 286 m_data.appendVector(characters);
287 } 287 }
288 288
289 void addNewAttribute() 289 void addNewAttribute()
290 { 290 {
291 ASSERT(m_type == StartTag || m_type == EndTag); 291 ASSERT(m_type == StartTag || m_type == EndTag);
292 m_attributes.grow(m_attributes.size() + 1); 292 m_attributes.grow(m_attributes.size() + 1);
293 m_currentAttribute = &m_attributes.last(); 293 m_currentAttribute = &m_attributes.last();
294 #ifndef NDEBUG 294 #if ENABLE(ASSERT)
295 m_currentAttribute->nameRange.start = 0; 295 m_currentAttribute->nameRange.start = 0;
296 m_currentAttribute->nameRange.end = 0; 296 m_currentAttribute->nameRange.end = 0;
297 m_currentAttribute->valueRange.start = 0; 297 m_currentAttribute->valueRange.start = 0;
298 m_currentAttribute->valueRange.end = 0; 298 m_currentAttribute->valueRange.end = 0;
299 #endif 299 #endif
300 } 300 }
301 301
302 void beginAttributeName(int offset) 302 void beginAttributeName(int offset)
303 { 303 {
304 m_currentAttribute->nameRange.start = offset - m_baseOffset; 304 m_currentAttribute->nameRange.start = offset - m_baseOffset;
305 } 305 }
306 306
307 void endAttributeName(int offset) 307 void endAttributeName(int offset)
308 { 308 {
309 int index = offset - m_baseOffset; 309 int index = offset - m_baseOffset;
310 m_currentAttribute->nameRange.end = index; 310 m_currentAttribute->nameRange.end = index;
311 m_currentAttribute->valueRange.start = index; 311 m_currentAttribute->valueRange.start = index;
312 m_currentAttribute->valueRange.end = index; 312 m_currentAttribute->valueRange.end = index;
313 } 313 }
314 314
315 void beginAttributeValue(int offset) 315 void beginAttributeValue(int offset)
316 { 316 {
317 m_currentAttribute->valueRange.start = offset - m_baseOffset; 317 m_currentAttribute->valueRange.start = offset - m_baseOffset;
318 #ifndef NDEBUG 318 #if ENABLE(ASSERT)
319 m_currentAttribute->valueRange.end = 0; 319 m_currentAttribute->valueRange.end = 0;
320 #endif 320 #endif
321 } 321 }
322 322
323 void endAttributeValue(int offset) 323 void endAttributeValue(int offset)
324 { 324 {
325 m_currentAttribute->valueRange.end = offset - m_baseOffset; 325 m_currentAttribute->valueRange.end = offset - m_baseOffset;
326 } 326 }
327 327
328 void appendToAttributeName(UChar character) 328 void appendToAttributeName(UChar character)
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 // A pointer into m_attributes used during lexing. 449 // A pointer into m_attributes used during lexing.
450 Attribute* m_currentAttribute; 450 Attribute* m_currentAttribute;
451 451
452 // For DOCTYPE 452 // For DOCTYPE
453 OwnPtr<DoctypeData> m_doctypeData; 453 OwnPtr<DoctypeData> m_doctypeData;
454 }; 454 };
455 455
456 } 456 }
457 457
458 #endif 458 #endif
OLDNEW
« no previous file with comments | « Source/core/html/parser/BackgroundHTMLParser.cpp ('k') | Source/core/html/parser/HTMLTreeBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698