Add support for serialization and deserialization of platform objects
Categories
(Remote Protocol :: WebDriver BiDi, task, P1)
Tracking
(firefox110 fixed)
Tracking | Status | |
---|---|---|
firefox110 | --- | fixed |
People
(Reporter: Sasha, Assigned: whimboo)
References
(Blocks 2 open bugs, )
Details
(Whiteboard: [webdriver:m5][wptsync upstream][webdriver:relnote])
Attachments
(3 files)
Add support for serialization of the generic platform object. The platform object, which implements WindowProxy, is added in the scope of bug 1770754 and the platform object, which implements Node, will be added in bug 1770731. It will require adding wdspec tests as well.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Lets block bug 1790361 once we know that we can fix it in M5.
It would be good to know how we could identify platform objects vs normal Javascript objects.
Assignee | ||
Comment 2•2 years ago
|
||
Hi Olli, is there an easy way to identify objects as platform objects? As described above we would have to differentiate these from normal JavaScript objects eg. as created by the website. Thanks.
Comment 3•2 years ago
|
||
I assume you'll support only some platform objects. Would <interfacePrototype>.isInstance() work? See the dev-platform message titled
"[dev-platform] chrome-privilieged scripts: instanceof
operator against DOM interfaces will soon be strictly rejected"
Assignee | ||
Comment 4•2 years ago
|
||
For reference the thread as mentioned in the last comment can be found here:
https://groups.google.com/a/mozilla.org/g/dev-platform/c/jc_kG5gmdpk/m/fDuAVsJ1BQAJ
We will have to support all the platform objects (except Node
of type element and some others that we handle differently) as accessible by web content to match the WebDriver BiDi specification, and everything else as well when we want to use our implementation to also work in chrome scope.
As such is there a way to check if some random object is implemented as interface
? I'm fairly sure that's all what we would need.
Comment 5•2 years ago
|
||
(not still sure how "serialization" would work)
I can't now immediately think anything which could be used to check whether something implements just any interface.
peterv or edgar might recall.
Comment 6•2 years ago
|
||
We currently don't have an API to check for "object implements interface".
Assignee | ||
Comment 7•2 years ago
|
||
(In reply to Peter Van der Beken [:peterv] from comment #6)
We currently don't have an API to check for "object implements interface".
Peter, how easy/hard would it be to get such an API added? Also where exactly would this need to happen?
Comment 8•2 years ago
•
|
||
You could expose IsDOMObject
(https://searchfox.org/mozilla-central/rev/83b86005c6913c2062419efb8aabdf2e683aa47f/dom/bindings/BindingUtils.h#149) as a ChromeOnly
API, I think that'll give you "object implements interface". (Assuming that are the semantics you want, note that it doesn't include interface objects, interface prototype objects, named property objects, …)
Assignee | ||
Comment 9•2 years ago
|
||
Thanks Peter! That sounds good. We will have a look in how to get this implemented, and most likely will file a separate DOM bug for that.
Assignee | ||
Comment 10•2 years ago
|
||
Deserialization is simple enough so that we should combine the work with the serialization work.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
Assignee | ||
Comment 12•2 years ago
|
||
Depends on D165420
Assignee | ||
Comment 13•2 years ago
|
||
Depends on D165421
Comment 14•2 years ago
|
||
Comment 16•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/10fa415ea515
https://hg.mozilla.org/mozilla-central/rev/865755e816b0
https://hg.mozilla.org/mozilla-central/rev/98ec90915d25
Assignee | ||
Updated•2 years ago
|
Description
•