Commit f9ddf2d2 authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

[gdbjit] Fix GetFilename when script name is undefined

This is probably a latent bug, but since we didn't have a test that used
'--gdbjit', our fuzzers weren't testing this code path.

Bug: chromium:1240714
Change-Id: I6225e17b60d3a7a73a9c5502fde315207b8e721a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101265Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76368}
parent 00bb1a77
......@@ -957,7 +957,7 @@ class CodeDescription {
#endif
std::unique_ptr<char[]> GetFilename() {
if (!shared_info_.is_null()) {
if (!shared_info_.is_null() && script().name().IsString()) {
return String::cast(script().name()).ToCString();
} else {
std::unique_ptr<char[]> result(new char[1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment