Only pass properties mentioned in specification
Categories
(DevTools :: Framework, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: ochameau, Unassigned)
References
(Blocks 2 open bugs)
Details
There is at least one case, related to DictType, where a property is serialized to RDP even if there is no mention of this property in the spec. It is related to this code: https://searchfox.org/mozilla-central/rev/eac6295c397133b7346822ad31867197e30d7e94/devtools/shared/protocol.js#277-279 if (prop in specTypes) { ret[prop] = specTypes[prop].write(v[prop], ctx); } else { ret[prop] = v[prop]; } The else branch let pass any property that isn't in the spec. It is very confusing to have things being transferred via the RDP that aren't mentioned in any spec. We should try to remove this and always explicitly mention all properties. But I wouldn't be surprise if various code currently depend on such behavior...
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 1•6 years ago
|
||
A try run to see if tests all turn red: https://treeherder.mozilla.org/#/jobs?repo=try&revision=5f12f4c87bfcdcd97979ccb68502aa91435ebc66
Reporter | ||
Comment 2•6 years ago
|
||
Try is very orange. A couple of properties are visible: pseudoElement, primitive and appliedstyle. It is not clear if that is just it or if many other are hidden in this orange tree!
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 3•5 years ago
|
||
The goal is to apply the following patch:
https://hg.mozilla.org/try/rev/f4d16ebd1493bd173833c94db2e69967574ae080
Push to try and fix all the failure by:
- identifying which request fails on which actor.
- fix the actor specification file in order to type the unmentioned attributes.
For example:
Error while calling actor 'pagestyle's method 'getApplied'" "Trying to pass 'pseudoElement' property in DicType 'appliedstyle' without any definition in the specification"
means that:
getApplied
request of pagestyle
actor, returned a dictionnary whose type is called appliedstyle
and the actor implementation pass a pseudoElement
attribute that isn't mentioned in the specification.
The specification of appliedstyle
is here:
https://searchfox.org/mozilla-central/source/devtools/shared/specs/styles.js#32-36
And miss the specification of the pseudoElement
attribute, which is returned over here:
https://searchfox.org/mozilla-central/source/devtools/server/actors/styles.js#736-741
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•2 years ago
|
Description
•