Auto merge of #28581 - yvt:fix-xo-attr-setter, r=KiChjang

The condition for exposing a cross-origin setter should be `CrossOriginWritable`, not `CrossOriginReadable`

Fixes `Location#href` being inaccessible from a cross-origin document.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

---
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___
This commit is contained in:
bors-servo 2021-08-19 21:10:10 -04:00 committed by GitHub
commit 42cbba8a8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View file

@ -1936,7 +1936,7 @@ class AttrDefiner(PropertyDefiner):
def setter(attr):
attr = attr['attr']
if ((self.crossorigin and not attr.getExtendedAttribute("CrossOriginReadable"))
if ((self.crossorigin and not attr.getExtendedAttribute("CrossOriginWritable"))
or (attr.readonly
and not attr.getExtendedAttribute("PutForwards")
and not attr.getExtendedAttribute("Replaceable"))):