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

Issue 6804015: Debugger: show local scope before with in scope chain for functions created inside with block (Closed)

Created:
9 years, 8 months ago by yurys
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Debugger: show local scope before with for functions created inside with block Committed: http://code.google.com/p/v8/source/detail?r=7518

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -0 lines) Patch
M src/runtime.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M test/mjsunit/debug-scopes.js View 1 2 3 chunks +116 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
yurys
Debugger: show local scope before with in scope chain for functions created inside with block. ...
9 years, 8 months ago (2011-04-06 16:31:46 UTC) #1
antonm
LGTM, but let's wait for Søren's comments as well. http://codereview.chromium.org/6804015/diff/1/src/runtime.cc File src/runtime.cc (right): http://codereview.chromium.org/6804015/diff/1/src/runtime.cc#newcode9825 src/runtime.cc:9825: ...
9 years, 8 months ago (2011-04-06 16:41:49 UTC) #2
Søren Thygesen Gjesse
LGTM
9 years, 8 months ago (2011-04-06 16:51:11 UTC) #3
yurys
9 years, 8 months ago (2011-04-06 17:41:15 UTC) #4
Added a couple more tests.

On 2011/04/06 16:41:49, antonm wrote:
> LGTM, but let's wait for Søren's comments as well.
> 
> http://codereview.chromium.org/6804015/diff/1/src/runtime.cc
> File src/runtime.cc (right):
> 
> http://codereview.chromium.org/6804015/diff/1/src/runtime.cc#newcode9825
> src/runtime.cc:9825: // The context_ is a with block from the outer function.
> maybe assert this: ASSRT(context_->has_extension())?
> 
Done.

> http://codereview.chromium.org/6804015/diff/1/test/mjsunit/debug-scopes.js
> File test/mjsunit/debug-scopes.js (right):
> 
>
http://codereview.chromium.org/6804015/diff/1/test/mjsunit/debug-scopes.js#ne...
> test/mjsunit/debug-scopes.js:148: if
> (!scope.scopeObject().property('').isUndefined()) {
> just curious, what are those properties with empty names?
Have no idea, but in case 
function closure_in_with_2() {
  with({x:1}) {
    (function inner(x) {
      with({x:3}) {
        debugger;
      }
    })(2);
  }
}
properties of local scope of function 'inner' will contain a property with empty
name and value the function itself. We may want to hide such properties from
debugger clients but then we should do the same with .catch-var

Powered by Google App Engine
This is Rietveld 408576698