Bug 170354 - Web Inspector: Unexpected execution highlight behavior when pausing in anonymous function
Summary: Web Inspector: Unexpected execution highlight behavior when pausing in anonym...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-31 12:11 PDT by Matt Baker
Modified: 2017-03-31 23:02 PDT (History)
2 users (show)

See Also:


Attachments
[Reduction] test page (67 bytes, text/html)
2017-03-31 12:11 PDT, Matt Baker
no flags Details
[Image] unexpected execution highlight (175.15 KB, image/png)
2017-03-31 12:12 PDT, Matt Baker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2017-03-31 12:11:00 PDT
Created attachment 305994 [details]
[Reduction] test page

Summary:
Unexpected execution highlight behavior when pausing in anonymous function.

Test Page:
<html>
<script>
(function() {
    debugger;
})();
</script>
</html>

Steps to Reproduce:
1. Inspect test page
2. Reload page and pause for debugger statement
  => Execution highlight covers entire function
  => <html> tag is missing from editor
3. Resume debugger
  => <html> tag reappears
4. Remove <html> tag from file, repeat test
  => Behaves normally
Comment 1 Matt Baker 2017-03-31 12:12:05 PDT
Created attachment 305996 [details]
[Image] unexpected execution highlight

Also note the missing <html> tag
Comment 2 Joseph Pecoraro 2017-03-31 23:02:17 PDT
This is currently the best behavior we have when pausing in an inline <script> on a non-fully document. This shouldn't have anything to do with pausing in an anonymous function.

This is a special code path. Namely, if we are paused inside of a document that hasn't completed loading, the frontend doesn't know how to request the document's contents, but it can request the script's contents so it shows the script without surrounding HTML code. We can improve this scenario.