remove unimportant todos

This commit is contained in:
Karl Seguin
2025-08-06 15:23:27 +08:00
parent 3554634c1c
commit 332e264437
2 changed files with 3 additions and 7 deletions

View File

@@ -477,9 +477,6 @@ const PendingScript = struct {
// will fail. This assertion exists to catch incorrect assumptions about
// how libcurl works, or about how we've configured it.
std.debug.assert(self.script.source.remote.capacity == 0);
// @newhttp TODO: pre size based on content-length
// @newhttp TODO: max-length enfocement
self.script.source = .{ .remote = self.manager.buffer_pool.get() };
}
@@ -491,7 +488,6 @@ const PendingScript = struct {
// .len = data.len,
// });
// @newhttp TODO: max-length enforcement ??
try self.script.source.remote.appendSlice(self.manager.allocator, data);
}
@@ -704,8 +700,6 @@ const BufferPool = struct {
}
fn release(self: *BufferPool, buffer: ArrayListUnmanaged(u8)) void {
// @newhttp TODO: discard buffers that are larger than some configured max?
// create mutable copy
var b = buffer;

View File

@@ -537,6 +537,7 @@ pub const Page = struct {
.timestamp = timestamp(),
});
}
fn _documentIsComplete(self: *Page) !void {
try HTMLDocument.documentIsComplete(self.window.document, self);
@@ -641,7 +642,8 @@ pub const Page = struct {
while (try walker.get_next(root, next)) |n| {
next = n;
const node = next.?;
const tag = (try parser.nodeHTMLGetTagType(node)) orelse continue;
const e = parser.nodeToElement(node);
const tag = try parser.elementTag(e);
if (tag != .script) {
// ignore non-js script.
continue;