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

Issue 11946020: Check whether exceptions are caught (Closed)

Created:
7 years, 11 months ago by hausner
Modified:
7 years, 11 months ago
Reviewers:
regis, srdjan
CC:
reviews_dartlang.org, regis
Visibility:
Public.

Description

Check whether exceptions are caught The debugger can now determine whether an exemption will be caught or not. Committed: https://code.google.com/p/dart/source/detail?r=17167

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -17 lines) Patch
M runtime/vm/debugger.h View 1 5 chunks +5 lines, -2 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 chunks +70 lines, -13 lines 0 comments Download
M runtime/vm/object.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 1 chunk +11 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
hausner
Regis, can you check whether I am using Type and type checks correctly? Thank you.
7 years, 11 months ago (2013-01-16 20:53:23 UTC) #1
regis
LGTM with comments https://codereview.chromium.org/11946020/diff/5001/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): https://codereview.chromium.org/11946020/diff/5001/runtime/vm/debugger.cc#newcode420 runtime/vm/debugger.cc:420: if (type.IsMalformed()) continue; If the type ...
7 years, 11 months ago (2013-01-16 21:06:36 UTC) #2
srdjan
lgtm https://codereview.chromium.org/11946020/diff/5001/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): https://codereview.chromium.org/11946020/diff/5001/runtime/vm/debugger.cc#newcode415 runtime/vm/debugger.cc:415: intptr_t num_types = handled_types.Length(); const
7 years, 11 months ago (2013-01-16 21:12:16 UTC) #3
hausner
7 years, 11 months ago (2013-01-16 22:07:25 UTC) #4
Thank you.

https://codereview.chromium.org/11946020/diff/5001/runtime/vm/debugger.cc
File runtime/vm/debugger.cc (right):

https://codereview.chromium.org/11946020/diff/5001/runtime/vm/debugger.cc#new...
runtime/vm/debugger.cc:415: intptr_t num_types = handled_types.Length();
On 2013/01/16 21:12:16, srdjan wrote:
> const

Done.

https://codereview.chromium.org/11946020/diff/5001/runtime/vm/debugger.cc#new...
runtime/vm/debugger.cc:420: if (type.IsMalformed()) continue;
On 2013/01/16 21:06:36, regis wrote:
> If the type is malformed, the test at run time will always throw a TypeError.
In
> other words, this frame handles the exception, even so briefly. Is 'continue'
> correct?

I think 'continue' to the next type check is correct. This type check will not
succeed when the Dart catch clause executes it later. The TypeError that will be
thrown is intercepted again by the debugger.

https://codereview.chromium.org/11946020/diff/5001/runtime/vm/debugger.cc#new...
runtime/vm/debugger.cc:421: if (exc_obj.IsInstanceOf(type, no_instantiator,
NULL)) {
On 2013/01/16 21:06:36, regis wrote:
> How about a comment indicating you may get a false positive without
> instantiator?
> Actually, I see in the parser that you filter out uninstantiated types. Maybe
> you could assert that here or write a comment that it is the case.

Done.

Powered by Google App Engine
This is Rietveld 408576698