Bug 87197 - Web Inspector: Debugger should correctly show catch scope
Summary: Web Inspector: Debugger should correctly show catch scope
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-22 19:39 PDT by Peter Rybin
Modified: 2012-05-23 05:00 PDT (History)
14 users (show)

See Also:


Attachments
Patch (1.95 KB, patch)
2012-05-22 23:19 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (5.35 KB, patch)
2012-05-23 04:49 PDT, Yury Semikhatsky
vsevik: review+
yurys: commit-queue+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Rybin 2012-05-22 19:39:36 PDT
Stop on breakpoint inside a catch block. See a lot of garbage variables under "Catch" scope in Scope Variables display. For example "__defineGetter__", "toLocaleString" etc.
There shouldn't be them there.

Additional test case:

    var toString = "Test";
    try {
        throw "Hello";
    } catch (e) {
        e = toString;
        e = 2;
    }

break on the line "e = 2"
Debugger shows that the innermost scope (Catch) has variable named "toString" that has function value.
This is incorrect, because variable "e" has different value ("Test"). This means that the previous assigment statement doesn't see fake "toString" variable of the Catch scope.
Comment 1 Yury Semikhatsky 2012-05-22 23:19:28 PDT
Created attachment 143471 [details]
Patch
Comment 2 Pavel Feldman 2012-05-23 02:04:18 PDT
Comment on attachment 143471 [details]
Patch

Could you provide a test?
Comment 3 Yury Semikhatsky 2012-05-23 04:49:25 PDT
Created attachment 143533 [details]
Patch
Comment 4 Yury Semikhatsky 2012-05-23 04:53:02 PDT
(In reply to comment #2)
> (From update of attachment 143471 [details])
> Could you provide a test?

Done.
Comment 5 Yury Semikhatsky 2012-05-23 05:00:20 PDT
Committed r118161: <http://trac.webkit.org/changeset/118161>