[Webkit-unassigned] [Bug 137918] Use references instead of pointers in EditingStyle

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 6 10:04:57 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=137918

Chris Dumez <cdumez at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #241109|review?                     |review-
              Flags|                            |

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

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

r- because at least one of the dereference does not seem safe.

> Source/WebCore/editing/EditingStyle.cpp:54
> +#include <stdio.h>

Why?

> Source/WebCore/editing/EditingStyle.cpp:136
> +        return propertyCSSValue;

return propertyCSSValue.release();

> Source/WebCore/editing/EditingStyle.cpp:137
> +    return PassRefPtr<CSSValue>();

We usually just return nullptr; as this is shorter.

> Source/WebCore/editing/EditingStyle.cpp:344
> +    m_mutableStyle = style.mutableCopy();

Can this be moved to the initializer list now?

> Source/WebCore/editing/ReplaceSelectionCommand.cpp:489
> +        RefPtr<EditingStyle> newInlineStyle = EditingStyle::create(*inlineStyle);

Why is this safe? There is a null check right after...

> Source/WebCore/editing/ReplaceSelectionCommand.cpp:791
> +    RefPtr<EditingStyle> style = EditingStyle::create(*wrappingStyleSpan->inlineStyle());

Why is this safe?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141106/9cb137e8/attachment-0002.html>


More information about the webkit-unassigned mailing list