mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 01:25:53 -04:00
Merge pull request #2385 from lightpanda-io/avoid_script_error_double_free
On error, don't free headers
This commit is contained in:
@@ -233,7 +233,6 @@ pub fn addFromElement(self: *ScriptManager, comptime from_parser: bool, script_e
|
||||
defer self.base.is_evaluating = was_evaluating;
|
||||
|
||||
const headers = try self.getHeaders();
|
||||
errdefer headers.deinit();
|
||||
|
||||
if (is_blocking) {
|
||||
const response = try self.base.client.syncRequest(arena, .{
|
||||
|
||||
@@ -181,7 +181,7 @@ fn getThis(self: *const Function) js.Object {
|
||||
}
|
||||
|
||||
pub fn src(self: *const Function) ![]const u8 {
|
||||
return self.local.valueToString(.{ .local = self.local, .handle = @ptrCast(self.handle) }, .{});
|
||||
return js.Value.toStringSlice(.{ .local = self.local, .handle = @ptrCast(self.handle) });
|
||||
}
|
||||
|
||||
pub fn getPropertyValue(self: *const Function, name: []const u8) !?js.Value {
|
||||
|
||||
Reference in New Issue
Block a user