-
Notifications
You must be signed in to change notification settings - Fork 252
Closed
Description
still struggling to port test-marshall.js from SwingSet; now I get:
agoric/SwingSet/node_modules/@agoric/eventual-send/dist/eventual-send.esm.js (57) # Break: (host): invalid descriptor!
https://github.com/Agoric/eventual-send/blob/master/src/index.js#L57
I reduced it to the following. If I run it in node, I get defined: getX as expected. In xs (without the trace definition, and with export default function main) I get main.js (4) # Break: (host): invalid descriptor!.
Perhaps that's by design? Perhaps I should be using preload or Compartments differently to do this sort of thing?
function trace(s) {
console.log(s);
}
function main() {
trace('in main\n');
Object.defineProperties(
Promise.prototype,
Object.getOwnPropertyDescriptors({
getX(key) {
return 2;
},
}),
);
trace(`defined: ${String(Object.keys(Promise.prototype))}\n`);
}
main();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels