diff options
| author | Matt Mastracci <matthew@mastracci.com> | 2023-09-13 16:01:31 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-13 22:01:31 +0000 |
| commit | 81d50e1b6685a12a4f43693e695073a97f79264b (patch) | |
| tree | 9a9be134f1f37b11c8521bd1ff7a07d330b6f1a5 /ext | |
| parent | 12a75e3b4328dd36a63799262b2e252f9fb9d58e (diff) | |
chore: bump deno_core and cargo update (#20480)
Bump deno_core, pulling in new rusty_v8. Requires some op2/deprecation
fixes.
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/fs/ops.rs | 12 | ||||
| -rw-r--r-- | ext/http/slab.rs | 4 | ||||
| -rw-r--r-- | ext/net/ops.rs | 4 | ||||
| -rw-r--r-- | ext/node/ops/zlib/mod.rs | 4 | ||||
| -rw-r--r-- | ext/websocket/lib.rs | 4 |
5 files changed, 21 insertions, 7 deletions
diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs index c98b214c2..15711e227 100644 --- a/ext/fs/ops.rs +++ b/ext/fs/ops.rs @@ -1156,7 +1156,9 @@ where let res = fut.or_cancel(cancel_handle).await; if let Some(cancel_rid) = cancel_rid { - state.borrow_mut().resource_table.close(cancel_rid).ok(); + if let Ok(res) = state.borrow_mut().resource_table.take_any(cancel_rid) { + res.close(); + } }; res?.context_path("writefile", &path)?; @@ -1213,7 +1215,9 @@ where let res = fut.or_cancel(cancel_handle).await; if let Some(cancel_rid) = cancel_rid { - state.borrow_mut().resource_table.close(cancel_rid).ok(); + if let Ok(res) = state.borrow_mut().resource_table.take_any(cancel_rid) { + res.close(); + } }; res?.context_path("readfile", &path)? @@ -1269,7 +1273,9 @@ where let res = fut.or_cancel(cancel_handle).await; if let Some(cancel_rid) = cancel_rid { - state.borrow_mut().resource_table.close(cancel_rid).ok(); + if let Ok(res) = state.borrow_mut().resource_table.take_any(cancel_rid) { + res.close(); + } }; res?.context_path("readfile", &path)? diff --git a/ext/http/slab.rs b/ext/http/slab.rs index 4718aded1..7c48b87b6 100644 --- a/ext/http/slab.rs +++ b/ext/http/slab.rs @@ -46,7 +46,9 @@ impl HttpRequestBodyAutocloser { impl Drop for HttpRequestBodyAutocloser { fn drop(&mut self) { - _ = self.1.borrow_mut().resource_table.close(self.0); + if let Ok(res) = self.1.borrow_mut().resource_table.take_any(self.0) { + res.close(); + } } } diff --git a/ext/net/ops.rs b/ext/net/ops.rs index b7459a347..942afc55f 100644 --- a/ext/net/ops.rs +++ b/ext/net/ops.rs @@ -621,7 +621,9 @@ where let lookup_rv = lookup_fut.or_cancel(cancel_handle).await; if let Some(cancel_rid) = cancel_rid { - state.borrow_mut().resource_table.close(cancel_rid).ok(); + if let Ok(res) = state.borrow_mut().resource_table.take_any(cancel_rid) { + res.close(); + } }; lookup_rv? diff --git a/ext/node/ops/zlib/mod.rs b/ext/node/ops/zlib/mod.rs index 2ddf6f2cd..105666b06 100644 --- a/ext/node/ops/zlib/mod.rs +++ b/ext/node/ops/zlib/mod.rs @@ -408,7 +408,9 @@ pub fn op_zlib_close_if_pending( }; if pending_close { drop(resource); - state.resource_table.close(handle)?; + if let Ok(res) = state.resource_table.take_any(handle) { + res.close(); + } } Ok(()) diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs index 4b05131d9..479cae7ec 100644 --- a/ext/websocket/lib.rs +++ b/ext/websocket/lib.rs @@ -288,7 +288,9 @@ where }; if let Some(cancel_rid) = cancel_handle { - state.borrow_mut().resource_table.close(cancel_rid).ok(); + if let Ok(res) = state.borrow_mut().resource_table.take_any(cancel_rid) { + res.close(); + } } let mut state = state.borrow_mut(); |
