legacy platform objects no longer override desc.[[Configurable]] #1418
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
None of the code generation for named setters in any of the major browsers appears to honor Step 3. of 3.9.3. [DefineOwnProperty].
The test case in WPT
(http://wpt.live/dom/collections/HTMLCollection-supported-property-names.html) already appears to assert that the descriptor is not forced to become [[Configurable]], and this test case is passing in most implementations.
I've done a bunch of detective work to justify this 2 line patch, so dumping all of that here. commit hashes are current as of writing this.
WebKit:
https://github.com/WebKit/WebKit/blob/f288b9088d1b74b980c3b7a8d5add134f7689bdb/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm#L1545-L1551
Chromium:
https://source.chromium.org/chromium/chromium/src/+/b1387a25dd3e3ebb02ff33c935325a0d4d74c330:third_party/blink/renderer/bindings/scripts/bind_gen/interface.py;l=3484-3538
Gecko:
https://github.com/mozilla/gecko-dev/blob/0b1d02b2cb5736511139cf0e40b318273e825899/dom/bindings/Codegen.py#L15261-L15301
With the [[GetOwnProperty]] algorithm, there are a few documented instances where this is intentionally ignored:
[[GetOwnProperty]] for Location objects: https://github.com/mozilla/gecko-dev/blob/0b1d02b2cb5736511139cf0e40b318273e825899/dom/bindings/Codegen.py#L16396-L16400 -- Per Gecko's passing the test, it does not appear to actually override the set descriptor in any way, at least not with regards to configurability.
In Chromium, similarly, it doesn't appear that any overriding occurs in LegacyPlatformObjecttGetOwnProperty:
https://source.chromium.org/chromium/chromium/src/+/b1387a25dd3e3ebb02ff33c935325a0d4d74c330:third_party/blink/renderer/bindings/scripts/bind_gen/interface.py;l=3186-3202
Finally, in WebKit we also see no overriding behaviour for the descriptor attributes when the named property visibility algorithm returns false: https://github.com/WebKit/WebKit/blob/f288b9088d1b74b980c3b7a8d5add134f7689bdb/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm#L983-L992
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff