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

Issue 1511043002: [DevTools] Evaluate expression like { ... } as Object Literal (Closed)

Created:
5 years ago by kozy
Modified:
5 years ago
Reviewers:
paulirish, pfeldman
CC:
apavlov+blink_chromium.org, blink-reviews, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, sergeyv+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[DevTools] Evaluate expression like { ... } as Object Literal If user evaluate in console expression like {a:1, b:2} then console will report SyntaxError exception because this expression is interpreted as block scope declaration with incorrect label. With this CL console wrap all expressions that begins with { and ends with }. BUG=499864 R=paulirish@chromium.org, pfeldman@chromium.org Committed: https://crrev.com/4fd348fdb9c0b3842829acdfb2b82c86dacd8e0a Cr-Commit-Position: refs/heads/master@{#364270}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -3 lines) Patch
A third_party/WebKit/LayoutTests/inspector/console/console-eval-object-literal.html View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector/console/console-eval-object-literal-expected.txt View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
kozy
ptal
5 years ago (2015-12-09 01:28:11 UTC) #1
kozy
Screenshot: https://drive.google.com/file/d/0B7RLEApsOKBLbE1zZkRmVWJ5NTg/view?usp=sharing
5 years ago (2015-12-09 01:35:31 UTC) #3
paulirish
I like it. Yup this matches exactly what folks on the thread want.
5 years ago (2015-12-09 01:35:39 UTC) #4
pfeldman
We should never eval things twice. What does it result in for {a:b++} now? :) ...
5 years ago (2015-12-09 03:23:36 UTC) #5
kozy
On 2015/12/09 03:23:36, pfeldman wrote: > We should never eval things twice. What does it ...
5 years ago (2015-12-09 03:47:48 UTC) #6
kozy
Pavel, ptal.
5 years ago (2015-12-09 23:01:29 UTC) #8
kozy
Silently add parentheses to expressions that starts with { and ends with }. The same ...
5 years ago (2015-12-09 23:43:03 UTC) #10
pfeldman
lgtm
5 years ago (2015-12-10 02:35:35 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1511043002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1511043002/80001
5 years ago (2015-12-10 02:39:37 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years ago (2015-12-10 03:27:35 UTC) #15
commit-bot: I haz the power
5 years ago (2015-12-10 03:28:30 UTC) #17
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/4fd348fdb9c0b3842829acdfb2b82c86dacd8e0a
Cr-Commit-Position: refs/heads/master@{#364270}

Powered by Google App Engine
This is Rietveld 408576698