Bug 38925 - Web Inspector: Timeline. Send Request records initiated by JS have no parent.
Summary: Web Inspector: Timeline. Send Request records initiated by JS have no parent.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-11 12:31 PDT by Ilya Tikhonovsky
Modified: 2010-05-12 12:40 PDT (History)
8 users (show)

See Also:


Attachments
[patch] initial version. (16.04 KB, patch)
2010-05-11 13:35 PDT, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
[patch] second iteration (15.81 KB, patch)
2010-05-12 05:49 PDT, Ilya Tikhonovsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2010-05-11 12:31:12 PDT
%SUBJ%
Comment 1 Ilya Tikhonovsky 2010-05-11 12:33:38 PDT
It is possible to force Resource Request from JS code.
But these requests are not connected to the corresponding function call and have no caller info.
Comment 2 Ilya Tikhonovsky 2010-05-11 13:35:17 PDT
Created attachment 55745 [details]
[patch] initial version.

has binary changes.
New record type Delayed Request is introduced.
It is generating each time when loader is trying to pass low priority resource request via message queue.
Resource url is used as identifier as far as ResourceRequest object and it's identifier is not exist at the moment.
Delayed Request and Send Request are linked together at front-end side.
Comment 3 Pavel Feldman 2010-05-12 02:35:07 PDT
Comment on attachment 55745 [details]
[patch] initial version.

WebCore/inspector/TimelineRecordFactory.cpp:135
 +  	data.set("url", request->cachedResource()->url());
Indent, null check missing.
Comment 4 Pavel Feldman 2010-05-12 02:42:00 PDT
Comment on attachment 55745 [details]
[patch] initial version.


WebCore/inspector/front-end/TimelineAgent.js:57
 +      DelayedRequest : 20
SchedulePendingRequests ?

WebCore/loader/loader.cpp:153
 +                  agent->didDelayedRequest(request);
I'd use more strict binding to sendrequest. Using the "url + cached resource address" will already be less ambiguous.
Comment 5 Ilya Tikhonovsky 2010-05-12 05:49:08 PDT
Created attachment 55836 [details]
[patch] second iteration

DelayedRequest was renamed to ScheduleResourceRequest.
It is not possible to use Request address as part of the key because we have no Request address at SendResourceRequest.
We definitely have a valid CachedResource pointer and can use url method without implicit check.
Comment 6 Ilya Tikhonovsky 2010-05-12 12:40:41 PDT
Committed r59237
	M	WebCore/ChangeLog
	M	WebCore/inspector/InspectorTimelineAgent.cpp
	M	WebCore/inspector/TimelineRecordFactory.h
	M	WebCore/inspector/front-end/TimelineAgent.js
	M	WebCore/inspector/front-end/TimelinePanel.js
	M	WebCore/inspector/InspectorTimelineAgent.h
	M	WebCore/inspector/TimelineRecordFactory.cpp
	M	WebCore/English.lproj/localizedStrings.js
	M	WebCore/loader/loader.cpp
	M	LayoutTests/inspector/timeline-enum-stability-expected.txt
	M	LayoutTests/ChangeLog
r59237 = 07361e849c4b0674708f3b9a3966e9e09fa09ee3 (refs/remotes/trunk)