diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-07-09 14:03:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-09 14:03:06 -0400 |
commit | 52c0764e4fd56928fca0b201c9d402b25d3f2145 (patch) | |
tree | 5362dc12cbaa5ba84c16ea01297de982009121c7 /core/libdeno/exceptions.cc | |
parent | d641782c823317a2d2f64d646a0d5b8b6c22b771 (diff) |
Upgrade v8 to 7.7.200 (#2624)
Diffstat (limited to 'core/libdeno/exceptions.cc')
-rw-r--r-- | core/libdeno/exceptions.cc | 9 |
1 files changed, 6 insertions, 3 deletions
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<v8::Object> EncodeMessageAsObject(v8::Local<v8::Context> 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()) { |