Bug 158817 - Web Inspector: REGRESSION (r200064): syntax error in a breakpoint condition should not create an Anonymous Script in the Debugger Tab sidebar
Summary: Web Inspector: REGRESSION (r200064): syntax error in a breakpoint condition s...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-15 16:02 PDT by BJ Burg
Modified: 2017-02-10 21:04 PST (History)
4 users (show)

See Also:


Attachments
Bad anonymous scripts (155.69 KB, image/png)
2016-06-15 16:02 PDT, BJ Burg
no flags Details
[Patch] Proposed Fix (4.97 KB, patch)
2016-06-16 16:14 PDT, Matt Baker
joepeck: review-
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-yosemite (1.57 MB, application/zip)
2016-06-16 16:56 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews103 for mac-yosemite (1006.80 KB, application/zip)
2016-06-16 16:58 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (798.83 KB, application/zip)
2016-06-16 17:19 PDT, Build Bot
no flags Details
[Image] Proposed UI (313.80 KB, image/png)
2017-02-10 21:04 PST, Matt Baker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2016-06-15 16:02:41 PDT
Created attachment 281400 [details]
Bad anonymous scripts

This seems to be a regression from Safari 9.x.

STEPS TO REPRODUCE:
1. set a breakpoint with invalid JS
2. make the breakpoint's line execute

EXPECTED:
No anonymous script is added to the debugger tab's sidebar.

ACTUAL:
An anonymous script is created per breakpoint, but reused across failed condition evaluations. See attached screenshot.

NOTES:
In both cases, and in shipped Safari, the syntax error appears in the console with a link to the breakpoint's file/line/column.
Comment 1 Radar WebKit Bug Importer 2016-06-15 16:04:36 PDT
<rdar://problem/26825020>
Comment 2 Matt Baker 2016-06-16 15:13:10 PDT
For comparison, Chrome and Edge show nothing when a condition contains an error. FireFox shows an error message beneath the breakpoint itself.
Comment 3 Matt Baker 2016-06-16 15:36:07 PDT
Regressed in https://trac.webkit.org/changeset/200064.
Comment 4 Matt Baker 2016-06-16 16:14:21 PDT
Created attachment 281500 [details]
[Patch] Proposed Fix
Comment 5 Build Bot 2016-06-16 16:56:24 PDT
Comment on attachment 281500 [details]
[Patch] Proposed Fix

Attachment 281500 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1514980

New failing tests:
inspector/model/stack-trace.html
Comment 6 Build Bot 2016-06-16 16:56:26 PDT
Created attachment 281508 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-06-16 16:58:05 PDT
Comment on attachment 281500 [details]
[Patch] Proposed Fix

Attachment 281500 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1515041

New failing tests:
inspector/model/stack-trace.html
Comment 8 Build Bot 2016-06-16 16:58:08 PDT
Created attachment 281509 [details]
Archive of layout-test-results from ews103 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Build Bot 2016-06-16 17:19:13 PDT
Comment on attachment 281500 [details]
[Patch] Proposed Fix

Attachment 281500 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1515097

New failing tests:
inspector/model/stack-trace.html
Comment 10 Build Bot 2016-06-16 17:19:16 PDT
Created attachment 281511 [details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 11 Joseph Pecoraro 2016-06-23 13:39:34 PDT
Comment on attachment 281500 [details]
[Patch] Proposed Fix

I think we wanted to take a different approach here. Show anonymous scripts sometimes.
Comment 12 Matt Baker 2017-02-10 21:04:04 PST
(In reply to comment #11)
> Comment on attachment 281500 [details]
> [Patch] Proposed Fix
> 
> I think we wanted to take a different approach here. Show anonymous scripts
> sometimes.

Instead of exposing breakpoint implementation details (the anonymous script item), we should associate the error with the breakpoint, and display an error message widget on the breakpoint's line.

Clicking an entry for a breakpoint script error in the Console should highlight the source code location of the breakpoint.
Comment 13 Matt Baker 2017-02-10 21:04:32 PST
Created attachment 301244 [details]
[Image] Proposed UI