Bug 164900 - Web Inspector: Add ability to distinguish if a Script was parsed as a module
Summary: Web Inspector: Add ability to distinguish if a Script was parsed as a module
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on: 164830
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-17 17:21 PST by Joseph Pecoraro
Modified: 2016-12-07 16:05 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (33.65 KB, patch)
2016-11-17 19:26 PST, Joseph Pecoraro
timothy: review+
joepeck: commit-queue-
Details | Formatted Diff | Diff
[IMAGE] Module Code with Type Profiler (80.25 KB, image/png)
2016-11-17 19:28 PST, Joseph Pecoraro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2016-11-17 17:21:34 PST
Summary:
Add ability to distinguish if a Script was parsed as a module

For starters we can use this for Esprima related features:

    - pretty print module code
    - enable type profiler and code coverage profilers in module code

Where "module code" consists of <script type="module"> and transitively imported modules.

Eventually we may want to use this information for other reasons.
Comment 1 Radar WebKit Bug Importer 2016-11-17 17:21:49 PST
<rdar://problem/29323817>
Comment 2 Joseph Pecoraro 2016-11-17 19:26:46 PST
Created attachment 295123 [details]
[PATCH] Proposed Fix

This may not actually depend on the updated Esprima, but it was created from a tree that had it applied so it may not apply otherwise.
Comment 3 Joseph Pecoraro 2016-11-17 19:28:04 PST
Created attachment 295124 [details]
[IMAGE] Module Code with Type Profiler
Comment 4 Joseph Pecoraro 2016-12-07 16:05:19 PST
<https://trac.webkit.org/changeset/209492>