[webkit-reviews] review granted: [Bug 172899] Streamline handling of attributes, using references as much as possible : [Attachment 311959] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 4 10:23:18 PDT 2017


Chris Dumez <cdumez at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 172899: Streamline handling of attributes, using references as much as
possible
https://bugs.webkit.org/show_bug.cgi?id=172899

Attachment 311959: Patch

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




--- Comment #6 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 311959
  --> https://bugs.webkit.org/attachment.cgi?id=311959
Patch

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

r=me with comment

> Source/WebCore/dom/ScriptElement.cpp:320
> +    auto& nonce =
m_element.attributeWithoutSynchronization(HTMLNames::nonceAttr);

This looks unsafe given the dispatchBeforeLoadEvent() call below. We execute JS
which could modify the attributes and invalidate the reference.

> Source/WebCore/html/HTMLAudioElement.cpp:54
> +    element->setAttributeWithoutSynchronization(preloadAttr, "auto");

ASCIILiteral("auto") ?


More information about the webkit-reviews mailing list