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•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year 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•11 months 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•11 months 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•11 months 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•11 months 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•11 months ago
|
||
We currently don't have an API to check for "object implements interface".
Assignee | ||
Comment 7•11 months 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•10 months 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•9 months 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•9 months ago
|
||
Deserialization is simple enough so that we should combine the work with the serialization work.
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 11•9 months ago
|
||
Assignee | ||
Comment 12•9 months ago
|
||
Depends on D165420
Assignee | ||
Comment 13•9 months ago
|
||
Depends on D165421
Comment 14•9 months ago
|
||
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/10fa415ea515 [dom] Make isDOMObject() available through ChromeUtils. r=smaug https://hg.mozilla.org/integration/autoland/rev/865755e816b0 [WebDriver BiDi] Add support for serialization and deserialization of generic platform objects. r=webdriver-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/98ec90915d25 [wdspec] Add tests for serialization and deserialization of generic platform objects. r=webdriver-reviewers,jdescottes
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/37674 for changes under testing/web-platform/tests
Updated•9 months ago
|
Comment 16•9 months 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
Upstream PR was closed without merging
Upstream PR merged by jgraham
Assignee | ||
Updated•8 months ago
|
Description
•