WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137736
Use std::unique_ptr for CachedResource
https://bugs.webkit.org/show_bug.cgi?id=137736
Summary
Use std::unique_ptr for CachedResource
Gyuyoung Kim
Reported
2014-10-15 01:38:47 PDT
SSIA
Attachments
Patch
(3.21 KB, patch)
2014-10-15 01:39 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch for landing
(3.35 KB, patch)
2014-10-15 18:26 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Gyuyoung Kim
Comment 1
2014-10-15 01:39:56 PDT
Created
attachment 239858
[details]
Patch
Darin Adler
Comment 2
2014-10-15 09:38:21 PDT
Comment on
attachment 239858
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=239858&action=review
OK to do this, but please use make_unique.
> Source/WebCore/loader/cache/CachedResource.cpp:517 > + std::unique_ptr<CachedResourceCallback> callback = m_clientsAwaitingCallback.take(client);
I’d suggest using auto here instead of writing out the type.
> Source/WebCore/loader/cache/CachedResource.h:271 > + static std::unique_ptr<CachedResourceCallback> schedule(CachedResource* resource, CachedResourceClient* client) { return std::unique_ptr<CachedResourceCallback>(new CachedResourceCallback(resource, client)); }
This should use make_unique, not an explicit constructor and new.
Gyuyoung Kim
Comment 3
2014-10-15 18:26:26 PDT
Created
attachment 239913
[details]
Patch for landing
Gyuyoung Kim
Comment 4
2014-10-15 18:27:05 PDT
(In reply to
comment #2
)
> (From update of
attachment 239858
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=239858&action=review
> > OK to do this, but please use make_unique. > > > Source/WebCore/loader/cache/CachedResource.cpp:517 > > + std::unique_ptr<CachedResourceCallback> callback = m_clientsAwaitingCallback.take(client); > > I’d suggest using auto here instead of writing out the type. > > > Source/WebCore/loader/cache/CachedResource.h:271 > > + static std::unique_ptr<CachedResourceCallback> schedule(CachedResource* resource, CachedResourceClient* client) { return std::unique_ptr<CachedResourceCallback>(new CachedResourceCallback(resource, client)); } > > This should use make_unique, not an explicit constructor and new.
Ok, Fixed.
WebKit Commit Bot
Comment 5
2014-10-15 20:57:29 PDT
Comment on
attachment 239913
[details]
Patch for landing Clearing flags on attachment: 239913 Committed
r174758
: <
http://trac.webkit.org/changeset/174758
>
WebKit Commit Bot
Comment 6
2014-10-15 20:57:32 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