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

Issue 10009023: Fix static field inspection in debugger (Closed)

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

Description

Fix static field inspection in debugger - Handle static fields that have no getter (issue 2462). - Get correct value of initialized fields (issue 2221). - Add test case. Committed: https://code.google.com/p/dart/source/detail?r=6251

Patch Set 1 #

Patch Set 2 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -81 lines) Patch
M runtime/vm/debugger.cc View 1 chunk +14 lines, -0 lines 3 comments Download
M runtime/vm/debugger_api_impl_test.cc View 1 16 chunks +140 lines, -81 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
hausner
8 years, 8 months ago (2012-04-05 22:07:56 UTC) #1
regis
LGTM http://codereview.chromium.org/10009023/diff/4001/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): http://codereview.chromium.org/10009023/diff/4001/runtime/vm/debugger.cc#newcode754 runtime/vm/debugger.cc:754: if (getter_func.IsNull()) { This contradicts the assert above. ...
8 years, 8 months ago (2012-04-05 22:33:05 UTC) #2
hausner
Thanks for the fast turnaround! http://codereview.chromium.org/10009023/diff/4001/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): http://codereview.chromium.org/10009023/diff/4001/runtime/vm/debugger.cc#newcode754 runtime/vm/debugger.cc:754: if (getter_func.IsNull()) { On ...
8 years, 8 months ago (2012-04-05 22:45:30 UTC) #3
regis
8 years, 8 months ago (2012-04-05 23:03:07 UTC) #4
http://codereview.chromium.org/10009023/diff/4001/runtime/vm/debugger.cc
File runtime/vm/debugger.cc (right):

http://codereview.chromium.org/10009023/diff/4001/runtime/vm/debugger.cc#newc...
runtime/vm/debugger.cc:754: if (getter_func.IsNull()) {
On 2012/04/05 22:45:30, hausner wrote:
> On 2012/04/05 22:33:05, regis wrote:
> > This contradicts the assert above. Left over debugging code?
> 
> I did this on purpose. Maybe it's not good style. This function should never
be
> called with the name of a non-existing field/getter. In a debug build I'd like
> to know if someone tries to get the value of a non-existing field. In release
> mode, I just silently ignore this and return null as the value.

Don't you want to know that something is fishy in release mode too? Instead of
returning null, I would have called an UNREACHABLE() for a null function. But
maybe you need a more defensive coding style in the debugger? Up to you.

Powered by Google App Engine
This is Rietveld 408576698