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

Issue 1454373002: Use Zone to correctly measure async operations. (Closed)

Created:
5 years, 1 month ago by ahe
Modified:
4 years, 11 months ago
CC:
fletch+reviews_googlegroups.com, sigurdm
Base URL:
git@github.com:dart-lang/sdk.git@_temporary_fletch_patches
Target Ref:
refs/heads/_temporary_fletch_patches
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 5

Patch Set 2 : Rebased on a5163f3595ccc4f41147a552c31c33090fe3970b #

Patch Set 3 : Address Johnni's comments and correctly use Zone.run #

Patch Set 4 : Clean up indentation #

Total comments: 20

Patch Set 5 : Address Florian's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -64 lines) Patch
M pkg/compiler/lib/src/apiimpl.dart View 1 2 3 4 5 chunks +42 lines, -27 lines 0 comments Download
M pkg/compiler/lib/src/common/tasks.dart View 1 2 3 4 5 chunks +205 lines, -14 lines 0 comments Download
M pkg/compiler/lib/src/compiler.dart View 1 2 3 4 14 chunks +37 lines, -22 lines 0 comments Download
M pkg/compiler/lib/src/dump_info.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (4 generated)
ahe
5 years, 1 month ago (2015-11-19 09:52:23 UTC) #2
Johnni Winther
lgtm https://codereview.chromium.org/1454373002/diff/1/pkg/compiler/lib/src/compiler.dart File pkg/compiler/lib/src/compiler.dart (right): https://codereview.chromium.org/1454373002/diff/1/pkg/compiler/lib/src/compiler.dart#newcode2210 pkg/compiler/lib/src/compiler.dart:2210: measure(action()) => watch == null ? action() : ...
5 years, 1 month ago (2015-11-19 10:02:18 UTC) #3
ahe
PTAL
4 years, 11 months ago (2016-01-06 21:10:24 UTC) #5
Johnni Winther
Still LGTM but wait for floitsch comments on zones.
4 years, 11 months ago (2016-01-07 12:54:46 UTC) #6
floitsch
LGTM. Some nits (still have my dart-readability hat on...) https://codereview.chromium.org/1454373002/diff/60001/pkg/compiler/lib/src/apiimpl.dart File pkg/compiler/lib/src/apiimpl.dart (right): https://codereview.chromium.org/1454373002/diff/60001/pkg/compiler/lib/src/apiimpl.dart#newcode61 pkg/compiler/lib/src/apiimpl.dart:61: ...
4 years, 11 months ago (2016-01-07 14:40:40 UTC) #7
ahe
PTAL https://codereview.chromium.org/1454373002/diff/60001/pkg/compiler/lib/src/apiimpl.dart File pkg/compiler/lib/src/apiimpl.dart (right): https://codereview.chromium.org/1454373002/diff/60001/pkg/compiler/lib/src/apiimpl.dart#newcode61 pkg/compiler/lib/src/apiimpl.dart:61: : super( // Call super first to ensure ...
4 years, 11 months ago (2016-01-08 09:02:02 UTC) #9
ahe
Committed patchset #5 (id:100001) manually as 3c93857ea080749ecf274d864bc96734ae3df43f (presubmit successful).
4 years, 11 months ago (2016-01-08 10:26:42 UTC) #11
floitsch
Still LGTM. https://codereview.chromium.org/1454373002/diff/60001/pkg/compiler/lib/src/common/tasks.dart File pkg/compiler/lib/src/common/tasks.dart (right): https://codereview.chromium.org/1454373002/diff/60001/pkg/compiler/lib/src/common/tasks.dart#newcode177 pkg/compiler/lib/src/common/tasks.dart:177: throw "Can't track async task '$name' because" ...
4 years, 11 months ago (2016-01-08 12:07:48 UTC) #12
ahe
4 years, 11 months ago (2016-01-08 12:23:45 UTC) #13
Message was sent while issue was closed.
https://codereview.chromium.org/1454373002/diff/60001/pkg/compiler/lib/src/co...
File pkg/compiler/lib/src/common/tasks.dart (right):

https://codereview.chromium.org/1454373002/diff/60001/pkg/compiler/lib/src/co...
pkg/compiler/lib/src/common/tasks.dart:177: throw "Can't track async task
'$name' because"
On 2016/01/08 12:07:48, floitsch wrote:
> If it's an error, then marking it as such, makes the intent clear.

I disagree. This error message is harder to read:

Internal error: StateError: Can't track async task 'foo' because 'bar' is
already being tracked.

Than this:

Internal error: Can't track async task 'foo' because 'bar' is already being
tracked.

The problem is that "StateError" is irrelevant to the problem, yet people have a
tendency to stop reading after they see "StateError". Same argument could be
made for "Internal error" prefix, but we've decided that users need to know
before anything else that they've encountered a bug in the compiler, and they
didn't do anything wrong. As each prefix adds noise, I think it is important to
keep them to a minimum.

> Errors also have some minor advantages (like capturing the stacktrace).

That's actually a disadvantage: the automatic stack trace capturing in Error
makes debugging harder in JavaScript. Also, capturing stack traces is
unnecessary since we add the second argument to asynchronous error handlers.

Powered by Google App Engine
This is Rietveld 408576698