RESOLVED FIXED 46430
Platform specific ResourceResponse and ResourceRequest can't fully cross threads.
https://bugs.webkit.org/show_bug.cgi?id=46430
Summary Platform specific ResourceResponse and ResourceRequest can't fully cross thre...
Michael Nordman
Reported 2010-09-23 16:49:09 PDT
Platform specific ResourceResponse and ResourceRequest classes have no means to copy their data via across threads. The CrossThreadResourceRequestData and CrossThreadResourceResponseData structs are fully defined in common code as are the methods to copyData() and adopt(copiedData).
Attachments
crossThread patch (25.51 KB, patch)
2010-09-28 13:49 PDT, Michael Nordman
no flags
crossThread patch (25.53 KB, patch)
2010-09-28 13:56 PDT, Michael Nordman
levin: review+
levin: commit-queue-
crossThread patch (25.45 KB, patch)
2010-09-28 16:13 PDT, Michael Nordman
levin: review-
crossThread patch (25.70 KB, patch)
2010-09-28 16:48 PDT, Michael Nordman
levin: review+
commit-queue: commit-queue-
crossThread patch (25.71 KB, patch)
2010-09-28 18:37 PDT, Michael Nordman
dumi: review+
commit-queue: commit-queue-
crossThread patch (26.34 KB, patch)
2010-09-29 12:57 PDT, Michael Nordman
no flags
Michael Nordman
Comment 1 2010-09-28 13:49:35 PDT
Created attachment 69096 [details] crossThread patch
Michael Nordman
Comment 2 2010-09-28 13:56:12 PDT
Created attachment 69098 [details] crossThread patch Fixed typos in the ChangeLog.
David Levin
Comment 3 2010-09-28 15:53:33 PDT
Comment on attachment 69098 [details] crossThread patch View in context: https://bugs.webkit.org/attachment.cgi?id=69098&action=review Awesome! > WebCore/platform/network/ResourceRequestBase.h:143 > + static bool compare(const ResourceRequest& a, const ResourceRequest& b); When I see "compare", I think stpcmp and expect that 0 means equal. How about isSame or isEqual or equivalent, etc.? Ugh, I see ResourceResponse already has this. I still hate the name but consistency is good, so nevermind :( Do this: omit "a" and "b" as they add no information. (Yes, ResourceResponseBase.h does the same thing but it is wrong and consistency here adds no value.) > WebCore/platform/network/android/ResourceRequest.h:58 > + void doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData> data) { } Omit data here or else you will get unused variable erros/warnings on some platforms (throughout). > WebCore/platform/network/chromium/ResourceRequest.h:93 > + PassOwnPtr<CrossThreadResourceRequestData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceRequestData> data) const; Omit param name "data" here as it adds no information. > WebCore/platform/network/chromium/ResourceRequest.h:94 > + void doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData> data); Ditto.
Michael Nordman
Comment 4 2010-09-28 16:13:41 PDT
Created attachment 69126 [details] crossThread patch Done... removed param names where possible.
David Levin
Comment 5 2010-09-28 16:47:43 PDT
Comment on attachment 69126 [details] crossThread patch Needs minor clean up of nits as discussed.
Michael Nordman
Comment 6 2010-09-28 16:48:03 PDT
Created attachment 69134 [details] crossThread patch Fixed a typo in the changeLog, removed param names from ResourceResponseBase::compare, deleted a blank line in ResourceResponseBase.cpp.
WebKit Commit Bot
Comment 7 2010-09-28 17:38:58 PDT
Comment on attachment 69134 [details] crossThread patch Rejecting patch 69134 from commit-queue. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']" exit_code: 2 Building WebKit Failed to run "['WebKitTools/Scripts/build-webkit', '--debug']" exit_code: 1 Full output: http://queues.webkit.org/results/4163008
Michael Nordman
Comment 8 2010-09-28 18:24:34 PDT
bumping heads with http://trac.webkit.org/changeset/68510? i'll update my client
Michael Nordman
Comment 9 2010-09-28 18:37:00 PDT
Created attachment 69150 [details] crossThread patch updated my client and created a new patch
Dumitru Daniliuc
Comment 10 2010-09-28 20:32:52 PDT
Comment on attachment 69150 [details] crossThread patch rs=me, based on dave's r+.
WebKit Commit Bot
Comment 11 2010-09-28 21:00:46 PDT
Comment on attachment 69150 [details] crossThread patch Rejecting patch 69150 from commit-queue. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']" exit_code: 2 Building WebKit Failed to run "['WebKitTools/Scripts/build-webkit', '--debug']" exit_code: 1 Full output: http://queues.webkit.org/results/4202007
Michael Nordman
Comment 12 2010-09-28 21:14:09 PDT
(In reply to comment #11) > (From update of attachment 69150 [details]) > Rejecting patch 69150 from commit-queue. > > Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']" exit_code: 2 > Building WebKit > Failed to run "['WebKitTools/Scripts/build-webkit', '--debug']" exit_code: 1 > > Full output: http://queues.webkit.org/results/4202007 I guess that's not a merge conflict after all? WebKitTools/Scripts/build-webkit fails Looking...
Michael Nordman
Comment 13 2010-09-28 23:06:15 PDT
A link error on mac. Ld /Users/michaeln/webkit/1/webkit/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore normal i386 ..... Undefined symbols: "__ZN7WebCoreeqERKNS_19ResourceRequestBaseES2_", referenced from: -exported_symbols_list command line option ld: symbol(s) not found collect2: ld returned 1 exit status
Michael Nordman
Comment 14 2010-09-28 23:34:23 PDT
Ok... need to delete a symbol in WebCore.exp.in
Michael Nordman
Comment 15 2010-09-29 12:57:30 PDT
Created attachment 69241 [details] crossThread patch removed the now inlined export from webcore.exp.in
WebKit Commit Bot
Comment 16 2010-09-30 00:51:13 PDT
Comment on attachment 69241 [details] crossThread patch Clearing flags on attachment: 69241 Committed r68762: <http://trac.webkit.org/changeset/68762>
WebKit Commit Bot
Comment 17 2010-09-30 00:51:19 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.