Bug 26253 - Still update main resource meta-data if resource tracking is disabled
Summary: Still update main resource meta-data if resource tracking is disabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-08 05:27 PDT by Yury Semikhatsky
Modified: 2009-06-10 10:18 PDT (History)
3 users (show)

See Also:


Attachments
Update main resource meta-data when resource tracking is off (4.54 KB, patch)
2009-06-08 05:49 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Update main resource meta-data when resource tracking is off (4.54 KB, patch)
2009-06-08 05:49 PDT, Yury Semikhatsky
timothy: review-
Details | Formatted Diff | Diff
Update main resource meta-data when resource tracking is off (4.47 KB, patch)
2009-06-08 06:46 PDT, Yury Semikhatsky
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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