(realm, code)
| 92 | // The same as evalInRealmAndWait but returns the result of evaluating "code" as |
| 93 | // an expression. |
| 94 | async function evalInRealmAndReturn(realm, code) { |
| 95 | const myId = id(); |
| 96 | await evalInRealmAndWait(realm, `window.${myId} = ${code};`); |
| 97 | return realm[myId]; |
| 98 | } |
| 99 | |
| 100 | // Constructs an object in constructedRealm and copies it into readRealm and |
| 101 | // writeRealm. Returns the id that can be used to access the object in those |
no test coverage detected