-
Notifications
You must be signed in to change notification settings - Fork 322
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
Symbol::for_global incorrectly using ForApi, returns symbols from separate registry #1323
Comments
Good catch. I think we should deprecate this method and add the explicit for/for_api versions. |
I don't think we can use |
~What about
|
lrowe
added a commit
to lrowe/rusty_v8
that referenced
this issue
Sep 17, 2023
`for_global` was documented as `for_key` but implemented as `for_api`. Closes denoland#1323
lrowe
added a commit
to lrowe/rusty_v8
that referenced
this issue
Sep 17, 2023
`for_global` was documented as `for_key` but implemented as `for_api`. Closes denoland#1323
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
v8 provides two methods on Symbol for returning global symbols, one of which uses a separate registry, see: https://v8.github.io/api/head/classv8_1_1Symbol.html:
In rusty_v8 for_global is described as being equivalent to For(), see: https://docs.rs/v8/0.76.0/v8/struct.Symbol.html#method.for_global
But in the code we can see it uses
v8__Symbol__ForApi
:rusty_v8/src/symbol.rs
Lines 60 to 71 in 0f06970
I imagine rusty_v8 should expose both APIs. I think it would make sense to expose
for_api
with the current implementation and fixfor_global
to match its description and callv8__Symbol__For
.A GitHub search of the denoland org does not show any current use of
for_global
other than the rusty_v8 tests.The text was updated successfully, but these errors were encountered: