[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/+/3101265 Reviewed-by: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/main@{#76368}
This commit is contained in:
parent
00bb1a77c0
commit
f9ddf2d2bf
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user