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

Side by Side Diff: third_party/WebKit/Source/core/page/WindowFeatures.cpp

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month 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) 2000 Harri Porten (porten@kde.org) 2 * Copyright (C) 2000 Harri Porten (porten@kde.org)
3 * Copyright (C) 2006 Jon Shier (jshier@iastate.edu) 3 * Copyright (C) 2006 Jon Shier (jshier@iastate.edu)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights
5 * reseved. 5 * reseved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // skip to first non-separator, but don't skip past the end of the string 85 // skip to first non-separator, but don't skip past the end of the string
86 while (i < length && isWindowFeaturesSeparator(buffer[i])) 86 while (i < length && isWindowFeaturesSeparator(buffer[i]))
87 i++; 87 i++;
88 keyBegin = i; 88 keyBegin = i;
89 89
90 // skip to first separator 90 // skip to first separator
91 while (i < length && !isWindowFeaturesSeparator(buffer[i])) 91 while (i < length && !isWindowFeaturesSeparator(buffer[i]))
92 i++; 92 i++;
93 keyEnd = i; 93 keyEnd = i;
94 94
95 ASSERT_WITH_SECURITY_IMPLICATION(i <= length); 95 SECURITY_DCHECK(i <= length);
96 96
97 // skip to first '=', but don't skip past a ',' or the end of the string 97 // skip to first '=', but don't skip past a ',' or the end of the string
98 while (i < length && buffer[i] != '=') { 98 while (i < length && buffer[i] != '=') {
99 if (buffer[i] == ',') 99 if (buffer[i] == ',')
100 break; 100 break;
101 i++; 101 i++;
102 } 102 }
103 103
104 ASSERT_WITH_SECURITY_IMPLICATION(i <= length); 104 SECURITY_DCHECK(i <= length);
105 105
106 // Skip to first non-separator, but don't skip past a ',' or the end of the 106 // Skip to first non-separator, but don't skip past a ',' or the end of the
107 // string. 107 // string.
108 while (i < length && isWindowFeaturesSeparator(buffer[i])) { 108 while (i < length && isWindowFeaturesSeparator(buffer[i])) {
109 if (buffer[i] == ',') 109 if (buffer[i] == ',')
110 break; 110 break;
111 i++; 111 i++;
112 } 112 }
113 valueBegin = i; 113 valueBegin = i;
114 114
115 ASSERT_WITH_SECURITY_IMPLICATION(i <= length); 115 SECURITY_DCHECK(i <= length);
116 116
117 // skip to first separator 117 // skip to first separator
118 while (i < length && !isWindowFeaturesSeparator(buffer[i])) 118 while (i < length && !isWindowFeaturesSeparator(buffer[i]))
119 i++; 119 i++;
120 valueEnd = i; 120 valueEnd = i;
121 121
122 ASSERT_WITH_SECURITY_IMPLICATION(i <= length); 122 SECURITY_DCHECK(i <= length);
123 123
124 String keyString(buffer.substring(keyBegin, keyEnd - keyBegin)); 124 String keyString(buffer.substring(keyBegin, keyEnd - keyBegin));
125 String valueString(buffer.substring(valueBegin, valueEnd - valueBegin)); 125 String valueString(buffer.substring(valueBegin, valueEnd - valueBegin));
126 126
127 setWindowFeature(keyString, valueString); 127 setWindowFeature(keyString, valueString);
128 } 128 }
129 } 129 }
130 130
131 void WindowFeatures::setWindowFeature(const String& keyString, 131 void WindowFeatures::setWindowFeature(const String& keyString,
132 const String& valueString) { 132 const String& valueString) {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 .stripWhiteSpace() 282 .stripWhiteSpace()
283 .lower(); 283 .lower();
284 value = value.left(value.find(' ')); 284 value = value.left(value.find(' '));
285 } 285 }
286 286
287 map.set(key, value); 287 map.set(key, value);
288 } 288 }
289 } 289 }
290 290
291 } // namespace blink 291 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGResources.cpp ('k') | third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698