diff --git a/nf/nvm/module.go b/nf/nvm/module.go index 10b3d13ee..19e8241ad 100644 --- a/nf/nvm/module.go +++ b/nf/nvm/module.go @@ -34,7 +34,7 @@ import ( // const const ( JSLibRootName = "lib/" - JSLibRootNameLen = len(JSLibRoot) + JSLibRootNameLen = 4 ) var ( diff --git a/nf/nvm/native-lib/libnebulasv8.dylib b/nf/nvm/native-lib/libnebulasv8.dylib index 4edbd3117..e6b6173e6 100755 Binary files a/nf/nvm/native-lib/libnebulasv8.dylib and b/nf/nvm/native-lib/libnebulasv8.dylib differ diff --git a/nf/nvm/v8/lib/execution_env.cc b/nf/nvm/v8/lib/execution_env.cc index 2cec293b2..aa5adf871 100644 --- a/nf/nvm/v8/lib/execution_env.cc +++ b/nf/nvm/v8/lib/execution_env.cc @@ -21,6 +21,7 @@ #include "../engine.h" #include "file.h" #include "logger.h" +#include "global.h" static AttachLibVersionDelegate alvDelegate = NULL; @@ -72,4 +73,4 @@ int SetupExecutionEnv(Isolate *isolate, Local &context) { void InitializeExecutionEnvDelegate(AttachLibVersionDelegate aDelegate) { alvDelegate = aDelegate; -} \ No newline at end of file +} diff --git a/nf/nvm/v8/lib/require_callback.cc b/nf/nvm/v8/lib/require_callback.cc index 28c1b8783..74f0db916 100644 --- a/nf/nvm/v8/lib/require_callback.cc +++ b/nf/nvm/v8/lib/require_callback.cc @@ -122,7 +122,7 @@ void RequireCallback(const v8::FunctionCallbackInfo &info) { char *abPath = NULL; if (strcmp(*filename, LIB_WHITE)) { // if needed, check array instead. char versioned[MAX_VERSIONED_PATH_LEN] = {0}; - if (attachVersion(versioned, context, filename) != 0) { + if (attachVersion(versioned, context, *filename) != 0) { isolate->ThrowException(Exception::Error(String::NewFromUtf8( isolate, "attach version failed"))); return;