Closed Bug 1779226 Opened 2 years ago Closed 2 years ago

Support serialization of plain JS objects with simple value fields

Categories

(Remote Protocol :: WebDriver BiDi, task, P1)

task
Points:
2

Tracking

(firefox105 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: jdescottes, Assigned: Sasha)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webdriver:m4][webdriver:relnote])

Attachments

(1 file)

The serialization added in Bug 1770752 is not handling plain JS objects.
However they are already handled by the deserialization, so it could be nice to support them, similarly to how we support other collections such as maps, arrays, sets etc...

Plain JS object can be identified using ChromeUtils.getClassName(obj) == "Object".

xpcshell tests can be added to cover this. Existing wdspec tests also indirectly cover this.

We should keep in mind that this if condition is fine for the moment but once we have implemented the serialization of all the other types the serialization of plain objects should be the fallback and as such the if condition needs to be removed.

The other option would be to add this as the fallback and have explicit branches for the types we don't support that raise an error.

Points: --- → 2
Priority: -- → P1
Whiteboard: [webdriver:m4]
Depends on: 1779393
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a8595c1dd7fc Add support for serialization of plain JS objects with simple value fields. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
Whiteboard: [webdriver:m4] → [webdriver:m4][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: