WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
65544
Introduce a new ResourceRequest::TargetType for XHRs
https://bugs.webkit.org/show_bug.cgi?id=65544
Summary
Introduce a new ResourceRequest::TargetType for XHRs
jochen
Reported
2011-08-02 08:27:04 PDT
Introduce a new ResourceRequest::TargetType for XHRs
Attachments
Patch
(3.03 KB, patch)
2011-08-02 08:27 PDT
,
jochen
no flags
Details
Formatted Diff
Diff
Patch
(3.21 KB, patch)
2011-08-04 08:35 PDT
,
jochen
no flags
Details
Formatted Diff
Diff
Patch
(3.20 KB, patch)
2011-08-04 12:29 PDT
,
jochen
no flags
Details
Formatted Diff
Diff
Patch
(3.20 KB, patch)
2011-08-05 06:49 PDT
,
jochen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
jochen
Comment 1
2011-08-02 08:27:39 PDT
Created
attachment 102655
[details]
Patch
jochen
Comment 2
2011-08-02 11:01:39 PDT
ResourceRequests by XMLHttpRequest won't go through WebFrameClient::willSendRequest, so I don't have a chance to mark them. As they can be attributed to a Document (or Worker) via the ScriptExecutionContext, I wonder whether there's a way to tag those requests, or whether it was possible to introduce something like ScriptExecutionContextClient::willSendRequest?
Adam Barth
Comment 3
2011-08-02 11:59:31 PDT
Comment on
attachment 102655
[details]
Patch I'm surprised ResourceRequest has a TargetType. ResourceRequest isn't supposed to know that it's in a web browser. How does that property round-trip through NSURLRequest?
jochen
Comment 4
2011-08-02 12:04:00 PDT
(In reply to
comment #3
)
> (From update of
attachment 102655
[details]
) > I'm surprised ResourceRequest has a TargetType. ResourceRequest isn't supposed to know that it's in a web browser. How does that property round-trip through NSURLRequest?
I don't think it does. TargetType is actually part of ResourceRequestBase, and a quick git grep suggests that only chromium uses this property at all
Alexey Proskuryakov
Comment 5
2011-08-02 12:06:29 PDT
Let's reopen the original bug if you disagree with its resolution. See also: 48483. *** This bug has been marked as a duplicate of
bug 61542
***
Adam Barth
Comment 6
2011-08-02 12:09:33 PDT
Sounds like we need to resolve
Bug 48483
before this gets worse.
Darin Fisher (:fishd, Google)
Comment 7
2011-08-02 12:41:00 PDT
(In reply to
comment #2
)
> ResourceRequests by XMLHttpRequest won't go through WebFrameClient::willSendRequest
^^^ Are you sure about that? This surprises me a lot.
Darin Fisher (:fishd, Google)
Comment 8
2011-08-02 12:42:32 PDT
(In reply to
comment #7
)
> (In reply to
comment #2
) > > ResourceRequests by XMLHttpRequest won't go through WebFrameClient::willSendRequest > > ^^^ Are you sure about that? This surprises me a lot.
If you find that this is true for some requests, then perhaps we should fix the code to always send requests through willSendRequest.
jochen
Comment 9
2011-08-02 12:48:51 PDT
(In reply to
comment #7
)
> (In reply to
comment #2
) > > ResourceRequests by XMLHttpRequest won't go through WebFrameClient::willSendRequest > > ^^^ Are you sure about that? This surprises me a lot.
no, I'm not probably I'm mistaken :-/
jochen
Comment 10
2011-08-04 08:35:44 PDT
Created
attachment 102919
[details]
Patch
jochen
Comment 11
2011-08-04 08:39:07 PDT
As discussed in
bug 48483
, I'll move the target type to chromium's ResourceRequest and add TargetIsXHR (this patch is based on the pending patch for
bug 48483
so I can't submit it to EWS yet)
jochen
Comment 12
2011-08-04 12:29:32 PDT
Created
attachment 102956
[details]
Patch
jochen
Comment 13
2011-08-04 12:30:25 PDT
Darin, could you have a look?
Adam Barth
Comment 14
2011-08-04 12:53:33 PDT
Isn't this still moving us in the opposite direction of where we want to go? This would seem to make it harder to remove this field in the future.
jochen
Comment 15
2011-08-04 12:56:40 PDT
(In reply to
comment #14
)
> Isn't this still moving us in the opposite direction of where we want to go? This would seem to make it harder to remove this field in the future.
My understanding is that I'll work on something like LoadRequest or whatever it'll be called that would carry this information, and the embedder can connect information from the LoadRequest using ResourceRequest::extraData in its willSendRequest() implementation until then, adding this target type will unblock my webRequest API work
Adam Barth
Comment 16
2011-08-04 13:00:30 PDT
Ok. I'll let Darin review the actual patch. If you're planning to remove this field yourself, then you're not imposing this cost on anyone else, which sounds fine to me.
WebKit Review Bot
Comment 17
2011-08-04 14:50:18 PDT
Comment on
attachment 102956
[details]
Patch Clearing flags on attachment: 102956 Committed
r92415
: <
http://trac.webkit.org/changeset/92415
>
WebKit Review Bot
Comment 18
2011-08-04 14:50:24 PDT
All reviewed patches have been landed. Closing bug.
Adam Barth
Comment 19
2011-08-04 15:53:26 PDT
Re-opened because this patch caused crashes. See the attached rollout patch for details.
jochen
Comment 20
2011-08-05 06:49:45 PDT
Created
attachment 103068
[details]
Patch
jochen
Comment 21
2011-08-05 06:51:04 PDT
unconditionally #define'ing now, fixes the failures for me
WebKit Review Bot
Comment 22
2011-08-05 11:02:21 PDT
Comment on
attachment 103068
[details]
Patch Clearing flags on attachment: 103068 Committed
r92487
: <
http://trac.webkit.org/changeset/92487
>
WebKit Review Bot
Comment 23
2011-08-05 11:02:27 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug