-
Notifications
You must be signed in to change notification settings - Fork 30k
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: use InstantiateModule instead of deprecated #15423
src: use InstantiateModule instead of deprecated #15423
Conversation
src/module_wrap.cc
Outdated
|
||
// clear resolve cache on instantiate | ||
obj->resolve_cache_.clear(); | ||
|
||
if (!ok) { | ||
if (!ok.ToChecked()) { |
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.
ok.FromMaybe(false)
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.
Nice, I was not aware of that function. Thanks.
The following deprecation warning is displayed when compiling: ../src/module_wrap.cc:187:18: warning: 'Instantiate' is deprecated [-Wdeprecated-declarations] bool ok = mod->Instantiate(ctx, ModuleWrap::ResolveCallback); ^ ../deps/v8/include/v8.h:1158:22: note: 'Instantiate' has been explicitly marked deprecated here bool Instantiate(Local<Context> context, ^ This commit changes this function call to use InstantiateModule instead which returns a Maybe<bool>.
51bc74b
to
3ebf050
Compare
Landed in bd85752 |
The following deprecation warning is displayed when compiling: ../src/module_wrap.cc:187:18: warning: 'Instantiate' is deprecated [-Wdeprecated-declarations] bool ok = mod->Instantiate(ctx, ModuleWrap::ResolveCallback); ^ ../deps/v8/include/v8.h:1158:22: note: 'Instantiate' has been explicitly marked deprecated here bool Instantiate(Local<Context> context, ^ This commit changes this function call to use InstantiateModule instead which returns a Maybe<bool>. PR-URL: #15423 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
If I understand this correctly, this depends on v8 6.1 correct? So it cannot be backported to v8.x until 8.1 lands. Ping @MylesBorins so this is on the radar for when v8 6.1 lands. |
The following deprecation warning is displayed when compiling: ../src/module_wrap.cc:187:18: warning: 'Instantiate' is deprecated [-Wdeprecated-declarations] bool ok = mod->Instantiate(ctx, ModuleWrap::ResolveCallback); ^ ../deps/v8/include/v8.h:1158:22: note: 'Instantiate' has been explicitly marked deprecated here bool Instantiate(Local<Context> context, ^ This commit changes this function call to use InstantiateModule instead which returns a Maybe<bool>. PR-URL: nodejs/node#15423 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
The following deprecation warning is displayed when compiling: ../src/module_wrap.cc:187:18: warning: 'Instantiate' is deprecated [-Wdeprecated-declarations] bool ok = mod->Instantiate(ctx, ModuleWrap::ResolveCallback); ^ ../deps/v8/include/v8.h:1158:22: note: 'Instantiate' has been explicitly marked deprecated here bool Instantiate(Local<Context> context, ^ This commit changes this function call to use InstantiateModule instead which returns a Maybe<bool>. PR-URL: nodejs/node#15423 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
The following deprecation warning is displayed when compiling: ../src/module_wrap.cc:187:18: warning: 'Instantiate' is deprecated [-Wdeprecated-declarations] bool ok = mod->Instantiate(ctx, ModuleWrap::ResolveCallback); ^ ../deps/v8/include/v8.h:1158:22: note: 'Instantiate' has been explicitly marked deprecated here bool Instantiate(Local<Context> context, ^ This commit changes this function call to use InstantiateModule instead which returns a Maybe<bool>. PR-URL: #15423 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
The following deprecation warning is displayed when compiling: ../src/module_wrap.cc:187:18: warning: 'Instantiate' is deprecated [-Wdeprecated-declarations] bool ok = mod->Instantiate(ctx, ModuleWrap::ResolveCallback); ^ ../deps/v8/include/v8.h:1158:22: note: 'Instantiate' has been explicitly marked deprecated here bool Instantiate(Local<Context> context, ^ This commit changes this function call to use InstantiateModule instead which returns a Maybe<bool>. PR-URL: #15423 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
The following deprecation warning is displayed when compiling: ../src/module_wrap.cc:187:18: warning: 'Instantiate' is deprecated [-Wdeprecated-declarations] bool ok = mod->Instantiate(ctx, ModuleWrap::ResolveCallback); ^ ../deps/v8/include/v8.h:1158:22: note: 'Instantiate' has been explicitly marked deprecated here bool Instantiate(Local<Context> context, ^ This commit changes this function call to use InstantiateModule instead which returns a Maybe<bool>. PR-URL: #15423 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
The following deprecation warning is displayed when compiling:
This commit changes this function call to use InstantiateModule instead
which returns a Maybe.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
src