-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
src: add fetch
to bootstrap/browser.js
#41958
src: add fetch
to bootstrap/browser.js
#41958
Conversation
Fixes: nodejs#41816 Signed-off-by: Darshan Sen <raisinten@gmail.com>
Review requested:
|
Hmm, seems to fail during the node:internal/options:20
({ options: optionsMap } = getCLIOptions());
^
Error: Should not query options before bootstrapping is done
at getCLIOptionsFromBinding (node:internal/options:20:32)
at getOptionValue (node:internal/options:40:19)
at node:internal/bootstrap/browser:79:5
#
# Fatal error in v8::ToLocalChecked
# Empty MaybeLocal.
# and the exception is coming from Line 942 in ceaa299
The bootstrap script is run during compilation but the CLI option is passed at runtime. @joyeecheung is this something we should even be doing? If so, how? |
options are set at runtime. bootstrapping happens at build time. if something needs to check options it should not be part of bootstrapping. |
I don't think this can land until we make |
Ah, yes indeed. I'm closing this because re-exposing fetch when it becomes stable should be much easier to do than fixing git conflicts in this pr. |
A trick that you can do is to add it during bootstrap unconditionally and then removing it during pre-execution when the option is not on - but yeah it’s probably still too early to do this for fetch. |
@joyeecheung yes, I did something similar in #41969. |
Fixes: #41816
Signed-off-by: Darshan Sen raisinten@gmail.com