[webkit-changes] [WebKit/WebKit] 599c0c: Web Inspector: Use-after-scope in lambda in WebCor...

Commit Queue noreply at github.com
Mon Dec 12 03:20:15 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 599c0cb20b8118a147f7ef235e56d3dcb2fe7758
      https://github.com/WebKit/WebKit/commit/599c0cb20b8118a147f7ef235e56d3dcb2fe7758
  Author: David Kilzer <ddkilzer at apple.com>
  Date:   2022-12-12 (Mon, 12 Dec 2022)

  Changed paths:
    M Source/WebCore/inspector/InspectorStyleSheet.cpp

  Log Message:
  -----------
  Web Inspector: Use-after-scope in lambda in WebCore::isValidRuleHeaderText()
https://bugs.webkit.org/show_bug.cgi?id=249119
<rdar://102887283>

Reviewed by Patrick Angle.

`CSSParserImpl` holds a reference to a `CSSParserContext`, but
isValidRuleHeaderText() creates a temporary context on the
stack, which is destroyed after the parser is created.  Fix this
by creating a stack variable for the context that outlives the
parser.

Test: inspector/css/setGroupingHeaderText.html

* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::isValidRuleHeaderText):

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




More information about the webkit-changes mailing list