Type of native array has changed
This commit is contained in:
parent
f23729acdb
commit
d83cb53997
1 changed files with 6 additions and 2 deletions
|
@ -129,9 +129,11 @@ void InitAsarSupport(v8::Isolate* isolate,
|
||||||
v8::Local<v8::Value> process,
|
v8::Local<v8::Value> process,
|
||||||
v8::Local<v8::Value> require) {
|
v8::Local<v8::Value> require) {
|
||||||
// Evaluate asar_init.coffee.
|
// Evaluate asar_init.coffee.
|
||||||
|
const char* asar_init_native = reinterpret_cast<const char*>(
|
||||||
|
static_cast<const unsigned char*>(node::asar_init_native));
|
||||||
v8::Local<v8::Script> asar_init = v8::Script::Compile(v8::String::NewFromUtf8(
|
v8::Local<v8::Script> asar_init = v8::Script::Compile(v8::String::NewFromUtf8(
|
||||||
isolate,
|
isolate,
|
||||||
node::asar_init_native,
|
asar_init_native,
|
||||||
v8::String::kNormalString,
|
v8::String::kNormalString,
|
||||||
sizeof(node::asar_init_native) -1));
|
sizeof(node::asar_init_native) -1));
|
||||||
v8::Local<v8::Value> result = asar_init->Run();
|
v8::Local<v8::Value> result = asar_init->Run();
|
||||||
|
@ -141,9 +143,11 @@ void InitAsarSupport(v8::Isolate* isolate,
|
||||||
v8::Local<v8::Value>,
|
v8::Local<v8::Value>,
|
||||||
std::string)> init;
|
std::string)> init;
|
||||||
if (mate::ConvertFromV8(isolate, result, &init)) {
|
if (mate::ConvertFromV8(isolate, result, &init)) {
|
||||||
|
const char* asar_native = reinterpret_cast<const char*>(
|
||||||
|
static_cast<const unsigned char*>(node::asar_native));
|
||||||
init.Run(process,
|
init.Run(process,
|
||||||
require,
|
require,
|
||||||
std::string(node::asar_native, sizeof(node::asar_native) - 1));
|
std::string(asar_native, sizeof(node::asar_native) - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue