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

Side by Side Diff: third_party/WebKit/Source/core/testing/DictionaryTest.cpp

Issue 2143483002: Use the single char overload of append() when possible. (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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "DictionaryTest.h" 5 #include "DictionaryTest.h"
6 6
7 #include "bindings/core/v8/V8ObjectBuilder.h" 7 #include "bindings/core/v8/V8ObjectBuilder.h"
8 #include "core/testing/InternalDictionary.h" 8 #include "core/testing/InternalDictionary.h"
9 #include "core/testing/InternalDictionaryDerived.h" 9 #include "core/testing/InternalDictionaryDerived.h"
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return emptyString(); 156 return emptyString();
157 157
158 bool firstLoop = true; 158 bool firstLoop = true;
159 while (iterator.next(executionContext, exceptionState)) { 159 while (iterator.next(executionContext, exceptionState)) {
160 if (exceptionState.hadException()) 160 if (exceptionState.hadException())
161 return emptyString(); 161 return emptyString();
162 162
163 if (firstLoop) 163 if (firstLoop)
164 firstLoop = false; 164 firstLoop = false;
165 else 165 else
166 result.append(","); 166 result.append(',');
167 167
168 v8::Local<v8::Value> value; 168 v8::Local<v8::Value> value;
169 if (v8Call(iterator.value(), value)) 169 if (v8Call(iterator.value(), value))
170 result.append(toCoreString(value->ToString())); 170 result.append(toCoreString(value->ToString()));
171 } 171 }
172 172
173 return result.toString(); 173 return result.toString();
174 } 174 }
175 175
176 void DictionaryTest::reset() 176 void DictionaryTest::reset()
(...skipping 30 matching lines...) Expand all
207 207
208 DEFINE_TRACE(DictionaryTest) 208 DEFINE_TRACE(DictionaryTest)
209 { 209 {
210 visitor->trace(m_elementMember); 210 visitor->trace(m_elementMember);
211 visitor->trace(m_elementOrNullMember); 211 visitor->trace(m_elementOrNullMember);
212 visitor->trace(m_doubleOrStringSequenceMember); 212 visitor->trace(m_doubleOrStringSequenceMember);
213 visitor->trace(m_eventTargetOrNullMember); 213 visitor->trace(m_eventTargetOrNullMember);
214 } 214 }
215 215
216 } // namespace blink 216 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698