Bug 26253

Summary: Still update main resource meta-data if resource tracking is disabled
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, pfeldman, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Update main resource meta-data when resource tracking is off
none
Update main resource meta-data when resource tracking is off
timothy: review-
Update main resource meta-data when resource tracking is off timothy: review+

Description Yury Semikhatsky 2009-06-08 05:27:04 PDT
Try to enable debugger for an HTML page with some inline js with resource tracking disabled. The page URL is in the file list in Scripts panel but the page's source is not available.

The problem is that InspectorController does not track main resource's MIME-type when resource tracking is disabled. In that case inspector front-end will fail to show main resource in Scripts panel as it doesn't know its MIME-type.

Although resource tracking should explicitly be enabled to get Resources panel running the main resource is always tracked and it's metadata including MIME-type should always be updated no matter resource tracking enabled or not.
Comment 1 Yury Semikhatsky 2009-06-08 05:49:45 PDT
Created attachment 31043 [details]
Update main resource meta-data when resource tracking is off
Comment 2 Yury Semikhatsky 2009-06-08 05:49:47 PDT
Created attachment 31044 [details]
Update main resource meta-data when resource tracking is off
Comment 3 Timothy Hatcher 2009-06-08 06:22:56 PDT
Comment on attachment 31044 [details]
Update main resource meta-data when resource tracking is off

Using PassRefPtr here isn't correct, since you are not transfering ownership. The InspectorController still owns the resources. A plain pointer return is best.

r+ if you change that.
Comment 4 Yury Semikhatsky 2009-06-08 06:46:50 PDT
Created attachment 31047 [details]
Update main resource meta-data when resource tracking is off

Previous patch with Timothy's comment addressed.
Comment 5 Brent Fulgham 2009-06-10 10:18:13 PDT
Landed in @r44568