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

Side by Side Diff: src/messages.cc

Issue 1099573002: Migrate error messages, part 4 (v8natives.js). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix wrong assertion 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 | « src/messages.h ('k') | src/messages.js » ('j') | 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 unsigned int i = 0; 188 unsigned int i = 0;
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 DCHECK(i < arraysize(args));
192 builder.AppendString(args[i++]); 193 builder.AppendString(args[i++]);
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 | « src/messages.h ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698