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.
Created attachment 31043 [details] Update main resource meta-data when resource tracking is off
Created attachment 31044 [details] Update main resource meta-data when resource tracking is off
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.
Created attachment 31047 [details] Update main resource meta-data when resource tracking is off Previous patch with Timothy's comment addressed.
Landed in @r44568