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

Side by Side Diff: src/messages.cc

Issue 1089363002: Fix signed/unsigned compare in messages.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/execution.h" 8 #include "src/execution.h"
9 #include "src/heap/spaces-inl.h" 9 #include "src/heap/spaces-inl.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 case kLastMessage: 178 case kLastMessage:
179 default: 179 default:
180 UNREACHABLE(); 180 UNREACHABLE();
181 template_string = ""; 181 template_string = "";
182 break; 182 break;
183 } 183 }
184 184
185 Isolate* isolate = arg0->GetIsolate(); 185 Isolate* isolate = arg0->GetIsolate();
186 IncrementalStringBuilder builder(isolate); 186 IncrementalStringBuilder builder(isolate);
187 187
188 int i = 0; 188 unsigned int i = 0;
Sven Panne 2015/04/16 10:05:58 Actually, this should be size_t...
189 Handle<String> args[] = {arg0, arg1, arg2}; 189 Handle<String> args[] = {arg0, arg1, arg2};
190 for (const char* c = template_string; *c != '\0'; c++) { 190 for (const char* c = template_string; *c != '\0'; c++) {
191 if (*c == '%') { 191 if (*c == '%') {
192 builder.AppendString(args[i++]); 192 builder.AppendString(args[i++]);
193 DCHECK(i < arraysize(args)); 193 DCHECK(i < arraysize(args));
194 } else { 194 } else {
195 builder.AppendCharacter(*c); 195 builder.AppendCharacter(*c);
196 } 196 }
197 } 197 }
198 198
199 return builder.Finish(); 199 return builder.Finish();
200 } 200 }
201 } } // namespace v8::internal 201 } } // namespace v8::internal
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