Commit Graph
8648 Commits
Author SHA1 Message Date
Karl Seguin b53fa18c3d webapi: Give iterator to types with an indexed property
Apparently, any type that ah indexed property also gets an iterator, even if
the iterator isn't explicitly listed in the spec. This showed up as a bug
rendering washingtonpost.com.
2026-08-14 16:43:33 +08:00
Karl Seguin 18afa56eb6 Merge pull request #3194 from lightpanda-io/test-log-silence
chore: silence test log
2026-08-14 16:29:57 +08:00
Pierre Tachoire 6f7afeb09e Merge pull request #3193 from lightpanda-io/linux-dev-fast-default-on
dev: On linux -dev_fast is on by default
2026-08-14 10:24:43 +02:00
Karl Seguin eb25f6cc1c chore: silence test log 2026-08-14 10:50:13 +08:00
Karl Seguin 8caaf7ad96 dev: On linux -dev_fast is on by default
Assuming the conditions are met for -dev_fast to work (linux, debug, x86-64
without sanitizers), the -dev_fast now defaults to true.

download-v8 make target always downloads the .a (as before) and on linux x86-64
it also downloads the .so.
2026-08-14 10:43:34 +08:00
Karl Seguin fb7123cf75 Merge pull request #3185 from lightpanda-io/console
webapi: improve console conformance
2026-08-14 06:42:36 +08:00
Karl Seguin 84769e555f Merge pull request #3188 from lightpanda-io/wpt-mem-limit
chore: bump WPT --max-mem from 100 to 200
2026-08-14 06:42:23 +08:00
muki 563ccaf4d1 Merge pull request #3158 from lightpanda-io/singleflight
Single Flight
2026-08-13 13:21:04 -07:00
Pierre Tachoire 92e3cfcbe9 fix errdefer path on singleflight 2026-08-13 17:55:48 +02:00
Muki Kiboigo a356840c63 remove from pending on waiting append error in SingleFlight 2026-08-13 08:25:18 -07:00
Muki Kiboigo fb5a9b6a35 get rid of allocator stored in RobotsGate 2026-08-13 08:20:15 -07:00
Muki Kiboigo 21856170e3 single lookup for SingleFlight pending 2026-08-13 08:20:14 -07:00
Karl Seguin aa0909aef1 chore: bump WPT --max-mem from 100 to 200
Some WPT tests just take more memory, e.g. shadow-dom/declarative/gethtml.html.

Also left some placeholder comments for profiling JS (which I used to make sure
this was just v8 memory usage). These placeholders used to exist but didn't
survive the session multi-page refactor (figured I'd fix it next time I needed
it, and now I needed it).
2026-08-13 21:06:31 +08:00
Pierre Tachoire 84daa37e22 Merge pull request #3186 from lightpanda-io/readme-wpt-link
chore: link to our daily wpt results
2026-08-13 15:02:42 +02:00
Karl Seguin bc805ec18a Merge pull request #3178 from lightpanda-io/prebuild-shared-v8
dev: support for pre-build shared library
2026-08-13 20:06:19 +08:00
Karl Seguin ff339f0342 chore: link to our daily wpt results 2026-08-13 20:04:35 +08:00
Karl Seguin c95135b5c2 update v8 dep 2026-08-13 19:31:37 +08:00
Karl Seguin af99e845df dev: support for pre-build shared library
Supports prebuild-v8 shared library and adds a `download-v8-shared` make target.
Depends on: https://github.com/lightpanda-io/zig-v8-fork/pull/198

The auto-discovery of the .so is done in the build.zig, which is different than
the auto-discovery of the .a which is done in the Makefile. This is intentional
and if we inverse -Ddev_fast so that it's on by default, the .a's auto discovery
will be moved to build.zig for consistency and explicitness. As-is, we have no
way to tell whether -Dprebuilt_v8_path=v8.a is being injected by Makefile or
is explicit (which isn't a problem so long as we're not doing dev_fast by
default).
2026-08-13 19:28:21 +08:00
Karl Seguin dbb4bab0a0 webapi: improve console conformance
Saw a non-fatal error on cnn.com related to console. All members are supposed
to be static. Ran it through WPT /console/ and improved a few different thigns:

- added dir and dirxml
- assert condition is optional
2026-08-13 19:25:45 +08:00
Pierre Tachoire a894331b1d Merge pull request #3170 from guyua9/fix/advertise-host-wildcard
cdp: fall back to loopback when /json/version bind host is a wildcard
2026-08-13 11:43:50 +02:00
Pierre Tachoire 9f18af9225 Merge pull request #3183 from lightpanda-io/split-cdp-conns-from-threads
cdp: split active_conns from active_threads
2026-08-13 11:43:34 +02:00
Muki Kiboigo d1d02e1114 dupe into owned arena for SingleFlight initial 2026-08-13 01:37:21 -07:00
Muki Kiboigo 4ed60ffc90 use reference to http client in SingleFlight tests 2026-08-13 01:37:19 -07:00
Pierre Tachoire b340071d03 config: only flag wildcard bind when no --advertise-host is set 2026-08-13 09:54:28 +02:00
Muki Kiboigo d3a1dd77f2 use test_browser http client in SingleFlight tests 2026-08-13 00:30:30 -07:00
Muki Kiboigo bb8b46145f get rid of SingleFlight abort 2026-08-13 00:26:14 -07:00
Muki Kiboigo f7e6464370 SingleFlight should own the key 2026-08-13 00:25:33 -07:00
Pierre Tachoire 1f4a060765 add a func to detect wildcard host 2026-08-13 09:21:42 +02:00
Karl Seguin fec340f079 Merge pull request #3184 from staylor/fix/mutation-termination-teardown
stability: clear V8 terminating state after a terminated microtask checkpoint
2026-08-13 14:51:32 +08:00
Karl Seguin 9c1998076c stability: cancel a termination only at a safe point
Cancel termination only when all context have a call_depth == 0. This ensures
that termination "sticks" all the way up a nested call. Without this, a nested
call could clear a terminate which targeted something up the stack.
2026-08-13 14:07:32 +08:00
Muki Kiboigo cc5537dd63 discard if failure after single_flight enter 2026-08-12 18:32:46 -07:00
Muki Kiboigo 00d5be5c5b deallocate queued with same singleflight allocator 2026-08-12 18:17:42 -07:00
Muki Kiboigo 82e9496409 use SingleFlight in RobotsGate 2026-08-12 18:04:04 -07:00
Muki Kiboigo 7593eb5af7 add SingleFlight component 2026-08-12 18:04:02 -07:00
Karl Seguin b7868c455b Merge pull request #3181 from lightpanda-io/getHTML
webapi: Element/ShadowRoot getHTML
2026-08-13 06:40:45 +08:00
Karl Seguin 85608c1051 Merge pull request #3180 from lightpanda-io/shadowdom-relocation
webapi: Track node relocation across shadow roots
2026-08-13 06:40:02 +08:00
Scott Taylor d0c145b0c9 Clear V8 terminating state after a terminated microtask checkpoint
A JS entry (JSEntry) clears V8's terminating state when the termination
exception unwinds past it, which is what tryCall and friends rely on.
A microtask checkpoint does not: when a requested termination (watchdog,
CDP-disconnect kill) lands inside a checkpoint-delivered callback such
as MutationObserver delivery, PerformCheckpoint returns with
IsExecutionTerminating still set and nothing ever clears it. Every
later V8 call in that isolate then runs against a terminating isolate
and can return empty where callers don't expect it, ending in SIGSEGV
during connection teardown.

Cancel the V8-level termination after a checkpoint in which a terminate
landed, keeping the sticky terminate_requested so the existing entry
gates keep refusing new JS, and skip the remaining context queues.

Production-observed sequence this covers (SIGSEGV/139 tails):
  watchdog stall -> MutObserver.deliverRecords err=ExecutionTerminated
  -> frame.deliverMutations -> closing connection (pending terminate)
  -> SIGSEGV

Assisted-By: devx/95b8cb7f-8baf-4a28-93bf-61bc21612890
2026-08-12 12:49:42 -04:00
Pierre Tachoire cca6a0d389 rename error.MaxThreadsReached into error.MaxConnectionsReached 2026-08-12 17:43:01 +02:00
Pierre Tachoire 192c3deb0f typo fix 2026-08-12 17:41:31 +02:00
Pierre Tachoire 530c3aef8a cdp: split active_conns from active_threads
Split active_conns and active_threads to free a CDP conn slot as soon as
possible.
It gives a room where we have more active threads than allowed CDP
connections while threads shudown.
2026-08-12 16:19:49 +02:00
Karl Seguin e443922788 webapi: Element/ShadowRoot getHTML
Adds the getHTML methods to Element and ShadowRoot. This is expected to add
another ~6K passing WPT tests (significantly improving out score in the
/shadow-dom/ category). It's also probably also a useful API to implement.
2026-08-12 17:23:20 +08:00
Karl Seguin 59be69b1f8 webapi: Track node relocation across shadow roots
All add/remove node operations come down to Frame.removeNode and
Frame._insertNodeRelative. But not all remove/insert are the same, e.g. removing
a disconnect node is different than removing a connected node. Also, a "move"
operation is a remove+insert, but some move operations appear more atomic than
others. There is both a correctness and an optimization side to these
differences.

Previously, removeNode took a will_be_reconnected: bool option and insert took
a child_already_connected: bool. Essentially, remove wants to know the
post-removal intention, and insert wants to know the pre-insert state.

The simple booleans work for simple cases, but fail for ShadowDOM: it isn't
enough to know if `will_be_reconnected`...we need to know in what root it'll
be reconnected. Both remove and insert become tristate:

1 - is staying in the same root
2 - is staying connected, but in a different root
3 - is becoming connected for the first time

This commits changes `will_be_reconnected: bool` to `reconnect_to: ?*Node` and
`child_already_connected: bool` to `previous_root: ?*Node`. So most callsites
had to be updated - which is why so many files were touched. But the bulk of
the change is in those two Frame method which must now handle the tristate.
2026-08-12 16:03:26 +08:00
Karl Seguin 23bba947da Merge pull request #3169 from lightpanda-io/eventtarget-bare-tag
mem: Swith EventTarget's _type to a bare tag
2026-08-12 09:48:16 +08:00
Karl Seguin a7d94c18b3 Merge pull request #3175 from staylor/fix/playwright-redirect-chain
Fix Playwright redirect routing chains
2026-08-12 09:22:10 +08:00
Karl Seguin bbf2493695 zig fmt 2026-08-12 08:01:17 +08:00
Karl Seguin 0f6ea46b2e mem: Swith EventTarget's _type to a bare tag
Same change as https://github.com/lightpanda-io/browser/pull/3128 but for
EventTarget. This shrinks all EventTargets (i.e. most WebAPI interfaces) by 8
bytes.
2026-08-12 08:01:12 +08:00
Karl Seguin efc7613768 Merge pull request #3172 from lightpanda-io/js_mem_gauge
metrics: Add js memory gauge
2026-08-12 07:46:21 +08:00
Scott Taylor ba01f0a963 cdp: scope redirect response to redirect events
Assisted-By: devx/c10f9997-2afd-4688-a7fa-f3839c4cc22e
2026-08-11 14:24:57 -04:00
Scott Taylor ff975b106f cdp: report redirect chains before interception
Assisted-By: devx/c10f9997-2afd-4688-a7fa-f3839c4cc22e
2026-08-11 14:15:09 -04:00
Karl Seguin 99bfc2fdeb Merge pull request #3167 from lightpanda-io/self-hosted
dev: add -Ddev_fast flag
2026-08-11 20:47:43 +08:00