WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
167838
Fix memory issues related to preload eviction.
https://bugs.webkit.org/show_bug.cgi?id=167838
Summary
Fix memory issues related to preload eviction.
Yoav Weiss
Reported
2017-02-04 11:52:03 PST
Fix memory issues related to preload eviction.
Attachments
Patch
(2.16 KB, patch)
2017-02-04 11:55 PST
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Patch
(2.31 KB, patch)
2017-02-04 12:00 PST
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Patch
(2.32 KB, patch)
2017-02-04 12:56 PST
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Yoav Weiss
Comment 1
2017-02-04 11:55:30 PST
Created
attachment 300633
[details]
Patch
Yoav Weiss
Comment 2
2017-02-04 12:00:15 PST
Created
attachment 300634
[details]
Patch
Andreas Kling
Comment 3
2017-02-04 12:47:38 PST
Comment on
attachment 300634
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=300634&action=review
r=me, thanks for the quick turnaround :)
> Source/WebCore/loader/cache/CachedResourceLoader.cpp:1274 > + if (linkPreloads && linkPreloads->size()) > + m_preloads = WTFMove(linkPreloads); > + else > m_preloads = nullptr;
I think linkPreloads->size() is guaranteed to be >= 1 here, since you only allocate it when actually adding something. I would suggest renaming it to remainingLinkPreloads, and then replacing this block with simply: m_preloads = WTFMove(remainingLinkPreloads);
Yoav Weiss
Comment 4
2017-02-04 12:56:25 PST
Created
attachment 300637
[details]
Patch
Yoav Weiss
Comment 5
2017-02-04 13:04:24 PST
(In reply to
comment #3
)
> Comment on
attachment 300634
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=300634&action=review
> > r=me, thanks for the quick turnaround :) > > > Source/WebCore/loader/cache/CachedResourceLoader.cpp:1274 > > + if (linkPreloads && linkPreloads->size()) > > + m_preloads = WTFMove(linkPreloads); > > + else > > m_preloads = nullptr; > > I think linkPreloads->size() is guaranteed to be >= 1 here, since you only > allocate it when actually adding something. > I would suggest renaming it to remainingLinkPreloads, and then replacing > this block with simply: > m_preloads = WTFMove(remainingLinkPreloads);
Good call. Changed as suggested
WebKit Commit Bot
Comment 6
2017-02-04 13:42:01 PST
Comment on
attachment 300637
[details]
Patch Clearing flags on attachment: 300637 Committed
r211673
: <
http://trac.webkit.org/changeset/211673
>
WebKit Commit Bot
Comment 7
2017-02-04 13:42:06 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