Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(daemon): binding Promise breaks exo #2439

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/daemon/src/web-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ const hardenedEndowments = harden({
TextEncoder,
TextDecoder,
URL,
// This one is important for exo to work.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhofman or @michaelfig can I ask you to help @kumavis expand this comment to explain why and where to look for more? I think this is the work of the handled promise shim, but I did not know it replaced globalThis.Promise.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@endo/eventual-send does not mutate Promise in any way, so I'm confused as to why this line is necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't understand why this is necessary. Is there anything in your environment that might be replacing the global Promise? Maybe some telemetry library?

Promise,
});

const globalProps = collectPropsAndBind(window);
Expand All @@ -74,8 +76,8 @@ delete globalProps.NaN;
delete globalProps.Infinity;

const endowments = Object.freeze({
...hardenedEndowments,
...globalProps,
...hardenedEndowments,
process: {
env: {},
},
Expand Down
Loading