Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

refactor: Factor out stalled top-level await reporting#46

Merged
bartlomieju merged 2 commits into
denoland:mainfrom
bartlomieju:find_top_level_await
Jul 19, 2023
Merged

refactor: Factor out stalled top-level await reporting#46
bartlomieju merged 2 commits into
denoland:mainfrom
bartlomieju:find_top_level_await

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

Extracted from #41.

@bartlomieju bartlomieju requested a review from mmastrac July 19, 2023 00:56
@bartlomieju bartlomieju enabled auto-merge (squash) July 19, 2023 00:56
Comment thread core/runtime/jsruntime.rs
let msg = v8::Local::new(scope, messages[0].clone());
let js_error = JsError::from_v8_message(scope, msg);
return Poll::Ready(Err(js_error.into()));
let known_realms = self.inner.state.borrow().known_realms.clone();

@mmastrac mmastrac Jul 19, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure about this one -- this will be extremely expensive even in an error path. Can we pass the slice into find_and_report_stalled_level_await_in_any_realm instead?

@mmastrac mmastrac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One minor thing for the error path -- replace Vec w/slice

@bartlomieju bartlomieju merged commit 9b99951 into denoland:main Jul 19, 2023
@bartlomieju bartlomieju deleted the find_top_level_await branch July 19, 2023 09:45
@bartlomieju

Copy link
Copy Markdown
Member Author

Ooops, I just noticed the comment - I had auto-merge enabled. I'll look into fixing the clone here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants