WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
181452
Use protectedThis for the 'updatePrevalentDomainsToPartitionOrBlockCookies' lambda
https://bugs.webkit.org/show_bug.cgi?id=181452
Summary
Use protectedThis for the 'updatePrevalentDomainsToPartitionOrBlockCookies' l...
Keith Rollin
Reported
2018-01-09 14:45:56 PST
WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback has code that looks as follows (reformatted here to make the possible issue more apparent): m_resourceLoadStatistics = WebResourceLoadStatisticsStore::create(..., ..., [this] (...) { ... }, [this, protectedThis = makeRef(*this)] (...) { ... }, [this, protectedThis = makeRef(*this)] (...) { ... }, [this, protectedThis = makeRef(*this)] (...) { ... }); The possible issue is that the first lambda does not create a protectedThis. The bodies of all four lambdas just call member functions that all have similar forms. This would argue for their having the same calling/context requirements, so it seems like the first lambda should also create a protectedThis. Looking at the history of the function, it looks like the lack of a protectedThis may just be due to the way the function evolved.
Attachments
Patch
(2.38 KB, patch)
2018-01-10 14:36 PST
,
Brent Fulgham
cdumez
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2018-01-10 14:21:31 PST
I think you are right!
Radar WebKit Bug Importer
Comment 2
2018-01-10 14:24:46 PST
<
rdar://problem/36416912
>
Brent Fulgham
Comment 3
2018-01-10 14:36:27 PST
Created
attachment 330965
[details]
Patch
Chris Dumez
Comment 4
2018-01-10 14:39:08 PST
Comment on
attachment 330965
[details]
Patch r=me
Brent Fulgham
Comment 5
2018-01-10 16:06:57 PST
Committed
r226742
: <
https://trac.webkit.org/changeset/226742
>
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