Commit e8ce7acf authored by yangguo's avatar yangguo Committed by Commit bot

Debugger: use correct position for for-next expression statement.

R=rossberg@chromium.org
BUG=chromium:523543
LOG=N

Review URL: https://codereview.chromium.org/1310213002

Cr-Commit-Position: refs/heads/master@{#30328}
parent 4095d606
......@@ -3752,9 +3752,8 @@ Statement* Parser::ParseForStatement(ZoneList<const AstRawString*>* labels,
Statement* next = NULL;
if (peek() != Token::RPAREN) {
int next_pos = position();
Expression* exp = ParseExpression(true, CHECK_OK);
next = factory()->NewExpressionStatement(exp, next_pos);
next = factory()->NewExpressionStatement(exp, exp->position());
}
Expect(Token::RPAREN, CHECK_OK);
......
......@@ -106,11 +106,11 @@ var expected = [
// For-of-let: next(), body, next(), ...
"j16","J4","j16","J4","j16","J4","j16",
// For-var: var decl, condition, body, next, condition, body, ...
"k7","k20","K4","k23","k20","K4","k23","k20","K4","k23","k20",
"k7","k20","K4","k26","k20","K4","k26","k20","K4","k26","k20",
// For: init, condition, body, next, condition, body, ...
"l7","l16","L4","l19","l16","L4","l19","l16","L4","l19","l16",
"l7","l16","L4","l22","l16","L4","l22","l16","L4","l22","l16",
// For-let: init, condition, body, next, condition, body, ...
"m7","m20","M4","m23","m20","M4","m23","m20","M4","m23","m20",
"m7","m20","M4","m26","m20","M4","m26","m20","M4","m26","m20",
// Exit.
"y0","z0",
]
......
......@@ -63,8 +63,8 @@ var sum = 0;
debugger; // Break 0.
for (let i=0; // Break 1.
i < 1; // Break 2. // Break 5. // Break 6.
i++) {
i < 1; // Break 2. // Break 6.
i++) { // Break 5.
let key = i; // Break 3.
sum += key; // Break 4.
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment