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

Issue 113821: Execute accessor for the debugged property if it's a native function (Closed)

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

Description

When inspecting a function with a native getter return result of execution of the getter function in the client context. This is useful for debugging DOM elements. Committed: http://code.google.com/p/v8/source/detail?r=2044

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -8 lines) Patch
M src/runtime.cc View 4 chunks +16 lines, -8 lines 0 comments Download
M test/cctest/test-debug.cc View 1 1 chunk +76 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
yurys
11 years, 7 months ago (2009-05-25 13:30:57 UTC) #1
Søren Thygesen Gjesse
LGTM How about adding a test where the accessor throws an exception? On top of ...
11 years, 7 months ago (2009-05-25 14:13:43 UTC) #2
yurys
11 years, 7 months ago (2009-05-25 14:55:46 UTC) #3
On 2009/05/25 14:13:43, Søren Gjesse wrote:
> LGTM
> 
> How about adding a test where the accessor throws an exception?
> 
> On top of this we also needs to handle interceptors. They are used in various
> places in the binding layer, where the properties on an object are dynamic,
e.g.
> frames and forms are available on the windows object as properties named from
> their id's (unless these are shadowed by global variables of the same name).
> 
> We might need to add reflective callbacks to the interceptors to create mirror
> objects or maybe we can implement the already defined enumerate function on
the
> interceptor in the binding layer. Properties from interceptors are currently
not
> visible in for in as the enumerate function is not implemented. Whether
> implementing this will break compatibility I don't know. Also the enumerate
> callback might be missing some of the details we would like to include in the
> mirror objects. Of cause with interceptors there is the issue that properties
> might come and go as the interceptor function sees fit. E.g. an interceptor
> which has the property of the roman numeral of the current hour.

Added a test with accessor throwing an error. You are absolutely right that with
the accessors we can inspect only standard DOM properties and We definitely need
to do something about the interceptors to inspect the dynamic properties.

Powered by Google App Engine
This is Rietveld 408576698