Refactor script evaluation code to make use of a Realm class
Categories
(Remote Protocol :: WebDriver BiDi, task, P1)
Tracking
(firefox105 fixed)
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [webdriver:m4])
Attachments
(1 file)
To serialize and deserialize complex Javascript objects the appropriate code in RemoteValue.jsm
needs details about the realm (sandbox) it operates on. This includes not only the realm id
but also the object cache that is used to store DebuggerObject
instances and to generate their appropriate handleId
.
With bug 1770480 there will be sandbox support for the script module, but it keeps known sandboxes within this module as simple maps and only sharing a sandbox (realm) id. Tying more data like the above will not evolve over time and will make it more complex to maintain and to share with other modules in the future.
As such each sandbox and the default window global should be wrapped within a Realm
class so that each instance contains all the required data and can easily be shared via reference.
We need a base class for common code and most likely specific sub classes for individual realm types (window realm, sandbox realm, worker realm?, ...).
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 3•2 years ago
|
||
bugherder |
Description
•