[webkit-reviews] review granted: [Bug 209445] Function passed to addEventListener may get garbage collected before the event listener is even added : [Attachment 394319] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 24 16:50:03 PDT 2020


Yusuke Suzuki <ysuzuki at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 209445: Function passed to addEventListener may get garbage collected
before the event listener is even added
https://bugs.webkit.org/show_bug.cgi?id=209445

Attachment 394319: Patch

https://bugs.webkit.org/attachment.cgi?id=394319&action=review




--- Comment #9 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 394319
  --> https://bugs.webkit.org/attachment.cgi?id=394319
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394319&action=review

r=me. It would be nice if we can have RAII class for ensureStillAliveHere, like
EnsureStillAliveScope but it is OK for future patch.

>> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:5139
>> +	    push(@$outputArray, "    ensureStillAliveHere(value);\n\n");
> 
> This is the bindings change that takes care of
setWindowEventHandlerAttribute() and other event handlers.

Looks nice.


More information about the webkit-reviews mailing list