You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setting a [PutForwards] attribute when the getter has been overridden doesn't seem to call the new getter #25038
These are cases "Exception propagation from getter of [PutForwards] attribute" and "TypeError when getter of [PutForwards] attribute returns non-object" in WebIDL/ecmascript-binding/put-forwards.html.
In these, Element.style is overridden with a custom getter while keeping its setter the same, and then an element's style gets with a string. Because style is [PutForwards], this needs to put the set value forwards into .cssText, and WPT expects that process to call the getter; instead the getter is not being called.
Note distinction between overriding something on the "[PutForwards] attribute" (style here) and the "[PutForwards target attribute" (cssText here); this is not the same error as #25037 although the code fixes for the two might be adjacent.
The test isn't directly checking for the performance of the get operation itself; what would happen if the generated code's getter threw an exception or returned null? I was reading the lack of an exception in the test as an indication that the getter wasn't happening.
Activity
pshaughn commentedon Dec 3, 2019
Note distinction between overriding something on the "[PutForwards] attribute" (style here) and the "[PutForwards target attribute" (cssText here); this is not the same error as #25037 although the code fixes for the two might be adjacent.
jdm commentedon Dec 3, 2019
Curiously, the generated code look like it it does a get operation:
servo/components/script/dom/bindings/codegen/CodegenRust.py
Lines 3854 to 3878 in 54d88fd
I wonder if this is particular to the style attribute, or if it's a more general problem with other PutForwards attributes.
Reference code for Firefox: https://searchfox.org/mozilla-central/rev/04d8e7629354bab9e6a285183e763410860c5006/dom/bindings/Codegen.py#9557-9587
pshaughn commentedon Dec 3, 2019
The test isn't directly checking for the performance of the get operation itself; what would happen if the generated code's getter threw an exception or returned null? I was reading the lack of an exception in the test as an indication that the getter wasn't happening.
pshaughn commentedon Dec 3, 2019
to do here: write a simpler test that proxies the getter with a counter to see if it's being called with bad output ignored vs. not called at all
pshaughn commentedon Dec 12, 2019
PutForwards is actually commented out entirely in the relevant IDL and I hadn't noticed.