JSON.parse errors made user-friendly part 2 [v8/v8 : main]

28 views
Skip to first unread message

Issack John (Gerrit)

unread,
May 18, 2022, 3:37:17 PM5/18/22
to Toon Verwaest, Luis Fernando Pardo Sixtos, Patrick Thier, V8 LUCI CQ, v8-re...@googlegroups.com

Attention is currently required from: Toon Verwaest.

View Change

1 comment:

To view, visit change 3652254. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I3ba5450c41b8a388643a15bc58e4e3fc75855d13
Gerrit-Change-Number: 3652254
Gerrit-PatchSet: 5
Gerrit-Owner: Issack John <issac...@microsoft.com>
Gerrit-Reviewer: Issack John <issac...@microsoft.com>
Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
Gerrit-CC: Luis Fernando Pardo Sixtos <lpardo...@microsoft.com>
Gerrit-CC: Patrick Thier <pth...@chromium.org>
Gerrit-Attention: Toon Verwaest <verw...@chromium.org>
Gerrit-Comment-Date: Wed, 18 May 2022 19:37:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Toon Verwaest (Gerrit)

unread,
May 19, 2022, 10:52:44 AM5/19/22
to Issack John, Luis Fernando Pardo Sixtos, Patrick Thier, V8 LUCI CQ, v8-re...@googlegroups.com

Attention is currently required from: Issack John.

Patch set 7:Code-Review +1

View Change

    To view, visit change 3652254. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I3ba5450c41b8a388643a15bc58e4e3fc75855d13
    Gerrit-Change-Number: 3652254
    Gerrit-PatchSet: 7
    Gerrit-Owner: Issack John <issac...@microsoft.com>
    Gerrit-Reviewer: Issack John <issac...@microsoft.com>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    Gerrit-CC: Luis Fernando Pardo Sixtos <lpardo...@microsoft.com>
    Gerrit-CC: Patrick Thier <pth...@chromium.org>
    Gerrit-Attention: Issack John <issac...@microsoft.com>
    Gerrit-Comment-Date: Thu, 19 May 2022 14:52:35 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Issack John (Gerrit)

    unread,
    May 19, 2022, 11:04:28 AM5/19/22
    to Toon Verwaest, Luis Fernando Pardo Sixtos, Patrick Thier, V8 LUCI CQ, v8-re...@googlegroups.com

    Attention is currently required from: Issack John.

    Patch set 7:Commit-Queue +2

    View Change

      To view, visit change 3652254. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: v8/v8
      Gerrit-Branch: main
      Gerrit-Change-Id: I3ba5450c41b8a388643a15bc58e4e3fc75855d13
      Gerrit-Change-Number: 3652254
      Gerrit-PatchSet: 7
      Gerrit-Owner: Issack John <issac...@microsoft.com>
      Gerrit-Reviewer: Issack John <issac...@microsoft.com>
      Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
      Gerrit-CC: Luis Fernando Pardo Sixtos <lpardo...@microsoft.com>
      Gerrit-CC: Patrick Thier <pth...@chromium.org>
      Gerrit-Attention: Issack John <issac...@microsoft.com>
      Gerrit-Comment-Date: Thu, 19 May 2022 15:04:21 +0000

      V8 LUCI CQ (Gerrit)

      unread,
      May 19, 2022, 11:07:14 AM5/19/22
      to Issack John, Toon Verwaest, Luis Fernando Pardo Sixtos, Patrick Thier, v8-re...@googlegroups.com

      V8 LUCI CQ submitted this change.

      View Change


      Approvals: Toon Verwaest: Looks good to me Issack John: Commit
      JSON.parse errors made user-friendly part 2

      Part of the improve error messages initiative.

      Based on a resource of JSON.parse() errors found at
      https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/JSON_bad_parse

      added support for:
      - 'Bad control character in string literal'
      - 'Bad Unicode escape'

      Previously JSON.parse('"a\bz"') would output:
      SyntaxError: Unexpected token in JSON at position 2
      Now the output is:
      SyntaxError: Bad control character in string literal in
      JSON at position 2

      Previously JSON.parse("[\"\\t\\u") would output:
      SyntaxError: Unexpected end of JSON input
      Now the output is:
      SyntaxError: Bad Unicode escape in JSON at position 6

      Bug: v8:6551
      Change-Id: I3ba5450c41b8a388643a15bc58e4e3fc75855d13
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652254
      Reviewed-by: Toon Verwaest <verw...@chromium.org>
      Commit-Queue: Issack John <issac...@microsoft.com>
      Cr-Commit-Position: refs/heads/main@{#80642}
      ---
      M src/common/message-template.h
      M src/json/json-parser.cc
      M test/mjsunit/json-errors.js
      M test/mjsunit/messages.js
      4 files changed, 53 insertions(+), 4 deletions(-)


      To view, visit change 3652254. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: v8/v8
      Gerrit-Branch: main
      Gerrit-Change-Id: I3ba5450c41b8a388643a15bc58e4e3fc75855d13
      Gerrit-Change-Number: 3652254
      Gerrit-PatchSet: 8
      Gerrit-Owner: Issack John <issac...@microsoft.com>
      Gerrit-Reviewer: Issack John <issac...@microsoft.com>
      Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
      Gerrit-CC: Luis Fernando Pardo Sixtos <lpardo...@microsoft.com>
      Gerrit-CC: Patrick Thier <pth...@chromium.org>
      Gerrit-MessageType: merged
      Reply all
      Reply to author
      Forward
      0 new messages