FS-10789: [mod_v8] v8 segs on invalid instruction

This commit is contained in:
Andrey Volk committed 2017-12-05 13:56:40 +03:00
1 parent 2dc4d712fe
commit db3e6ec32f
4 files changed
+17 -3

No files matched your search

+6 -1
View File
@@ -665,7 +665,12 @@ static int v8_parse_and_execute(switch_core_session_t *session, const char *inpu
// Compile the source code.
#if defined(V8_MAJOR_VERSION) && V8_MAJOR_VERSION >=5
v8::ScriptCompiler::CompileOptions options = v8::ScriptCompiler::kNoCompileOptions;
Handle<v8::Script> v8_script = v8::ScriptCompiler::Compile(context, &source, options).ToLocalChecked();
Handle<v8::Script> v8_script;
v8::MaybeLocal<v8::Script> v8_script_check = v8::ScriptCompiler::Compile(context, &source, options);
if (!v8_script_check.IsEmpty()) {
v8_script = v8_script_check.ToLocalChecked();
}
//Handle<v8::Script> v8_script = v8::ScriptCompiler::Compile(context, source,/* String::NewFromUtf8(isolate, script_file),*/ v8::ScriptCompiler::kProduceCodeCache).ToLocalChecked();
//source->GetCachedData();
#else