[Webkit-unassigned] [Bug 196855] Fix Covscan uninitialized after ctor

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 12 11:33:20 PDT 2019


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

Filip Pizlo <fpizlo at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fpizlo at apple.com

--- Comment #12 from Filip Pizlo <fpizlo at apple.com> ---
Comment on attachment 367314
  --> https://bugs.webkit.org/attachment.cgi?id=367314
Patch

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

This patch is almost good.  Please revert whitespace changes.  Please consider applying some of the other feedback.

>> Source/JavaScriptCore/dfg/DFGOSRExit.h:135
>> +    ExtraInitializationLevel extraInitializationLevel { };
> 
> You could choose to be explicit here: extraInitializationLevel { ExtraInitializationLevel::None };
> 
> But I think this is fine, too.

Yeah that would be better in this case.

>> Source/JavaScriptCore/runtime/CodeCache.cpp:141
>> +        JSToken token = { };
> 
> I think you should fix this one in ParserTokens.h:
> 
> struct JSToken {
>     JSToken() = default;
>     // ...
> };
> 
> to match the other tokens defined in that file. That would be much more robust.

Agreed.

>> Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:154
>> +        ResultList result { };
> 
> But ResultList is:
> 
> Vector<Value*, 1>
> 
> so this one shouldn't need the brace initialization... correct?

I think that's right.   It's not necessary to have { } on result but it doesn't hurt either.

> Source/WebCore/accessibility/AccessibilityTableColumn.h:60
>  #include "IntRect.h"
>  
>  namespace WebCore {
> -    
> +
>  class RenderTableSection;
>  
>  class AccessibilityTableColumn final : public AccessibilityMockObject {
>  public:
>      static Ref<AccessibilityTableColumn> create();
>      virtual ~AccessibilityTableColumn();
> -    
> +
>      AccessibilityObject* headerObject();
> -        
> +
>      AccessibilityRole roleValue() const override { return AccessibilityRole::Column; }
> -    
> +
>      void setColumnIndex(int columnIndex) { m_columnIndex = columnIndex; }
> -    int columnIndex() const { return m_columnIndex; }    
> -    
> +    int columnIndex() const { return m_columnIndex; }
> +
>      void addChildren() override;
>      void setParent(AccessibilityObject*) override;
> -    
> +
>      LayoutRect elementRect() const override;
> -    
> +
>  private:
>      AccessibilityTableColumn();
> -    
> +
>      AccessibilityObject* headerObjectForSection(RenderTableSection*, bool thTagRequired);
>      bool computeAccessibilityIsIgnored() const override;

Please revert whitespace changes.

-- 
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/20190412/4231c55d/attachment-0001.html>


More information about the webkit-unassigned mailing list