Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2898162c8c2a3c2bbcd3538f10d5740d6b6a4e03
      
https://github.com/WebKit/WebKit/commit/2898162c8c2a3c2bbcd3538f10d5740d6b6a4e03
  Author: Chris Dumez <[email protected]>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M Source/WebCore/bindings/scripts/CodeGenerator.pm

  Log Message:
  -----------
  Broken interpolation in duplicate-extended-attribute error message in 
CodeGenerator.pm
https://bugs.webkit.org/show_bug.cgi?id=319234

Reviewed by Darin Adler.

MergeExtendedAttributesFromSupplemental dies when a supplemental interface
(partial or mixin via includes) supplies a duplicate, non-mergeable extended
attribute. The diagnostic was written as:
```
      die "... when merging extended attributes for ${property->name}";
```
In a double-quoted string, ${property->name} is not a method call. Perl parses
${ ... } as a symbolic-reference/block dereference and attempts to resolve
`name` as a method on the bareword package `property`, so instead of the
intended message the generator dies with an unrelated:
```
      Can't locate object method "name" via package "property"
```
which masks the real cause (which property actually carried the conflicting
extended attribute). Build the message with string concatenation so
$property->name is invoked as a method.

Like the message it replaces, this only fires on an error path, but that is
precisely when a clear diagnostic matters. All callers pass an IDLAttribute,
IDLOperation, IDLConstant, or IDLDictionaryMember, each of which provides a
`name` accessor.

* Source/WebCore/bindings/scripts/CodeGenerator.pm:
(MergeExtendedAttributesFromSupplemental):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to