WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
158313
Modernize how many platform/network classes do isolatedCopy()
https://bugs.webkit.org/show_bug.cgi?id=158313
Summary
Modernize how many platform/network classes do isolatedCopy()
Brady Eidson
Reported
2016-06-02 13:19:04 PDT
Modernize how many platform/network classes do isolatedCopy() First part of this work was in
https://bugs.webkit.org/show_bug.cgi?id=158293
Now let's get rid of these "CrossThread*Data" objects altogether.
Attachments
Patch
(36.37 KB, patch)
2016-06-02 13:37 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(36.49 KB, patch)
2016-06-02 14:28 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(36.49 KB, patch)
2016-06-02 14:29 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2016-06-02 13:37:35 PDT
Created
attachment 280359
[details]
Patch
Alex Christensen
Comment 2
2016-06-02 14:01:39 PDT
Comment on
attachment 280359
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=280359&action=review
> Source/WebCore/platform/network/ResourceRequestBase.cpp:87 > + setAllowCookies(m_allowCookies);
other.m_allowCookies
> Source/WebCore/platform/network/ResourceRequestBase.cpp:89 > + const_cast<ResourceRequest&>(asResourceRequest()).doPlatformSetAsIsolatedCopy(other);
Would it work to make a non-const asResourceRequest() instead of a const_cast here?
Brady Eidson
Comment 3
2016-06-02 14:20:53 PDT
(In reply to
comment #2
)
> Comment on
attachment 280359
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=280359&action=review
> > > Source/WebCore/platform/network/ResourceRequestBase.cpp:87 > > + setAllowCookies(m_allowCookies); > > other.m_allowCookies
Yup yikes.
> > Source/WebCore/platform/network/ResourceRequestBase.cpp:89 > > + const_cast<ResourceRequest&>(asResourceRequest()).doPlatformSetAsIsolatedCopy(other); > > Would it work to make a non-const asResourceRequest() instead of a > const_cast here?
const_cast'ing the const ResourceRequest& is an already established pattern in the class. The relationship between ResourceRequestBase and ResourceRequest is already so gnarly that I didn't feel like tackling that here. Would be a good followup cleanup.
Brady Eidson
Comment 4
2016-06-02 14:24:46 PDT
The linux build errors: In file included from ../../Source/WebCore/platform/network/ResourceErrorBase.cpp:28:0: ../../Source/WebCore/platform/network/soup/ResourceError.h: In member function 'WebCore::ResourceError WebCore::ResourceErrorBase::isolatedCopy() const': ../../Source/WebCore/platform/network/soup/ResourceError.h:70:10: error: 'void WebCore::ResourceError::doPlatformIsolatedCopy(const WebCore::ResourceError&)' is private ../../Source/WebCore/platform/network/ResourceErrorBase.cpp:52:55: error: within this context Funny, that method is private in the CF/Mac version as well, but it builds on Clang. Anyways, yah I'll make it public. (Normally I'd virtualize it, but we try to keep these classes non-virtual for some historic reason I forgot)
Brady Eidson
Comment 5
2016-06-02 14:25:42 PDT
(In reply to
comment #4
)
> The linux build errors: > > In file included from > ../../Source/WebCore/platform/network/ResourceErrorBase.cpp:28:0: > ../../Source/WebCore/platform/network/soup/ResourceError.h: In member > function 'WebCore::ResourceError WebCore::ResourceErrorBase::isolatedCopy() > const': > ../../Source/WebCore/platform/network/soup/ResourceError.h:70:10: error: > 'void WebCore::ResourceError::doPlatformIsolatedCopy(const > WebCore::ResourceError&)' is private > ../../Source/WebCore/platform/network/ResourceErrorBase.cpp:52:55: error: > within this context > > Funny, that method is private in the CF/Mac version as well, but it builds > on Clang. > > Anyways, yah I'll make it public. > > (Normally I'd virtualize it, but we try to keep these classes non-virtual > for some historic reason I forgot)
Oh duh: friend class ResourceErrorBase; Will add to the other headers.
Brady Eidson
Comment 6
2016-06-02 14:27:20 PDT
Last 500 characters of output: p.o.d -o Source/WebCore/CMakeFiles/WebCore.dir/platform/network/FormData.cpp.o -c ../../Source/WebCore/platform/network/FormData.cpp ../../Source/WebCore/platform/network/FormData.cpp: In member function 'WebCore::FormDataElement WebCore::FormDataElement::isolatedCopy() const': ../../Source/WebCore/platform/network/FormData.cpp:139:1: error: control reaches end of non-void function [-Werror=return-type] That's just GCC not recognizing that all 3 of the possible cases are handled. *sigh*
Brady Eidson
Comment 7
2016-06-02 14:28:26 PDT
Created
attachment 280367
[details]
Patch
Brady Eidson
Comment 8
2016-06-02 14:29:22 PDT
Created
attachment 280368
[details]
Patch
Brady Eidson
Comment 9
2016-06-02 14:30:03 PDT
For an EWS run. Will cq+ once linux bots are happy
WebKit Commit Bot
Comment 10
2016-06-02 15:42:05 PDT
Comment on
attachment 280368
[details]
Patch Clearing flags on attachment: 280368 Committed
r201623
: <
http://trac.webkit.org/changeset/201623
>
WebKit Commit Bot
Comment 11
2016-06-02 15:42:12 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