Repository navigation
fix(permissions): give PermissionStatus inherited EventTarget behavior - #1587
Conversation
d7d1b79 to
fe62d1d
Compare
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 Common ancestor Session resilience
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
HEAD memory by 50-navigation quarter
Raw reports and per-navigation boundary samples: workflow run and full Public-site timing and memory are observational. Use the A/B deltas and trend shape as evidence, not as a deterministic performance threshold. |
Spider Bench A/B✅ All benchmark browser service runs completed; results are informational. Public HEAD: 184 / 240 rows; 38 / 48 sites produced rows; 10 unexpected empty sites. ✅ Deterministic fixture contract is clean. Common ancestor Public 48-site run · informational
Public-site content, timing, and memory are noisy. This single A/B run reports evidence only; site outcome counts explain missing rows without treating them as a deterministic regression. CPU and memory timelinesThese are bounded 40-point views of the same complete process-tree samples used by the HTML report. CPU uses 100% per occupied logical core; memory lines are RSS first and PSS second when complete PSS samples are available. Basexychart-beta
title "Base CPU"
x-axis "Elapsed seconds" [1.538, 3.039, 4.54, 5.543, 6.043, 8.046, 9.548, 11.05, 12.552, 14.056, 15.558, 17.059, 18.561, 19.062, 20.064, 22.065, 23.567, 25.069, 26.57, 28.071, 29.573, 31.075, 32.575, 33.076, 34.077, 36.081, 37.584, 39.087, 40.588, 42.09, 43.593, 45.095, 46.597, 48.099, 50.101, 51.601, 53.104, 54.605]
y-axis "CPU percent" 0 --> 500
line [119.77, 131.95, 139.91, 197.53, 157.78, 111.67, 191.73, 59.84, 87.9, 149.65, 131.83, 37.96, 3.99, 0, 0, 154.04, 0, 4, 2, 21.97, 91.91, 139.83, 101.98, 107.92, 133.81, 169.64, 53.93, 141.73, 144.08, 87.84, 105.85, 7.99, 142.02, 95.81, 2, 125.94, 23.96, 110.02]
xychart-beta
title "Base memory: RSS then PSS"
x-axis "Elapsed seconds" [0.036, 1.538, 3.039, 4.54, 5.543, 6.043, 8.046, 9.548, 11.05, 12.552, 14.056, 15.558, 17.059, 18.561, 19.062, 20.064, 22.065, 23.567, 25.069, 26.57, 28.071, 29.573, 31.075, 32.575, 33.076, 34.077, 36.081, 37.584, 39.087, 40.588, 42.09, 43.593, 45.095, 46.597, 48.099, 50.101, 51.601, 53.104, 54.605, 55.679]
y-axis "Memory MiB" 0 --> 500
line [12.38, 116.51, 147.62, 148.59, 164.67, 197.5, 163, 173.65, 159.65, 174.16, 173.61, 161.86, 162.8, 146.99, 147.33, 147.4, 167.81, 144.19, 146.37, 144.87, 146.25, 181.92, 162.82, 236.79, 295.42, 206.95, 223.92, 163.18, 181.79, 177.73, 157.57, 167.91, 152.75, 184.89, 181.68, 165.55, 196.16, 167.86, 190.32, 0]
line [9.01, 112.59, 143.78, 144.72, 160.84, 195.19, 159.19, 169.69, 156, 170.36, 169.78, 158.01, 158.96, 143.15, 143.49, 143.56, 164.01, 140.35, 142.53, 141.04, 142.42, 178.04, 158.92, 233, 291.9, 203.12, 219.61, 159.29, 178.17, 173.86, 153.8, 164.04, 148.88, 181.43, 177.8, 161.82, 191.5, 164.12, 186.95, 0]
HEADxychart-beta
title "HEAD CPU"
x-axis "Elapsed seconds" [1.537, 2.537, 4.039, 5.041, 6.543, 8.045, 8.545, 9.046, 10.549, 12.051, 13.052, 14.053, 14.555, 15.556, 17.056, 18.558, 19.56, 21.062, 22.063, 23.565, 24.065, 25.066, 26.067, 27.57, 28.571, 30.073, 31.577, 32.577, 34.077, 35.579, 36.581, 38.082, 39.082, 40.584, 42.086, 43.088, 44.59, 45.592]
y-axis "CPU percent" 0 --> 200
line [141.86, 137.94, 133.94, 153.64, 179.82, 91.87, 183.82, 179.73, 93.76, 147.74, 128.01, 3.99, 11.96, 127.88, 151.84, 71.87, 43.96, 85.88, 125.67, 103.91, 107.99, 133.85, 149.64, 159.81, 73.85, 125.85, 165.6, 108.01, 134.06, 85.88, 135.64, 112.05, 11.99, 79.89, 127.98, 21.94, 111.83, 155.67]
xychart-beta
title "HEAD memory: RSS then PSS"
x-axis "Elapsed seconds" [0.035, 1.537, 2.537, 4.039, 5.041, 6.543, 8.045, 8.545, 9.046, 10.549, 12.051, 13.052, 14.053, 14.555, 15.556, 17.056, 18.558, 19.56, 21.062, 22.063, 23.565, 24.065, 25.066, 26.067, 27.57, 28.571, 30.073, 31.577, 32.577, 34.077, 35.579, 36.581, 38.082, 39.082, 40.584, 42.086, 43.088, 44.59, 45.592, 46.836]
y-axis "Memory MiB" 0 --> 500
line [12.41, 116.77, 135.36, 152.38, 160.73, 168.86, 183.68, 188.13, 182.41, 199.16, 191.29, 171.75, 150.82, 152.76, 156.98, 164.11, 157.06, 171.19, 150.29, 159.63, 217.6, 284.83, 218.69, 205.26, 235.12, 163.42, 203.94, 169.73, 158.84, 166.81, 160.27, 220.04, 191.25, 177.27, 168.38, 188.03, 153.58, 189.4, 209.81, 0]
line [9.08, 113.15, 131.73, 148.75, 157.16, 165.11, 180.1, 184.53, 178.65, 195.56, 187.7, 168.2, 147.17, 149.11, 153.32, 160.54, 153.34, 168.15, 146.68, 155.95, 214, 281.68, 215.02, 201.51, 231.54, 159.65, 200.31, 166.17, 155.37, 163.27, 158.83, 216.44, 187.73, 173.66, 164.84, 184.82, 149.99, 185.84, 206.15, 0]
Deterministic fixture · required contractThe fixture exercises 15 routes: 8 are expected to emit rows and 7 intentionally exercise empty, loading, or timeout behavior.
Full HTML, JSON, CSV, logs, and page snapshots: workflow run and full The public-web A/B is informational. The exact HEAD fixture contract runs as a separate required CI check; timing and public-site content deltas remain non-blocking. |
CI Regression ReportSource CI run · source state at render:
Release regression — ✅ HEAD/base failures 0/0; raw binary 0.00%Package and image size
Startup latency and PSS
Concurrency matrix
Frontend differential — ✅ 1,020/1,020 cases matched; 0 issues
Agent episodes · Moli vs Chromium — ✅ 8/8 Moli episodes passed; 0 failures
Runtime and CDP session contracts — ✅ 26 contract cases; 0 failures
CDP smoke — ✅ 52/52 groups passed; 621 scenariosWorkers: 4 · cumulative group time: 191.75 s · failed groups: 0
WebMainBench · 545 pages — ✅ 545/545 completed; 0 unexpected failures
Frozen HTML · Linux · Diagnostics: All artifact fields are parsed by the trusted default-branch renderer; missing or invalid inputs remain visible as unavailable. |
lanyue-llk
left a comment
There was a problem hiding this comment.
复核提交 93e77456a23b,未发现本次改动新增的明确阻断问题。
PermissionStatus 继承 EventTarget 有规范依据。只改原型链不够,共享事件实现还需要对象自己的监听器状态;本次补上现有 initializer,正好覆盖这两部分。该 initializer 读取对象自身的私有状态,不会把原型上的监听器列表共享给实例。测试同时检查了继承、不同对象隔离、removeEventListener 和 once,符合本次修复范围。
未要求为这个修复增加系统权限服务或新的事件实现。以上为源码和规范核对;本机缺少原生开发工具,未运行该提交的 V8 测试。
Problem
PermissionStatus objects exposed a state value but lacked the EventTarget prototype chain and listener methods expected by page scripts. Calling
addEventListeneron a returned status could therefore fail before the page rendered.Change
Declare PermissionStatus as an EventTarget and construct it through the existing interface machinery. Reuse the shared listener implementation, retaining independent listener state for each returned object.
This repairs object/event behavior. It adds no permission prompt, operating-system grant or background permission service.
Reproduce and verify
Query permission status objects, register a change listener through the inherited API, and dispatch a change event. The listener must run once on its own object, with a valid EventTarget prototype chain and no cross-object listener leakage.
cargo nextest run --locked -p moli-renderer-v8 --lib -E 'test(permission_status_supports_inherited_event_target_listeners)' --no-fail-fastFormatting, workspace/all-target/all-feature Clippy with
-D warnings, and both PermissionStatus behavior tests pass on the current base. The CI compile failure exposed a removed initializer: this PR now uses the existing shared EventTarget initializer, preserving object-owned listener state. CI validates the complete branch. The integrated source before extraction also passed 20,140 workspace tests with 17 original skips.Regression fixtures:
permission_status_supports_inherited_event_target_listenersDependencies
Independent change targeting
main; no other open PR is required. Extracted from #1501. Review map and sibling PRs.