[Webkit-unassigned] [Bug 32442] REGRESSION (r46972): Inspector console outputs the global value for a variable instead of the local value

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 28 04:42:32 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=32442





--- Comment #18 from Pavel Feldman <pfeldman at chromium.org>  2010-03-28 04:42:32 PST ---
(In reply to comment #17)
> Nice job on the fix, Dmitry!
> 
> Is it possible to write a LayoutTests/inspector test for this so it doesn't
> happen again?

Technically, it is possible. However, we don't yet have layout tests that stop
in debugger, so various problems are likely to arise.

Scenario for the test would be:
- In the layout test page, create a function that has debugger; statement.
That's pretty much all you do on the layout page side, rest is happening on the
inspector front-end.
- On the front-end side, enable debugger (this is done synchronously) and
execute the function you created in previous step using
InjectedScriptAccess.evaluate.
- Just before you do this evaluate, add a sniffer that would give your code
control upon WebInspector.pausedScript call from the backend.
- As soon as pausedScript is called, get a reference to the call frame.
- Either synchronously or in setTimeout(0) execute
InjectedScriptAccess.evaluateInCallFrame against your call frame with "x"
expression.

tests are located under LayoutTests/inspector

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list