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

Unified Diff: src/messages.js

Issue 7696024: Fix bug introduced by earlier "cleanup". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/message/replacement-marker-as-argument.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index 8ea31eaadb74d169c1afcd47f9f29b51a770b7da..cbbb70eb1a8e37392676cc8258cdfb17afacd89b 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -57,11 +57,13 @@ function FormatString(format, message) {
for (var i = 0; i < format.length; i++) {
var str = format[i];
for (arg_num = 0; arg_num < kReplacementMarkers.length; arg_num++) {
- if (str !== kReplacementMarkers[arg_num]) continue;
- try {
- str = ToDetailString(args[arg_num]);
- } catch (e) {
- str = "#<error>";
+ if (str == kReplacementMarkers[arg_num]) {
+ try {
+ str = ToDetailString(args[arg_num]);
+ } catch (e) {
+ str = "#<error>";
+ }
+ break;
}
}
result += str;
« no previous file with comments | « no previous file | test/message/replacement-marker-as-argument.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698