[Webkit-unassigned] [Bug 174166] New: FileMonitor should not be ref counted
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 5 11:30:14 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=174166
Bug ID: 174166
Summary: FileMonitor should not be ref counted
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: bfulgham at webkit.org
The current API for FileMonitor is fragile, because it requires the user to manually stop the monitor to make sure it is properly cleaned up.
This was done to make sure the event handler would never be left with a dangling this pointer. Instead, we should vend a WeakPtr to the closure, and check it when processing events to see if the FileMonitor was destroyed. If it was, we don't need to take any action.
This will allow the object to properly terminate monitoring when the object goes out of scope.
--
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/20170705/7056ae4a/attachment-0001.html>
More information about the webkit-unassigned
mailing list