node_patches/node8.9.3_modified/src/node.cc
// Executes a str within the current v8 context.
Executes a str within the current v8 context.
Executes a str within the current v8 context .
static Local<Value> ExecuteString(Environment* env,
                                  Local<String> source,
                                  Local<String> filename) {
  EscapableHandleScope scope(env->isolate());
  TryCatch try_catch(env->isolate());
  try_catch.SetVerbose(false);
  ScriptOrigin origin(filename);
  MaybeLocal<v8::Script> script =
      v8::Script::Compile(env->context(), source, &origin);
  if (script.IsEmpty()) {
    ReportException(env, try_catch);
    exit(3);
  }
  Local<Value> result = script.ToLocalChecked()->Run();
  if (result.IsEmpty()) {
    ReportException(env, try_catch);
    exit(4);
  }
  return scope.Escape(result);
}
static Local < Value > ExecuteString ( Environment * env , Local < String > source , Local < String > filename ) { EscapableHandleScope scope ( env -> isolate ( ) ) ; TryCatch try_catch ( env -> isolate ( ) ) ; try_catch . SetVerbose ( false ) ; ScriptOrigin origin ( filename ) ; MaybeLocal < v8 :: Script > script = v8 :: Script :: Compile ( env -> context ( ) , source , & origin ) ; if ( script . IsEmpty ( ) ) { ReportException ( env , try_catch ) ; exit ( 3 ) ; } Local < Value > result = script . ToLocalChecked ( ) -> Run ( ) ; if ( result . IsEmpty ( ) ) { ReportException ( env , try_catch ) ; exit ( 4 ) ; } return scope . Escape ( result ) ; }
Executes a str within the current v8 context.
Executes a str within the current v8 context .
// try_catch must be nonverbose to disable FatalException() handler, // we will handle exceptions ourself.