We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faab449 commit 1d25fcfCopy full SHA for 1d25fcf
src/v8.zig
@@ -1572,10 +1572,12 @@ pub const StackFrame = struct {
1572
return @as(u32, @intCast(c.v8__StackFrame__GetScriptId(self.handle)));
1573
}
1574
1575
- pub fn getScriptName(self: Self) String {
1576
- return .{
1577
- .handle = c.v8__StackFrame__GetScriptName(self.handle).?,
1578
- };
+ pub fn getScriptName(self: Self) ?String {
+ if (c.v8__StackFrame__GetFunctionName(self.handle)) |ptr| {
+ return .{
+ .handle = ptr,
1579
+ };
1580
+ } else return null;
1581
1582
1583
pub fn getScriptNameOrSourceUrl(self: Self) String {
0 commit comments