Bug 102470 - Web Inspector: don't show an Error when evaluating a watch expression results in an exception
Summary: Web Inspector: don't show an Error when evaluating a watch expression results...
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-11-16 00:48 PST by Yury Semikhatsky
Modified: 2012-11-16 04:05 PST (History)
10 users (show)

See Also:


Attachments
Patch (3.82 KB, patch)
2012-11-16 00:50 PST, Yury Semikhatsky
vsevik: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Screenshot with the patch applied (56.55 KB, image/png)
2012-11-16 00:50 PST, Yury Semikhatsky
no flags Details
Screenshot with the patch applied (52.63 KB, image/png)
2012-11-16 00:51 PST, Yury Semikhatsky
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2012-11-16 00:48:36 PST
See original report http://code.google.com/p/chromium/issues/detail?id=160440

When watch expression results in an exception it may make sense to say that its value is available in given context instead of showing exception that may confuse users in some cases e.g. when the expression references closure variable that has been optimized out.
Comment 1 Yury Semikhatsky 2012-11-16 00:50:09 PST
Created attachment 174623 [details]
Patch
Comment 2 Yury Semikhatsky 2012-11-16 00:50:44 PST
Created attachment 174624 [details]
Screenshot with the patch applied
Comment 3 Yury Semikhatsky 2012-11-16 00:51:44 PST
Created attachment 174625 [details]
Screenshot with the patch applied

Correct screenshot
Comment 4 WebKit Review Bot 2012-11-16 01:41:00 PST
Comment on attachment 174623 [details]
Patch

Attachment 174623 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14873052

New failing tests:
platform/chromium/virtual/threaded/compositing/webgl/webgl-background-color.html
inspector/debugger/error-in-watch-expressions.html
Comment 5 Vsevolod Vlasov 2012-11-16 02:01:47 PST
Comment on attachment 174623 [details]
Patch

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

> Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js:394
> +        } else {

remove brackets

> Source/WebCore/inspector/front-end/inspector.css:-1651
> -.watch-expressions-error-level {

I'd keep it red.
Comment 6 Yury Semikhatsky 2012-11-16 02:08:41 PST
(In reply to comment #5)
> (From update of attachment 174623 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=174623&action=review
> 
> > Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js:394
> > +        } else {
> 
> remove brackets
> 
> > Source/WebCore/inspector/front-end/inspector.css:-1651
> > -.watch-expressions-error-level {
> 
> I'd keep it red.

It is still red, .watch-expressions-error-level was redundant as the value already has error marker in case of thrown exception.
Comment 7 Yury Semikhatsky 2012-11-16 04:05:34 PST
Committed r134928: <http://trac.webkit.org/changeset/134928>