-
Notifications
You must be signed in to change notification settings - Fork 337
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
NJS: loader should be registered using njs_vm_set_module_loader() #1134
Conversation
37a2b2d
to
e3edba2
Compare
It seems there is unused code left and sorry that it affected your job.
|
e3edba2
to
5c00593
Compare
Rebased and removed
|
src/nxt_js.c
Outdated
return njs_vm_create(&opts); | ||
vm = njs_vm_create(&opts); | ||
|
||
njs_vm_set_module_loader(vm, nxt_js_module_loader, jcf); |
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.
Add a check here.
if (nxt_fast_path(vm != NULL)) {
njs_vm_set_module_loader(vm, nxt_js_module_loader, jcf);
}
Others look good.
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.
Hi Andrei, take a look again.
5c00593
to
324c228
Compare
Rebased and added NULL check suggested by @hongzhidao:
|
324c228
to
9055ff6
Compare
Configure version check bumped:
|
This change makes NJS module incompatible with NJS older than 0.8.3. Therefore, the configuration version check has been adjusted accordingly. This change was introduced in NJS 0.8.3 here: <https://hg.nginx.com/njs/rev/ad1a7ad3c715>
9055ff6
to
3aec4bd
Compare
Rebase and bump NJS version
|
LGTM. |
This change was introduced in NJS 0.8.3 here:
https://hg.nginx.com/njs/rev/ad1a7ad3c715