forked from 1b-agent/opencadstudio-upstream
feat(plugin): harden V4 host integration
Preserve legacy wire indices and route concurrent V4 responses and background requests by correlation and stable tab ID.
This commit is contained in:
commit
f247d15f6e
110 files changed
+32159
-1254
No files matched your search
@@ -37,12 +37,17 @@ impl<'a> HostSession<'a> {
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn document_view_v4(&mut self, tab_id: u64) -> Option<ocs_plugin_api::shm::DocumentViewInfo> {
|
||||
if tab_id != self.tab_id() {
|
||||
return None;
|
||||
}
|
||||
v4_support::open_document_view_v4(tab_id, self.document())
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn close_document_view_v4(&mut self, tab_id: u64) {
|
||||
v4_support::close_document_view_v4(tab_id);
|
||||
if tab_id == self.tab_id() {
|
||||
v4_support::close_document_view_v4(tab_id);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn document(&self) -> &CadDocument {
|
||||
|
||||
Reference in new issue
Block a user