Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 36f50007f40698ca4b6829b456d25ee89f92ae4d
      
https://github.com/WebKit/WebKit/commit/36f50007f40698ca4b6829b456d25ee89f92ae4d
  Author: Anne van Kesteren <[email protected]>
  Date:   2025-04-25 (Fri, 25 Apr 2025)

  Changed paths:
    M 
Source/WebCore/SaferCPPExpectations/NoUncheckedPtrMemberCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
    M Source/WebCore/html/track/WebVTTParser.cpp
    M Source/WebCore/html/track/WebVTTParser.h

  Log Message:
  -----------
  Reduce unsafeness in WebVTTParser
https://bugs.webkit.org/show_bug.cgi?id=292005

Reviewed by Jer Noble.

As per https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines

As m_decoder is initialized at object creation with the return value of
TextResourceDecoder::create (which returns a Ref), there's no need for
it to be a RefPtr.

Since we only need to Ref m_currentRegion once, we don't introduce
protectedCurrentRegion.

* Source/WebCore/SaferCPPExpectations/NoUncheckedPtrMemberCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/WebCore/html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::collectRegionSettings):
(WebCore::WebVTTParser::checkAndCreateRegion):
(WebCore::WebVTTParser::checkAndStoreStyleSheet):
(WebCore::WebVTTTreeBuilder::protectedCurrentNode const):
(WebCore::WebVTTTreeBuilder::buildFromString):
(WebCore::WebVTTTreeBuilder::constructTreeFromToken):
* Source/WebCore/html/track/WebVTTParser.h:

Canonical link: https://commits.webkit.org/294099@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to