[webkit-reviews] review granted: [Bug 184182] Fix the lifetime of the TextRun : [Attachment 337291] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 5 15:25:58 PDT 2018


zalan <zalan at apple.com> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 184182: Fix the lifetime of the TextRun
https://bugs.webkit.org/show_bug.cgi?id=184182

Attachment 337291: Patch

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




--- Comment #11 from zalan <zalan at apple.com> ---
Comment on attachment 337291
  --> https://bugs.webkit.org/attachment.cgi?id=337291
Patch

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

> Source/WebCore/ChangeLog:3
> +	   Fix the lifetime of the TextRun

This title is misleading. You don't change the lifetime of the TextRun.

> Source/WebCore/platform/graphics/TextRun.h:69
> +	   RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(startOffset <
m_text.length());

This line has nothing to do with this patch. Please remove it.

> Source/WebCore/platform/graphics/TextRun.h:83
> -    UChar operator[](unsigned i) const { ASSERT_WITH_SECURITY_IMPLICATION(i
< m_text.length()); return m_text[i]; }
> -    const LChar* data8(unsigned i) const {
ASSERT_WITH_SECURITY_IMPLICATION(i < m_text.length()); ASSERT(is8Bit()); return
&m_text.characters8()[i]; }
> -    const UChar* data16(unsigned i) const {
ASSERT_WITH_SECURITY_IMPLICATION(i < m_text.length()); ASSERT(!is8Bit());
return &m_text.characters16()[i]; }
> +    UChar operator[](unsigned i) const {
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(i < m_text.length()); return
m_text[i]; }
> +    const LChar* data8(unsigned i) const {
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(i < m_text.length());
ASSERT(is8Bit()); return &m_text.characters8()[i]; }
> +    const UChar* data16(unsigned i) const {
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(i < m_text.length());
ASSERT(!is8Bit()); return &m_text.characters16()[i]; }

These lines have nothing to do with this patch. Please remove them.


More information about the webkit-reviews mailing list