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

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

Issue 2134543002: Use DCHECK_NE in HTMLToken.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 { 87 {
88 #if ENABLE(ASSERT) 88 #if ENABLE(ASSERT)
89 start = kInvalidOffset; 89 start = kInvalidOffset;
90 end = kInvalidOffset; 90 end = kInvalidOffset;
91 #endif 91 #endif
92 } 92 }
93 93
94 // Check Range instance that is actively being parsed. 94 // Check Range instance that is actively being parsed.
95 inline void checkValidStart() const 95 inline void checkValidStart() const
96 { 96 {
97 DCHECK(start != kInvalidOffset); 97 DCHECK_NE(start, kInvalidOffset);
98 DCHECK_GE(start, 0); 98 DCHECK_GE(start, 0);
99 } 99 }
100 100
101 // Check Range instance which finished parse. 101 // Check Range instance which finished parse.
102 inline void checkValid() const 102 inline void checkValid() const
103 { 103 {
104 checkValidStart(); 104 checkValidStart();
105 DCHECK(end != kInvalidOffset); 105 DCHECK_NE(end, kInvalidOffset);
106 DCHECK_GE(end, 0); 106 DCHECK_GE(end, 0);
107 DCHECK_LE(start, end); 107 DCHECK_LE(start, end);
108 } 108 }
109 109
110 int start; 110 int start;
111 int end; 111 int end;
112 }; 112 };
113 113
114 AtomicString name() const { return AtomicString(m_name); } 114 AtomicString name() const { return AtomicString(m_name); }
115 String nameAttemptStaticStringCreation() const { return attemptStaticStr ingCreation(m_name, Likely8Bit); } 115 String nameAttemptStaticStringCreation() const { return attemptStaticStr ingCreation(m_name, Likely8Bit); }
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 // A pointer into m_attributes used during lexing. 496 // A pointer into m_attributes used during lexing.
497 Attribute* m_currentAttribute; 497 Attribute* m_currentAttribute;
498 498
499 // For DOCTYPE 499 // For DOCTYPE
500 std::unique_ptr<DoctypeData> m_doctypeData; 500 std::unique_ptr<DoctypeData> m_doctypeData;
501 }; 501 };
502 502
503 } // namespace blink 503 } // namespace blink
504 504
505 #endif 505 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698