[Webkit-unassigned] [Bug 181452] New: May need a protectedThis
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 9 14:45:56 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=181452
Bug ID: 181452
Summary: May need a protectedThis
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit2
Assignee: webkit-unassigned at lists.webkit.org
Reporter: krollin at apple.com
CC: krollin at apple.com, wilander at apple.com
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180109/e3f13a6a/attachment-0001.html>
More information about the webkit-unassigned
mailing list