<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>164427</bug_id>
          
          <creation_ts>2016-11-04 13:27:17 -0700</creation_ts>
          <short_desc>Web Inspector: WorkerTarget&apos;s mainResource should be a Resource not a Script</short_desc>
          <delta_ts>2016-12-13 15:37:14 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>164425</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1248237</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-11-04 13:27:17 -0700</bug_when>
    <thetext>Summary:
WorkerTarget&apos;s mainResource should be a Resource not a Script

This is the frontend portion once we address bug 164425.

Currently, all Worker resource loads are RawResourceRequests. Such resources do not always get saved. In the past that was fine because they are typically ephemeral (XHR,Fetch, etc). However Worker resources are more like &lt;script src=&quot;...&quot;&gt; and we should expect Web Inspector to be informed of them. This impacts Web Inspector in a few different ways:

    - If Web Inspector is opened after a page has loaded
      - Worker Script Resources are not guaranteed to exist so the frontend may not know about them
      - Worker Script Resources may show up as a Script instead of a Resource
        - being Script and not Resource, don&apos;t get a Resource Details Sidebar
        - being Script and not Resource, the Network tab won&apos;t have Resource load data
    - Web Inspector has a workaround converting the type from XHR -&gt; Script in some places

Notes:
- WorkerScriptLoader issues ThreadableLoader requests that it knows will be Scripts. It would be good to type such requests as Script early on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1248238</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-11-04 13:27:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/29117462&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1248241</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-11-04 13:36:34 -0700</bug_when>
    <thetext>I have workarounds for most of these issues that merely check if the WorkerTarget&apos;s mainResource (a Script) has an associated Resource. But it would be nice to eliminate all of these workarounds in the frontend.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>