From 52c0764e4fd56928fca0b201c9d402b25d3f2145 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 9 Jul 2019 14:03:06 -0400 Subject: Upgrade v8 to 7.7.200 (#2624) --- core/libdeno/exceptions.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'core/libdeno/exceptions.cc') diff --git a/core/libdeno/exceptions.cc b/core/libdeno/exceptions.cc index 8f5779acd..7484e4eb4 100644 --- a/core/libdeno/exceptions.cc +++ b/core/libdeno/exceptions.cc @@ -90,9 +90,12 @@ v8::Local EncodeMessageAsObject(v8::Local context, auto column = v8::Integer::New(isolate, frame->GetColumn()); CHECK(frame_obj->Set(context, v8_str("line"), line).FromJust()); CHECK(frame_obj->Set(context, v8_str("column"), column).FromJust()); - CHECK(frame_obj - ->Set(context, v8_str("functionName"), frame->GetFunctionName()) - .FromJust()); + + auto function_name = frame->GetFunctionName(); + if (!function_name.IsEmpty()) { + CHECK(frame_obj->Set(context, v8_str("functionName"), function_name) + .FromJust()); + } // scriptName can be empty in special conditions e.g. eval auto scriptName = frame->GetScriptNameOrSourceURL(); if (scriptName.IsEmpty()) { -- cgit v1.2.3