[webkit-reviews] review granted: [Bug 200083] REGRESSION (r244995): Assertion failure when addEventListener to an SVGElement which has an. instance in shadow tree : [Attachment 374827] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 24 16:35:03 PDT 2019


Ryosuke Niwa <rniwa at webkit.org> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 200083: REGRESSION (r244995): Assertion failure when addEventListener to an
SVGElement which has an. instance in shadow tree
https://bugs.webkit.org/show_bug.cgi?id=200083

Attachment 374827: Patch

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




--- Comment #7 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 374827
  --> https://bugs.webkit.org/attachment.cgi?id=374827
Patch

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

> Source/WebCore/bindings/js/JSLazyEventListener.cpp:98
> +    if (is<SVGElement>(node)) {
> +	   auto& element = downcast<SVGElement>(node);
> +
> +	   if (element.correspondingElement()) {

We shouldn't be running this code in release builds when the assertion is
disabled.
I suggest we wrap this into an inline helper function instead.
e.g. isCloneInShadowTreeOfSVGUseElement


More information about the webkit-reviews mailing list