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

  Changed paths:
    M Source/WebCore/bindings/scripts/generate-bindings-all.pl

  Log Message:
  -----------
  generate-bindings-all.pl misses supplemental dependency changes that preserve 
list size
https://bugs.webkit.org/show_bug.cgi?id=319233

Reviewed by Darin Adler.

When deciding whether an IDL file must be re-processed, generate-bindings-all.pl
compares the file's previous set of supplemental dependencies against the 
current
set. The comparison was written as:
```
      @{$oldSupplements{$absPath}} ne @{$newSupplements{$absPath} or []}
```
`ne` is a string operator, so both arrays are evaluated in scalar context, i.e.
their element counts. This only compares the *number*
of supplemental
dependencies, not their contents. As a result, a supplement set that changes to 
a
different set of the same size -- for example [A.idl] becoming [B.idl] -- is not
detected as a change. Because the subsequent mtime-based check only inspects the
files still present in the new supplement set, the stale JS*.cpp/.h for that
interface is never regenerated, producing incorrect bindings until an unrelated
change forces a rebuild.

Compare the lists by contents instead. The supplement lists are already stored
sorted (see readSupplementalDependencyFile), so joining each with a NUL 
separator,
a byte that cannot appear in a filesystem path, yields an order-stable,
collision-free comparison that correctly detects additions, removals, and
same-size swaps. Also switch the deref fallback from `or []` to `|| []` for
correct precedence.

* Source/WebCore/bindings/scripts/generate-bindings-all.pl:

Canonical link:
https://flagged.apple.com:443/proxy?t2=De0o5A3Dt8&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE3MDkzQG1haW4=&emid=481efe18-566f-4dab-8e0a-dc568ea228c7&c=11



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

Reply via email to