Bug 70718 - Web Inspector: Debugger fails when there is an invalid watch expression.
Summary: Web Inspector: Debugger fails when there is an invalid watch expression.
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: Vsevolod Vlasov
URL:
Keywords:
Depends on: 70874
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-24 05:15 PDT by Vsevolod Vlasov
Modified: 2011-10-26 02:07 PDT (History)
12 users (show)

See Also:


Attachments
Patch (8.64 KB, patch)
2011-10-24 08:26 PDT, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Patch (7.30 KB, patch)
2011-10-25 07:34 PDT, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Patch (8.36 KB, patch)
2011-10-26 01:56 PDT, Vsevolod Vlasov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vsevolod Vlasov 2011-10-24 05:15:03 PDT
Debugger fails when there an invalid watch expression.

To reproduce:
1) add invalid watch expression, e.g. "windowa.document"
2) set some breakpoint and trigger stop on it.

You will not see any call frames and execution line will not be shown.
Comment 1 Vsevolod Vlasov 2011-10-24 08:26:20 PDT
Created attachment 112189 [details]
Patch
Comment 2 Pavel Feldman 2011-10-24 10:18:24 PDT
Comment on attachment 112189 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=112189&action=review

> Source/WebCore/inspector/front-end/ConsoleView.js:576
> +        if (WebInspector.panels.scripts.paused && WebInspector.panels.scripts.isCallFrameSelected()) {

I'd suggest that we maintain the following invariant: whenever paused === true, there is a call frame selected.

> Source/WebCore/inspector/front-end/ScriptsPanel.js:478
> +        if (selectedCallFrame)

Let's fail in case there is not selected callframe.
Comment 3 Vsevolod Vlasov 2011-10-25 07:34:57 PDT
Created attachment 112333 [details]
Patch
Comment 4 Vsevolod Vlasov 2011-10-25 07:35:58 PDT
As discussed offline, this patch fixes the problem itself and overall watch expressions logic will be fixed in the separate patch.
Comment 5 WebKit Review Bot 2011-10-25 08:05:09 PDT
Comment on attachment 112333 [details]
Patch

Clearing flags on attachment: 112333

Committed r98346: <http://trac.webkit.org/changeset/98346>
Comment 6 WebKit Review Bot 2011-10-25 08:05:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Ryosuke Niwa 2011-10-25 10:36:32 PDT
It's also failing on Qt:
http://build.webkit.org/results/Qt%20Linux%20Release/r98353%20(38935)/results.html
Comment 9 Vsevolod Vlasov 2011-10-25 11:07:45 PDT
Filed https://bugs.webkit.org/show_bug.cgi?id=70831 for test failures
Comment 10 Vsevolod Vlasov 2011-10-26 01:15:48 PDT
Reopening since it was rolled out.
Comment 11 Vsevolod Vlasov 2011-10-26 01:56:15 PDT
Created attachment 112470 [details]
Patch
Comment 12 Pavel Feldman 2011-10-26 01:58:00 PDT
Comment on attachment 112470 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=112470&action=review

> LayoutTests/inspector/debugger/watch-expressions-panel-switch.html:16
> +    InspectorTest.startDebuggerTest(step1);

Yep.
Comment 13 Vsevolod Vlasov 2011-10-26 02:07:08 PDT
Committed r98454: <http://trac.webkit.org/changeset/98454>