Skip to content

fix(permissions): expose PermissionStatus as EventTarget - #1503

Closed
lanyue-llk wants to merge 1 commit into
mainfrom
codex/permission-status-event-target
Closed

lanyue-llk wants to merge 1 commit into
mainfrom
codex/permission-status-event-target

Conversation

@lanyue-llk

Copy link
Copy Markdown
Contributor

Problem

PermissionStatus exposes onchange, but its generated prototype does not inherit from EventTarget. Instances therefore cannot use the standard addEventListener, removeEventListener, or dispatchEvent APIs.

Result

  • Declare PermissionStatus as an EventTarget subclass.
  • Install a listener store on each returned permission status object.
  • Cover inheritance, instance isolation, listener removal, once, callback targets, and the non-constructible interface.

This PR only supplies the standard event interface. It does not claim that permission state changes are emitted automatically.

Validation

  • cargo fmt --all -- --check
  • Added permission_status_supports_inherited_event_target_listeners

This replaces the independent permissions portion of #1476. Its Web Fetch changes are superseded by #1501.

@github-actions

Copy link
Copy Markdown

Sequential Navigation Soak A/B

✅ HEAD completed the 200-navigation resilience and memory observation.

One browser process, one target, and one CDP session navigate CSDN → SegmentFault → Huaban → example.com repeatedly. This run issued 200 Page.navigate commands per binary.

Common ancestor 1e8f951ef2 → HEAD 62e8bec524; benchmark order: head-first; workflow: success.

Session resilience

Metric Base HEAD
Attempted / planned 200 / 200 200 / 200
Direct observable pass 197 / 200 192 / 200
Failures / recovered 3 / 3 8 / 8
Recovery failures 0 0
Lifecycle order violations 0 0
Network order violations 0 0
Wall time 675.7 s 840.8 s

A public-page failure is reported separately from an unrecoverable session. The soak requires all navigation attempts, zero failed recovery, zero lifecycle/network ordering violations, and complete resource evidence.

Process-tree memory

Metric Base HEAD Δ
Boundary samples 200 200 0
Boundary RSS samples 200 200 0
Boundary PSS samples 200 200 0
Periodic peak RSS 268.8 MiB 297.8 MiB +29.1 MiB
Periodic peak PSS 266.5 MiB 294.3 MiB +27.7 MiB
RSS · first 10 avg 183.9 MiB 174.5 MiB -9.4 MiB
RSS · last 10 avg 194.0 MiB 192.1 MiB -1.9 MiB
RSS · last − first window +10.2 MiB +17.7 MiB +7.5 MiB
RSS · warm slope / 100 nav +5.4 MiB +6.7 MiB +1.2 MiB
PSS · first 10 avg 180.5 MiB 170.9 MiB -9.6 MiB
PSS · last 10 avg 191.6 MiB 188.6 MiB -3.1 MiB
PSS · last − first window +11.1 MiB +17.7 MiB +6.6 MiB
PSS · warm slope / 100 nav +6.3 MiB +6.7 MiB +0.5 MiB
Peak file descriptors 57 58 1
Peak threads 29 29 0

HEAD memory by 50-navigation quarter

HEAD range Avg RSS Final RSS Peak RSS Avg PSS Final PSS Peak FD
1–50 177.1 MiB 158.1 MiB 231.5 MiB 173.4 MiB 154.4 MiB 51
51–100 183.5 MiB 177.9 MiB 235.3 MiB 179.8 MiB 174.4 MiB 55
101–150 187.3 MiB 174.5 MiB 238.1 MiB 183.6 MiB 170.3 MiB 55
151–200 191.5 MiB 186.4 MiB 257.2 MiB 187.8 MiB 183.0 MiB 54

Raw reports and per-navigation boundary samples: workflow run and full sequential-navigation-soak-results artifact.

Public-site timing and memory are observational. Use the A/B deltas and trend shape as evidence, not as a deterministic performance threshold.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Closing this to keep the Web Fetch correction effort scoped to the consolidated renderer fixes in #1501. The PermissionStatus/EventTarget change is a valid independent standards improvement, but it is unrelated to the measured Web Fetch regressions and is not required by the current evidence. It can be reopened or resubmitted when that product behavior is independently prioritized.

@lanyue-llk lanyue-llk closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant