Skip to content

Commit

Permalink
build v8 for muti-version lib.js on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Silentttttt committed Jun 1, 2018
1 parent 01d3aef commit 6b0988f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nf/nvm/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
// const
const (
JSLibRootName = "lib/"
JSLibRootNameLen = len(JSLibRoot)
JSLibRootNameLen = 4
)

var (
Expand Down
Binary file modified nf/nvm/native-lib/libnebulasv8.dylib
Binary file not shown.
3 changes: 2 additions & 1 deletion nf/nvm/v8/lib/execution_env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "../engine.h"
#include "file.h"
#include "logger.h"
#include "global.h"

static AttachLibVersionDelegate alvDelegate = NULL;

Expand Down Expand Up @@ -72,4 +73,4 @@ int SetupExecutionEnv(Isolate *isolate, Local<Context> &context) {

void InitializeExecutionEnvDelegate(AttachLibVersionDelegate aDelegate) {
alvDelegate = aDelegate;
}
}
2 changes: 1 addition & 1 deletion nf/nvm/v8/lib/require_callback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void RequireCallback(const v8::FunctionCallbackInfo<v8::Value> &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;
Expand Down

0 comments on commit 6b0988f

Please sign in to comment.