-
Notifications
You must be signed in to change notification settings - Fork 0
feat(core): gate protocol dispatch on current context origin #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
seonghobae
merged 262 commits into
feat/browser-protocol-capability-requirement
from
feat/browser-context-origin-protocol-dispatch
Aug 26, 2026
+9,814
−69
Merged
Changes from all commits
Commits
Show all changes
262 commits
Select commit
Hold shift + click to select a range
3d00eb5
style(core): apply canonical epoch dispatch formatting
seonghobae 4a7f46f
test(core): require typed browser operation capability binding
seonghobae c6d370e
style(core): format typed browser operation contract
seonghobae 7a6f0e2
feat(core): derive adapter capability from typed browser operation
seonghobae 4c4868f
style(core): format typed operation dispatch boundary
seonghobae 9acbac7
docs(changelog): record typed browser operation binding
seonghobae b41dd5c
merge: align origin-gated protocol dispatch with current revalidation
seonghobae 87dea37
merge: align observed-epoch protocol dispatch with current origin gate
seonghobae 751ae00
merge: align typed browser operation capabilities with current epoch …
seonghobae 94ceeda
merge: preserve browser lifetime authority in origin dispatch
seonghobae 65f5193
merge: preserve browser lifetime authority in observed-epoch dispatch
seonghobae 68fed65
merge: preserve browser lifetime authority in typed operation binding
seonghobae 9935292
test: define buyer-visible browser operation vocabulary
seonghobae 06635ab
feat(core): bind buyer-visible browser operation vocabulary
seonghobae d1d5c73
test(core): require bounded BiDi accessibility query
seonghobae 341ccdc
style(core): apply canonical BiDi query test formatting
seonghobae ad3b5a2
feat(core): bound WebDriver BiDi accessibility query
seonghobae 750348a
feat(core): export bounded BiDi accessibility query
seonghobae 7fc113d
style(core): apply canonical BiDi query exports
seonghobae fd66444
test(core): require minimal BiDi node serialization
seonghobae 75356e0
feat(core): minimize BiDi node serialization surface
seonghobae 8a18184
feat(core): export minimal BiDi serialization limits
seonghobae b649787
test(bidi): reject over-budget locateNodes results
seonghobae 7faa2c6
fix(bidi): revalidate locateNodes result budget
seonghobae d99181b
docs(changelog): record BiDi result budget revalidation
seonghobae b45c40b
test(bidi): require bounded remote node references
seonghobae 64d7630
feat(core): admit bounded BiDi remote node references
cursoragent 601628b
test(core): reject control-bearing BiDi locator text
cursoragent 496f556
feat(core): reject control-bearing BiDi locator text
cursoragent 9f38940
test(bidi): bind locateNodes results to current authority
cursoragent ce0af01
test(bidi): fix locateNodes admission test syntax
cursoragent 5ee16f1
feat(core): bind locateNodes results to current authority
cursoragent 2533394
test(bidi): require QueryNodes capability before node admission
cursoragent 4186437
feat(core): admit locateNodes only after QueryNodes proof
cursoragent 87e1e71
docs: record QueryNodes SemanticObservation admission boundary
cursoragent 685d517
test(core): reject Unicode format locator and identifier text
cursoragent 816fa1f
feat(core): reject Unicode format protocol text
cursoragent ef4a3b7
docs: cite UTS 39 and UAX 9 for format-character rejection
cursoragent c0e3d8e
test(core): require SemanticObservation proof to bind locateNodes
cursoragent d6a7998
feat(core): consume SemanticObservation proof in bind_current_nodes
cursoragent d83fec0
style(core): rustfmt locateNodes proof-admission tests
cursoragent 2cd4ad5
test(core): forbid public raw node minting
seonghobae 35cc131
fix(core): encapsulate raw browser node minting
seonghobae a7e7bd7
fix(core): expose guarded browser authority registry
seonghobae 7b6ecbc
test(core): route public node tests through semantic admission
seonghobae 00f6268
test(core): route origin binding node discovery through admission
seonghobae 530e440
style(core): apply canonical rustfmt to browser authority tests
seonghobae 761d4be
test(core): permit fixture expect calls in admission regression
seonghobae 04560b8
test(core): require atomic locateNodes batch admission
seonghobae b972931
test(core): apply canonical rustfmt to atomic admission regression
seonghobae 8916235
test(core): reach atomic locateNodes admission boundary
seonghobae deee9e0
fix(core): make locateNodes authority binding atomic
seonghobae c18bd19
test(core): exercise atomic browser binding coverage path
seonghobae cca7e56
style(core): apply canonical rustfmt to atomic binding tests
seonghobae eec935e
test(core): reject CDP proof at BiDi node admission
seonghobae dcb77be
test(core): apply canonical BiDi protocol-kind regression formatting
seonghobae 1671042
test(core): cover protocol-confusion error contract
seonghobae 65e849c
fix(core): bind BiDi node admission to protocol family
seonghobae ec6293e
fix(core): apply canonical protocol-kind gate formatting
seonghobae 0bd1878
test(core): define locateNodes command serialization contract
seonghobae 09de2a1
style(core): apply canonical locateNodes test formatting
seonghobae 542d180
feat(core): serialize bounded locateNodes command envelopes
seonghobae 75d0ef1
feat(core): export bounded locateNodes command contract
seonghobae 82bdd73
style(core): apply canonical locateNodes command formatting
seonghobae 1844676
docs(changelog): record BiDi locateNodes serialization
seonghobae d28836a
docs(doctoring): ground BiDi command serialization
seonghobae 15f5988
test(core): require BiDi locateNodes response correlation
seonghobae 39a73bb
test(core): format BiDi response correlation RED
seonghobae 5abc70f
feat(core): correlate BiDi locateNodes response ids
seonghobae 3118635
docs(changelog): record BiDi response correlation
seonghobae 547d9c9
docs(doctoring): ground BiDi response correlation
seonghobae 2ba56af
test(core): require BiDi response envelope semantics
seonghobae 4bf783e
style(core): canonicalize BiDi envelope regression
seonghobae 45ed6b0
feat(core): retain WebDriver BiDi response envelope kind
seonghobae b088f23
feat(core): export BiDi response envelope contract
seonghobae 640289b
style(core): canonicalize BiDi envelope exports
seonghobae 67e57de
docs(changelog): record BiDi response envelope correlation
seonghobae 4690320
test(core): require fail-closed BiDi success evidence conversion
seonghobae c6fac94
feat(core): reject BiDi error envelopes from success evidence
seonghobae 13a8a1a
style(core): apply canonical BiDi error formatting
seonghobae d251ca5
test(core): bind locateNodes result budget to correlated response
seonghobae c11f46b
style(core): apply canonical rustfmt to result-budget regression
seonghobae 429b02b
fix(core): bind locateNodes result budget to correlated success
seonghobae 9a53a5c
test(core): require correlated locateNodes result admission
seonghobae 86a18c5
style(core): apply canonical locateNodes result test formatting
seonghobae e9a47b6
feat(core): admit correlated locateNodes result batches
seonghobae fe8bbf2
feat(core): export correlated locateNodes result admission
seonghobae 2c535b8
test(core): require correlated result authority binding
seonghobae 3488eea
style(core): apply canonical correlated result test formatting
seonghobae 44ddc32
test(core): isolate correlated result authority RED
seonghobae 61508eb
feat(core): bind correlated context identifiers fail-closed
seonghobae 8ce29ea
feat(core): expose crate-private context identity check
seonghobae cfee13a
feat(core): bind correlated locateNodes results to current authority
seonghobae 31faaac
test(core): cover missing origin binding rejection
seonghobae 67d0a3b
test(core): require bounded BiDi response documents
seonghobae 192b6f2
test(core): format BiDi response document RED
seonghobae 810c762
feat(core): bound raw BiDi response documents
seonghobae f4cf87b
feat(core): export BiDi response document boundary
seonghobae afe81c4
docs: record bounded BiDi response documents
seonghobae b2c458c
test(core): require bounded BiDi response envelope parsing
seonghobae 89bd3db
style(core): apply canonical BiDi parser test formatting
seonghobae 77eb49b
feat(core): parse bounded BiDi response envelopes
seonghobae 9f924d2
feat(core): expose BiDi response envelope parser
seonghobae addb63f
style(core): apply canonical response parser formatting
seonghobae eb086b0
test(core): exercise hostile BiDi response JSON grammar
seonghobae 5c8df76
fix(core): satisfy strict BiDi parser clippy
seonghobae e455fe8
test(core): cover response parser failure edges
seonghobae 9447879
fix(core): remove unreachable parser error edges
seonghobae d45118b
test(core): respect bounded response admission boundary
seonghobae 1b157ef
test(core): avoid panic-prone admission assertion
seonghobae 67f5ca3
fix(core): remove unreachable parser coverage branches
seonghobae e65df25
test(core): require parsed BiDi response correlation
seonghobae e9d90df
test(core): apply canonical BiDi correlation formatting
seonghobae 5481255
feat(core): correlate bounded BiDi response documents
seonghobae 35a9f42
docs(changelog): record bounded BiDi document correlation
seonghobae e0b502a
test(core): reject unknown WebDriver BiDi error codes
seonghobae ebc127c
test(core): format WebDriver BiDi error-code RED
seonghobae 99b4f5d
fix(core): define WebDriver BiDi error-code vocabulary
seonghobae 9b85be5
fix(core): wire WebDriver BiDi error-code validator
seonghobae e815964
fix(core): reject unknown WebDriver BiDi error codes
seonghobae 5b829fe
style(core): apply canonical rustfmt ordering
seonghobae f5e087d
test(core): cover current BiDi client-window error
seonghobae 4077a79
fix(core): admit current BiDi client-window error
seonghobae b7e5ba5
test(core): keep BiDi failure regression panic-free
seonghobae 9d39c59
docs(doctoring): record current BiDi error-code contract
seonghobae 0e8414c
test(core): require wire-derived locateNodes result admission
seonghobae 3ad1c5f
style(core): apply canonical wire-result test formatting
seonghobae ee545e6
feat(core): admit locateNodes nodes from bounded wire response
seonghobae 2f12879
style(core): apply canonical response document formatting
seonghobae c8d6d9a
style(core): apply canonical wire node parser formatting
seonghobae e7b81bc
test(core): cover locateNodes document failure boundaries
seonghobae 16591ab
test(core): keep failure-evidence regressions clippy-clean
seonghobae 858bcf4
test(core): cover locateNodes second-pass parser invariants
seonghobae da7ffe9
test(core): avoid node debug equality requirement
seonghobae 1b0f6ad
style(core): apply canonical wire-result formatting
seonghobae cbbc4d6
test(core): cover second-pass parser failure propagation
seonghobae 755ba06
fix(core): keep second-pass string decoding utf8-safe
seonghobae 70d85f9
test(core): cover wire node admission tuple
seonghobae 4089a72
test(core): cover skipped wire result shapes
seonghobae 14a4a39
test(core): cover wire node admission metadata
seonghobae a2fe264
test(core): prioritize locateNodes result budget
seonghobae 3083e4e
fix(core): enforce locateNodes budget before node decoding
seonghobae 6c3b0bd
fix(core): bind wire parsing to exact result budget
seonghobae 850dbf1
test(core): cover bounded overflow parser invariant
seonghobae e373a73
test(core): close bounded overflow coverage invariant
seonghobae dfc522f
test(core): require bounded BiDi byte admission
seonghobae 42c0443
feat(core): admit bounded BiDi response bytes
seonghobae c80ffdb
test(core): require typed BiDi error-code evidence
seonghobae f331b32
style(core): canonicalize error-code RED
seonghobae e9f4dcc
fix(core): retain typed BiDi error-code evidence
seonghobae 358c6e2
test(core): prove every typed BiDi error mapping
seonghobae 6740339
fix(core): restore canonical Rust formatting
seonghobae a451054
test(core): require wire-to-authority node binding
seonghobae bcc719f
test(core): format wire authority regression
seonghobae fda7ea8
feat(core): bind wire locateNodes results to current authority
seonghobae d53e310
merge: align origin-gated dispatch with current origin revalidation
seonghobae b63e4c4
merge: align observed-epoch dispatch with current origin-gated dispatch
seonghobae 1ae0c2b
merge: align semantic observation admission with current observed-epo…
seonghobae c6c1172
merge: align BiDi command serialization with current semantic admission
seonghobae c4c9fce
merge: align BiDi response correlation with current command serializa…
seonghobae b0c29ac
test(core): cover BiDi bind admission failure
seonghobae 257d9a2
test(core): require typed BiDi protocol errors
seonghobae ef4f554
style(core): apply canonical rustfmt to BiDi RED
seonghobae 5441594
fix(core): preserve correlated BiDi protocol errors
seonghobae cdf0d8f
style(core): apply canonical rustfmt to BiDi error preservation
seonghobae d883f9a
test(core): align BiDi wire error regression with typed protocol pres…
seonghobae 910c519
style(core): apply canonical rustfmt to BiDi wire regression
seonghobae 291bbac
fix(core): remove unreachable BiDi success-conversion edge
seonghobae a11b838
test(core): cover nullable BiDi error admission
seonghobae 2687529
test(core): require bounded BiDi WebSocket endpoint admission
seonghobae a1c4cb5
style(core): canonicalize BiDi WebSocket endpoint RED
seonghobae dbdff70
style(core): apply canonical rustfmt to endpoint RED
seonghobae 3d2c408
feat(core): admit bounded BiDi WebSocket endpoints
seonghobae e0ec37e
style(core): apply canonical endpoint rustfmt
seonghobae bebb1e1
test(core): cover malformed BiDi endpoint authorities
seonghobae 8054128
fix(core): remove unreachable IPv4 endpoint branch
seonghobae 42bfbed
test(core): cover empty BiDi endpoint authority
seonghobae bc042ee
test(core): format BiDi WebSocket endpoint regressions
seonghobae 5d7906a
test(core): require exact BiDi endpoint session correlation
seonghobae 96fdd9d
style(core): apply canonical BiDi session-correlation formatting
seonghobae c4d2e4d
feat(core): correlate BiDi endpoint with exact session
seonghobae 45935f5
feat(core): export correlated BiDi endpoint contract
seonghobae 70461f1
style(core): apply canonical session-correlation formatting
seonghobae 4047cef
docs(changelog): record BiDi session correlation
seonghobae 48ad304
test(core): require explicit BiDi connect target
seonghobae 3cc6711
test(core): format explicit BiDi connect target regressions
seonghobae 2e9898d
feat(core): derive explicit BiDi loopback connect targets
seonghobae aace3a8
feat(core): export explicit BiDi connect target contract
seonghobae 2e43ad6
style(core): format explicit BiDi connect target
seonghobae 6a21bed
test(core): require BiDi connect target changelog evidence
seonghobae 7e30360
docs(core): record explicit BiDi connect target boundary
seonghobae dc5cfd8
test(core): preserve BiDi endpoint across resolver handoff
seonghobae 3a9506c
fix(core): retain correlated BiDi endpoint on resolver handoff
seonghobae d34c528
test(core): require exact BiDi socket peer verification
seonghobae d7cf226
feat(core): verify exact BiDi socket peer
seonghobae 89fc9c3
feat(core): export verified BiDi peer contract
seonghobae f62d204
test(core): require BiDi socket-peer release evidence
seonghobae d52cdfe
docs(changelog): record BiDi socket-peer verification
seonghobae fa510a0
fix(changelog): preserve direct TCP release wording
seonghobae fcde975
test(network): require bounded BiDi loopback TCP connection
seonghobae aef0ac7
test(network): format BiDi TCP RED contract
seonghobae 1de304b
feat(network): connect exact BiDi loopback transport
seonghobae ccb7d31
feat(network): export bounded BiDi TCP transport
seonghobae b4ce10d
refactor(network): isolate BiDi transport errors
seonghobae 8ed075c
test(network): isolate BiDi transport resilience coverage
seonghobae ec66b21
refactor(network): keep BiDi transport boundary focused
seonghobae 755d626
test(network): apply canonical BiDi resilience formatting
seonghobae fd91248
fix(network): remove unused BiDi error imports
seonghobae 975e2e2
docs(changelog): record bounded BiDi TCP transport
seonghobae c491464
test(network): require consumable BiDi TCP evidence
seonghobae 6aab73c
feat(network): hand off verified BiDi TCP evidence
seonghobae 18703be
docs(changelog): record BiDi TCP evidence handoff
seonghobae 11a533d
test(network): require bounded BiDi WebSocket opening request
seonghobae 9803303
feat(network): bind BiDi WebSocket opening request
seonghobae 8b8f664
test(network): cover BiDi handshake diagnostics
seonghobae 73f2fbd
test(network): close BiDi handshake branch coverage
seonghobae d39d0d3
test(network): retain BiDi WebSocket client key
seonghobae ccfc641
fix(network): retain BiDi WebSocket client key
seonghobae 2495b5a
test(core): cover ChromeDriver session id compatibility
seonghobae baf917c
fix(core): accept canonical ChromeDriver session ids
seonghobae ba38e2c
merge: carry ChromeDriver session compatibility into correlation
seonghobae d8f45f8
merge: carry ChromeDriver session compatibility into connect targets
seonghobae 036412a
merge: carry ChromeDriver session compatibility into socket peer veri…
seonghobae e441948
merge: carry ChromeDriver session compatibility into BiDi TCP transport
seonghobae b036e47
merge: carry ChromeDriver session compatibility into BiDi handshake r…
seonghobae 30da73a
test(network): redact WebSocket client nonce debug
seonghobae 6922dd9
fix(network): redact WebSocket client nonce debug
seonghobae e1ad7f4
Merge pull request #193 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 1db9faa
Merge pull request #191 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 37e5688
Merge pull request #189 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 09736e2
Merge pull request #190 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 0b0a9e0
Merge pull request #188 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 7a08c38
Merge pull request #185 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 225eb45
Merge pull request #192 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 82f9be4
docs: record correlated BiDi result admission
seonghobae 788ae6d
Merge pull request #182 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae fd8aec7
Merge pull request #184 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 2d7d25f
fix(core): require BiDi response classification
seonghobae 05a5234
Merge pull request #181 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 889659e
docs(core): avoid private correlation links
seonghobae 749cb24
Merge pull request #183 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae 987322a
Merge pull request #127 from ContextualWisdomLab/test/browser-context…
seonghobae c9915c1
docs: record origin-gated protocol dispatch
seonghobae 5fc9981
Merge remote-tracking branch 'origin/feat/browser-protocol-validation…
seonghobae c9702cd
docs: record epoch-gated protocol dispatch
seonghobae 51d4182
Merge pull request #186 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae bdb7bcb
Merge remote-tracking branch 'origin/feat/browser-context-origin-prot…
seonghobae 7663f78
Merge pull request #174 from ContextualWisdomLab/cursor/bc-76ee265e-c…
seonghobae 433c67a
Merge remote-tracking branch 'origin/feat/browser-protocol-capability…
seonghobae 7f48288
chore: retrigger exact-head checks
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
163 changes: 163 additions & 0 deletions
163
crates/originweave-core/src/browser_authority_registry.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,163 @@ | ||
| use crate::browser_registry::BrowserAuthorityRegistry as RawBrowserAuthorityRegistry; | ||
| use crate::{ | ||
| BrowserRegistryError, BrowserSessionId, BrowsingContextId, DocumentEpoch, ObservedNodeHandle, | ||
| Origin, | ||
| }; | ||
|
|
||
| /// Public browser-authority registry with raw node minting kept inside the crate. | ||
| /// | ||
| /// Browser-session, browsing-context, document-epoch, and canonical-origin lifecycle operations are | ||
| /// public because trusted adapters need them to maintain current authority. Converting untrusted | ||
| /// browser-protocol node identifiers into [`ObservedNodeHandle`] values is deliberately | ||
| /// crate-private: external callers must use a reviewed semantic-observation admission boundary such | ||
| /// as [`crate::WebDriverBiDiAccessibilityQuery::bind_current_nodes`], which consumes the required | ||
| /// protocol-use proof, validates the complete batch, and revalidates the exact current document | ||
| /// before atomically minting handles. | ||
| pub struct BrowserAuthorityRegistry { | ||
| inner: RawBrowserAuthorityRegistry, | ||
| } | ||
|
|
||
| impl BrowserAuthorityRegistry { | ||
| /// Create an empty registry with the reviewed default per-namespace identifier capacity. | ||
| #[must_use] | ||
| pub fn new() -> Self { | ||
| Self { | ||
| inner: RawBrowserAuthorityRegistry::new(), | ||
| } | ||
| } | ||
|
|
||
| /// Create an empty registry with a caller-selected per-namespace identifier capacity. | ||
| /// | ||
| /// Session, browsing-context, and node identifiers retain independent monotonic namespaces. | ||
| /// The node namespace is still reachable only through crate-owned semantic admission. | ||
| #[must_use] | ||
| pub fn with_identifier_limit(maximum_identifier: u64) -> Self { | ||
| Self { | ||
| inner: RawBrowserAuthorityRegistry::with_identifier_limit(maximum_identifier), | ||
| } | ||
| } | ||
|
|
||
| /// Register one opaque external browser-session identifier. | ||
| pub fn register_session( | ||
| &mut self, | ||
| external_identifier: &str, | ||
| ) -> Result<BrowserSessionId, BrowserRegistryError> { | ||
| self.inner.register_session(external_identifier) | ||
| } | ||
|
|
||
| /// Register one opaque external browsing-context identifier inside a known browser session. | ||
| pub fn register_context( | ||
| &mut self, | ||
| browser_session: BrowserSessionId, | ||
| external_identifier: &str, | ||
| ) -> Result<BrowsingContextId, BrowserRegistryError> { | ||
| self.inner | ||
| .register_context(browser_session, external_identifier) | ||
| } | ||
|
|
||
| /// Retire one browsing context and all registry-local authority derived from it. | ||
| pub fn remove_context( | ||
| &mut self, | ||
| browsing_context: BrowsingContextId, | ||
| ) -> Result<(), BrowserRegistryError> { | ||
| self.inner.remove_context(browsing_context) | ||
| } | ||
|
|
||
| /// Retire one browser session and every registered context and node binding beneath it. | ||
| pub fn remove_session( | ||
| &mut self, | ||
| browser_session: BrowserSessionId, | ||
| ) -> Result<(), BrowserRegistryError> { | ||
| self.inner.remove_session(browser_session) | ||
| } | ||
|
|
||
| /// Return the currently active document epoch for a known browsing context. | ||
| pub fn current_epoch( | ||
| &self, | ||
| browsing_context: BrowsingContextId, | ||
| ) -> Result<DocumentEpoch, BrowserRegistryError> { | ||
| self.inner.current_epoch(browsing_context) | ||
| } | ||
|
|
||
| /// Return the current document epoch only when the supplied session owns the context. | ||
| pub fn current_context_epoch( | ||
| &self, | ||
| browser_session: BrowserSessionId, | ||
| browsing_context: BrowsingContextId, | ||
| ) -> Result<DocumentEpoch, BrowserRegistryError> { | ||
| self.inner | ||
| .current_context_epoch(browser_session, browsing_context) | ||
| } | ||
|
|
||
| /// Require an opaque external browsing-context identifier to name this exact context. | ||
| pub(crate) fn require_context_external_identifier( | ||
| &self, | ||
| browser_session: BrowserSessionId, | ||
| browsing_context: BrowsingContextId, | ||
| external_identifier: &str, | ||
| ) -> Result<(), BrowserRegistryError> { | ||
| self.inner.require_context_external_identifier( | ||
| browser_session, | ||
| browsing_context, | ||
| external_identifier, | ||
| ) | ||
| } | ||
|
|
||
| /// Bind the canonical origin observed for the exact current browser document. | ||
| pub fn bind_context_origin( | ||
| &mut self, | ||
| browser_session: BrowserSessionId, | ||
| browsing_context: BrowsingContextId, | ||
| origin: &Origin, | ||
| ) -> Result<DocumentEpoch, BrowserRegistryError> { | ||
| self.inner | ||
| .bind_context_origin(browser_session, browsing_context, origin) | ||
| } | ||
|
|
||
| /// Revalidate the canonical origin bound to the exact current browser document. | ||
| pub fn require_context_origin( | ||
| &self, | ||
| browser_session: BrowserSessionId, | ||
| browsing_context: BrowsingContextId, | ||
| origin: &Origin, | ||
| ) -> Result<DocumentEpoch, BrowserRegistryError> { | ||
| self.inner | ||
| .require_context_origin(browser_session, browsing_context, origin) | ||
| } | ||
|
|
||
| /// Advance a browsing context to the next document epoch and invalidate old node bindings. | ||
| pub fn advance_document( | ||
| &mut self, | ||
| browsing_context: BrowsingContextId, | ||
| ) -> Result<DocumentEpoch, BrowserRegistryError> { | ||
| self.inner.advance_document(browsing_context) | ||
| } | ||
|
|
||
| /// Bind one admitted batch of adapter-local node identifiers to current browser authority. | ||
| /// | ||
| /// This operation is intentionally crate-private. The raw registry commits the batch only when | ||
| /// every identifier can be bound; a later failure rolls back node identifiers and any origin | ||
| /// binding created by the batch before the error is returned. Production callers outside this | ||
| /// crate therefore cannot bypass semantic admission or observe partial authority from a failed | ||
| /// `locateNodes` result. | ||
| pub(crate) fn bind_nodes( | ||
| &mut self, | ||
| browser_session: BrowserSessionId, | ||
| browsing_context: BrowsingContextId, | ||
| origin: &Origin, | ||
| external_identifiers: &[&str], | ||
| ) -> Result<Vec<ObservedNodeHandle>, BrowserRegistryError> { | ||
| self.inner.bind_nodes( | ||
| browser_session, | ||
| browsing_context, | ||
| origin, | ||
| external_identifiers, | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| impl Default for BrowserAuthorityRegistry { | ||
| fn default() -> Self { | ||
| Self::new() | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.