WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
154721
Refactor FetchBody constructors
https://bugs.webkit.org/show_bug.cgi?id=154721
Summary
Refactor FetchBody constructors
youenn fablet
Reported
2016-02-26 01:10:10 PST
Following on
bug 154536
, it might be good to refactor a bit FetchBody constructors: use the move constructor, renaming fromJSValue to extract and remove empty static method.
Attachments
Patch
(7.81 KB, patch)
2016-02-26 01:13 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(7.80 KB, patch)
2016-02-29 01:20 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2016-02-26 01:13:19 PST
Created
attachment 272317
[details]
Patch
Darin Adler
Comment 2
2016-02-26 09:24:31 PST
Comment on
attachment 272317
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=272317&action=review
> Source/WebCore/Modules/fetch/FetchBody.h:73 > + FetchBody() { }
I sometimes prefer to write = default for these instead of writing out the inline empty body.
> Source/WebCore/Modules/fetch/FetchResponse.cpp:53 > + return adoptRef(*new FetchResponse(Type::Error, FetchBody(), FetchHeaders::create(FetchHeaders::Guard::Immutable), ResourceResponse()));
Could just use { } here instead of FetchBody().
> Source/WebCore/Modules/fetch/FetchResponse.cpp:68 > + RefPtr<FetchResponse> redirectResponse = adoptRef(*new FetchResponse(Type::Default, FetchBody(), FetchHeaders::create(FetchHeaders::Guard::Immutable), ResourceResponse()));
Could just use { } here instead of FetchBody().
> Source/WebCore/Modules/fetch/FetchResponse.h:50 > + static Ref<FetchResponse> create() { return adoptRef(*new FetchResponse(Type::Default, FetchBody(), FetchHeaders::create(FetchHeaders::Guard::Response), ResourceResponse())); }
Could just use { } here instead of FetchBody().
youenn fablet
Comment 3
2016-02-29 01:20:57 PST
Created
attachment 272478
[details]
Patch
youenn fablet
Comment 4
2016-02-29 01:21:31 PST
(In reply to
comment #3
)
> Created
attachment 272478
[details]
> Patch
Thanks for the reviews. I updated the patch with Darin's suggestions.
WebKit Commit Bot
Comment 5
2016-02-29 05:01:45 PST
Comment on
attachment 272478
[details]
Patch Clearing flags on attachment: 272478 Committed
r197347
: <
http://trac.webkit.org/changeset/197347
>
WebKit Commit Bot
Comment 6
2016-02-29 05:01:48 PST
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