Skip to content

Commit

Permalink
Start counting at 1 for extension API validation.
Browse files Browse the repository at this point in the history
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6153002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70774 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jochen@chromium.org committed Jan 7, 2011
1 parent 9989c9b commit 8fcb886
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chrome/renderer/resources/extension_process_bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var chrome = chrome || {};
if (validator.errors.length == 0)
continue;

var message = "Invalid value for argument " + i + ". ";
var message = "Invalid value for argument " + (i + 1) + ". ";
for (var i = 0, err; err = validator.errors[i]; i++) {
if (err.path) {
message += "Property '" + err.path + "': ";
Expand All @@ -67,7 +67,7 @@ var chrome = chrome || {};

throw new Error(message);
} else if (!schemas[i].optional) {
throw new Error("Parameter " + i + " is required.");
throw new Error("Parameter " + (i + 1) + " is required.");
}
}
};
Expand Down

0 comments on commit 8fcb886

Please sign in to comment.