-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
The long road to rusty_v8 #3556
Conversation
let error = msg.get_value(); | ||
let mut error_global = v8::Global::<v8::Value>::new(); | ||
error_global.set(scope, error); | ||
deno_isolate | ||
.pending_promise_map_ | ||
.insert(promise_id, error_global); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ry @piscisaureus msg.get_value()
is an example of empty Local<>
handle - originally (ie. in libdeno
) promise was assigned to variable at the top of the function - I tried doing the same here and it failed. To be more precise, if event is PromiseHandlerAddedAfterReject
then mgs.get_promise()
returns Local<Promise>
which is empty, in our case it crashes because of the unwrap()
in get_promise
.
Anyway, this works now, just wanted to let you know I encountered Local<>
that actually has an empty handle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, this works now, just wanted to let you know I encountered Local<> that actually has an empty handle
I'm aware that this happens. If you encounter one of these cases, feel free to change the API by swapping out the Local<T>
for an Option<Local<T>>
.
@bartlomieju @piscisaureus Amazing work! I'm very happy to see this PR merge - we've been working on it in one form or another for about 5 months now. This is the beginning of a new era for Deno, where the build and binding complexity is pushed into a separate crate. There is a lot to clean up, but I think it's better to do that in follow up PRs, as long as this stays green. |
The executable size almost doubled after this PR. I'm not sure what exactly caused this... |
Fixes #3530, replaces libdeno with rusty_v8
Fixes #3367, cannot publish cargo crate
Towards #1120, chrome devtools debug because rusty-v8 binds the inspector API
https://crates.io/crates/rusty_v8
The first goal is to pass