You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
Environment*env=Environment::GetCurrent(isolate);Local<Object>process_object=env->process_object();Local<String>fatal_exception_string=env->fatal_exception_string();>Local<Function>fatal_exception_function=process_object->Get(fatal_exception_string).As<Function>();intexit_code=0;if(!fatal_exception_function->IsFunction()){// failed before the process._fatalException function was added!// this is probably pretty bad. Nothing to do but report and exit.ReportException(env,error,message);exit_code=6;}
Function*Function::Cast(Value*obj){printf("obj->IsFunction()? in Function::Cast %d\n",obj->IsFunction());>CHAKRA_ASSERT(obj->IsFunction());<<<<<<Thread1: signalSIGABRTreturnstatic_cast<Function*>(obj);
}
after comment the CHAKRA_ASSERT(obj->IsFunction()) in Function::Cast , only then i can got detail message of the exception
bootstrap_node.js:489
const ContextifyScript = process.binding('contextify').ContextifyScript;
^
Error: No such module: contextify
at Anonymous function (bootstrap_node.js:489:3)
Program ended with exit code: 6
after googling, i think is not a node-chakracore specific problem, and maybe i can try to figure out the solution with other issues.
for node-chakracore specific, i think there is another problem as title said
maybe the CHAKRA_ASSERT(obj->IsFunction()) in Function::Cast should not breaks the exception detail message output
reviewing the node::FatalException(Isolate* isolate, Local<Value> error, Local<Message> message) in deps/node-chakracore/src/node.cc#2657 i found maybe there is a little bit mistake with v8::Function::Cast in chakrashim.
see ***** comments below~
Environment*env=Environment::GetCurrent(isolate);Local<Object>process_object=env->process_object();Local<String>fatal_exception_string=env->fatal_exception_string();// ***** the fatal_exception_string may not be a function>Local<Function>fatal_exception_function=process_object->Get(fatal_exception_string).As<Function>();// ***** calling the CHAKRA_ASSERT(obj->IsFunction()) in Function::Cast, make breaks hereintexit_code=0;// ***** would never enter this if block while fatal_exception_function is not a functionif(!fatal_exception_function->IsFunction()){ReportException(env,error,message);// ***** so exception detail message never outputexit_code=6;}
The text was updated successfully, but these errors were encountered:
tommyZZM
changed the title
chakrashim: exception of node-bootstrap.js not output currently while embedding as static library
chakrashim: exception of node-bootstrap.js not output currently while embeding as static library
Oct 7, 2017
hi, i m trying to embedding node-chakracore as a static library
but got fatal exception on calling
node::Start(int argc, char** argv)
with these calling stacks (main steps cause problem)
deps/node-chakracore/src/node.cc#5077
deps/node-chakracore/src/node.cc#3666
deps/node-chakracore/deps/chakrashim/src/v8function.cc#96
deps/node-chakracore/src/node.cc#2658
deps/node-chakracore/deps/chakrashim/src/v8function.cc#2783
https://github.com/nodejs/node-chakracore/blob/master/src/node.cc#L2783
after comment the
CHAKRA_ASSERT(obj->IsFunction())
inFunction::Cast
, only then i can got detail message of the exceptionafter googling, i think is not a node-chakracore specific problem, and maybe i can try to figure out the solution with other issues.
for node-chakracore specific, i think there is another problem as title said
maybe the
CHAKRA_ASSERT(obj->IsFunction())
inFunction::Cast
should not breaks the exception detail message outputreviewing the
node::FatalException(Isolate* isolate, Local<Value> error, Local<Message> message)
indeps/node-chakracore/src/node.cc#2657
i found maybe there is a little bit mistake withv8::Function::Cast
inchakrashim
.see
*****
comments below~The text was updated successfully, but these errors were encountered: