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

Issue 1138313002: Better toString and Error.toSafeString output for closures for dart2js. (Closed)

Created:
5 years, 7 months ago by sra1
Modified:
5 years, 7 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org, Chris Bracken, Johnni Winther
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Better toString and Error.toSafeString output for closures for dart2js. Closures that appear in error messages, especially NoSuchMethodError, need to identify the function so that captured error messages and stack traces are useful. Old: 1. Instance of 'Object' 2. Instance of 'Object' 3. Instance of 'anonymous' 4. Instance of 'anonymous' 5. Instance of 'main_localFunction' New: 1. Closure 'print' 2. Closure 'Widget_staticMethod' 3. Closure 'foo' of Instance of 'Widget' 4. Closure 'remainder' of 1234 5. Closure 'main_localFunction' In minified code the names are (usually) minified. Being able to unminify them later is separate issue. This CL makes NoSuchMethodError variants more uniform in quoting of method to assist unminifying the message. R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=45753

Patch Set 1 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -48 lines) Patch
M pkg/compiler/lib/src/js_emitter/class_stub_generator.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/js_lib/core_patch.dart View 3 chunks +22 lines, -27 lines 2 comments Download
M sdk/lib/_internal/compiler/js_lib/js_helper.dart View 7 chunks +38 lines, -20 lines 0 comments Download
A tests/compiler/dart2js_extra/useful_error_message_1_test.dart View 1 chunk +83 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
sra1
5 years, 7 months ago (2015-05-12 23:03:23 UTC) #3
floitsch
LGTM. https://codereview.chromium.org/1138313002/diff/20001/sdk/lib/_internal/compiler/js_lib/core_patch.dart File sdk/lib/_internal/compiler/js_lib/core_patch.dart (right): https://codereview.chromium.org/1138313002/diff/20001/sdk/lib/_internal/compiler/js_lib/core_patch.dart#newcode466 sdk/lib/_internal/compiler/js_lib/core_patch.dart:466: for (var argument in _arguments) { maybe?: sb.writeAll(_arguments.map(Error.safeToString), ...
5 years, 7 months ago (2015-05-12 23:14:16 UTC) #4
sra1
https://codereview.chromium.org/1138313002/diff/20001/sdk/lib/_internal/compiler/js_lib/core_patch.dart File sdk/lib/_internal/compiler/js_lib/core_patch.dart (right): https://codereview.chromium.org/1138313002/diff/20001/sdk/lib/_internal/compiler/js_lib/core_patch.dart#newcode466 sdk/lib/_internal/compiler/js_lib/core_patch.dart:466: for (var argument in _arguments) { On 2015/05/12 23:14:16, ...
5 years, 7 months ago (2015-05-12 23:25:50 UTC) #5
sra1
5 years, 7 months ago (2015-05-12 23:47:31 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:20001) manually as 45753 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698