fix/revert debug code

This commit is contained in:
Karl Seguin
2025-05-27 20:18:14 +08:00
parent 7d9951aa3c
commit 676e6ecec1
2 changed files with 13 additions and 13 deletions

View File

@@ -31,16 +31,16 @@ test "Browser.fetch" {
.{ "ok", "true" }, .{ "ok", "true" },
}, .{}); }, .{});
// try runner.testCases(&.{ try runner.testCases(&.{
// .{ .{
// \\ var ok2 = false; \\ var ok2 = false;
// \\ const request2 = new Request("http://127.0.0.1:9582/loader"); \\ const request2 = new Request("http://127.0.0.1:9582/loader");
// \\ (async function () { resp = await fetch(request2); ok2 = resp.ok; }()); \\ (async function () { resp = await fetch(request2); ok2 = resp.ok; }());
// \\ false; \\ false;
// , ,
// "false", "false",
// }, },
// // all events have been resolved. // all events have been resolved.
// .{ "ok2", "true" }, .{ "ok2", "true" },
// }, .{}); }, .{});
} }

View File

@@ -231,7 +231,7 @@ fn areCookiesEqual(a: *const Cookie, b: *const Cookie) bool {
fn areSameSite(origin_uri_: ?*const std.Uri, target_host: []const u8) !bool { fn areSameSite(origin_uri_: ?*const std.Uri, target_host: []const u8) !bool {
const origin_uri = origin_uri_ orelse return true; const origin_uri = origin_uri_ orelse return true;
const origin_host = (origin_uri.host orelse return error.InvalidURI333).percent_encoded; const origin_host = (origin_uri.host orelse return error.InvalidURI).percent_encoded;
// common case // common case
if (std.mem.eql(u8, target_host, origin_host)) { if (std.mem.eql(u8, target_host, origin_host)) {