RESOLVED FIXED 197576
Use WeakPtr for JSLazyEventListener::m_originalNode for safety
https://bugs.webkit.org/show_bug.cgi?id=197576
Summary Use WeakPtr for JSLazyEventListener::m_originalNode for safety
Chris Dumez
Reported 2019-05-03 13:53:46 PDT
Use WeakPtr for JSLazyEventListener::m_originalNode for safety.
Attachments
Patch (5.93 KB, patch)
2019-05-03 13:57 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2019-05-03 13:54:03 PDT
Chris Dumez
Comment 2 2019-05-03 13:57:02 PDT
Chris Dumez
Comment 3 2019-05-03 15:01:23 PDT
Comment on attachment 368981 [details] Patch Clearing flags on attachment: 368981 Committed r244926: <https://trac.webkit.org/changeset/244926>
Chris Dumez
Comment 4 2019-05-03 15:01:24 PDT
All reviewed patches have been landed. Closing bug.
Alexey Proskuryakov
Comment 5 2019-05-05 13:35:50 PDT
Comment on attachment 368981 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=368981&action=review > Source/WebCore/ChangeLog:3 > + Use WeakPtr for JSLazyEventListener::m_originalNode for safety Is this the correct behavior though? Seems like the node needs to be kept alive, and reference cycle needs to be broken in some other way. I think that it warrants a FIXME and assertion at least.
Chris Dumez
Comment 6 2019-05-06 08:58:29 PDT
(In reply to Alexey Proskuryakov from comment #5) > Comment on attachment 368981 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=368981&action=review > > > Source/WebCore/ChangeLog:3 > > + Use WeakPtr for JSLazyEventListener::m_originalNode for safety > > Is this the correct behavior though? Seems like the node needs to be kept > alive, and reference cycle needs to be broken in some other way. No, I do not think we want to keep the original node alive. When we crash (rdar://problem/24314027), the lazy event listener is for a Window object. Lazy event listener for a Window are supposed to have a m_originalNode that is nullptr. So either a lazy event listener was somehow transferred from an element/document to a Window or something else is going on. > > I think that it warrants a FIXME and assertion at least. I am planning on adding assertions to help find the underlying cause of <rdar://problem/24314027>. I'll add the FIXME with the assertions.
Note You need to log in before you can comment on or make changes to this bug.