Open Bug 1820734 Opened 2 years ago Updated 1 year ago

Support deserialization of Nodes without an "ownerGlobal" property

Categories

(Remote Protocol :: WebDriver BiDi, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webdriver:backlog])

As noticed in the review for bug 1770733 some Node types like CDATA will not have an ownerGlobal property. As such trying to retrieve a browsing context will fail, and causes us to not being able to deserialize those nodes.

We should find a way to actually get to the browsing context if no ownerGlobal is available.

Priority: -- → P3
Whiteboard: [webdriver:backlog]

I cannot replicate this scenario right now so we may be able to remove the ternary operator. Lets wait until my patches from bug 1830884 landed, which make changes in that area as well and then we can check this bug again.

Depends on: 1830884

This seems to be actually a problem with XPCShell tests and when those use a windowless browser. Maybe as workaround we should not make use of it but convert those tests to real browser chrome tests.

This could also potentially happen if a parent page has a reference to an element in an iframe. Calling element.remove() and then iframe.remove() (and perhaps need to trigger GC and CC) should potentially trigger this issue as well. But here the iframe (and its connected browsing context) is gone and we potentially should fail early with no such frame.

You need to log in before you can comment on or make changes to this bug.