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

Issue 542363003: Don't double-escape in strings in the VM Service, and don't use \u0000 to determine the string lengt (Closed)

Created:
6 years, 3 months ago by rmacnak
Modified:
6 years, 3 months ago
Reviewers:
turnidge, koda, Cutch
CC:
reviews_dartlang.org, turnidge, Cutch, vm-dev_dartlang.org
Visibility:
Public.

Description

Don't double-escape strings in the VM Service, and don't use \u0000 to determine the string length. This makes characters above ASCII to display as themselves in Observatory, strings with \u0000 in the middle not to be truncated, and avoids a bug in the previous escaping where a non-ASCII character in the last position would have its escaped representation cut off. R=johnmccutchan@google.com Committed: https://code.google.com/p/dart/source/detail?r=40060

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 12

Patch Set 5 : #

Patch Set 6 : build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1837 lines, -1629 lines) Patch
M runtime/bin/vmservice/observatory/deployed/web/index.html View 1 2 3 4 5 2 chunks +13 lines, -1 line 0 comments Download
M runtime/bin/vmservice/observatory/deployed/web/index.html_bootstrap.dart.js View 1 2 3 4 5 132 chunks +770 lines, -738 lines 0 comments Download
M runtime/bin/vmservice/observatory/deployed/web/index_devtools.html View 1 2 3 4 5 2 chunks +13 lines, -1 line 0 comments Download
M runtime/bin/vmservice/observatory/deployed/web/index_devtools.html_bootstrap.dart.js View 1 2 3 4 5 132 chunks +770 lines, -738 lines 0 comments Download
M runtime/bin/vmservice/observatory/deployed/web/packages/observatory/src/elements/instance_ref.html View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M runtime/bin/vmservice/observatory/deployed/web/packages/observatory/src/elements/instance_view.html View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.html View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
M runtime/bin/vmservice/observatory/lib/src/elements/instance_view.html View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
M runtime/bin/vmservice/observatory/lib/src/service/object.dart View 1 2 3 4 3 chunks +4 lines, -1 line 0 comments Download
M runtime/bin/vmservice/observatory/test/contexts_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
A runtime/bin/vmservice/observatory/test/string_escaping_test.dart View 1 2 1 chunk +81 lines, -0 lines 0 comments Download
M runtime/bin/vmservice/observatory/tests/ui/inspector.dart View 1 2 chunks +10 lines, -0 lines 0 comments Download
M runtime/vm/json_stream.h View 1 2 3 5 chunks +7 lines, -0 lines 0 comments Download
M runtime/vm/json_stream.cc View 1 2 3 3 chunks +22 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 2 chunks +9 lines, -5 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 chunks +37 lines, -87 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 3 4 2 chunks +46 lines, -51 lines 0 comments Download
M runtime/vm/report_test.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/service_test.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (3 generated)
rmacnak
6 years, 3 months ago (2014-09-09 00:09:45 UTC) #2
Cutch
lgtm and thanks! This is an important fix.
6 years, 3 months ago (2014-09-09 15:55:29 UTC) #3
turnidge
I really like this change. Some comments... https://codereview.chromium.org/542363003/diff/60001/runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.html File runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.html (right): https://codereview.chromium.org/542363003/diff/60001/runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.html#newcode30 runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.html:30: <a on-click="{{ ...
6 years, 3 months ago (2014-09-09 16:12:31 UTC) #5
rmacnak
https://codereview.chromium.org/542363003/diff/60001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/542363003/diff/60001/runtime/vm/object.cc#newcode17127 runtime/vm/object.cc:17127: intptr_t length = 0; On 2014/09/09 16:12:31, turnidge wrote: ...
6 years, 3 months ago (2014-09-09 21:00:23 UTC) #6
rmacnak
Committed patchset #6 (id:100001) manually as 40060 (presubmit successful).
6 years, 3 months ago (2014-09-09 21:34:21 UTC) #7
koda
6 years, 3 months ago (2014-09-10 03:12:46 UTC) #9
Message was sent while issue was closed.
This seems like a partial fix to this bug:

  https://code.google.com/p/dart/issues/detail?id=20583

right?

Would be great to also fix the remaining places where we use this broken format.

Powered by Google App Engine
This is Rietveld 408576698