summaryrefslogtreecommitdiff
path: root/ext/web/lib.rs
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2024-07-03 05:27:01 +0900
committerGitHub <noreply@github.com>2024-07-02 22:27:01 +0200
commitd379c0b299411a847765e2879f8ed14bdb2d0298 (patch)
tree6df49376e4f74f39a9455da029507c70661de90e /ext/web/lib.rs
parentf78a60e882dbcbf43c8abd710733e5fa73e9ed4d (diff)
fix(ext/web): use primordials of ES2024 ArrayBuffer transfer (#24396)
Ref: https://github.com/denoland/deno_core/issues/135
Diffstat (limited to 'ext/web/lib.rs')
-rw-r--r--ext/web/lib.rs14
1 files changed, 0 insertions, 14 deletions
diff --git a/ext/web/lib.rs b/ext/web/lib.rs
index 554bad1de..89f1197e7 100644
--- a/ext/web/lib.rs
+++ b/ext/web/lib.rs
@@ -87,7 +87,6 @@ deno_core::extension!(deno_web,
compression::op_compression_finish,
op_now<P>,
op_defer,
- op_transfer_arraybuffer,
stream_resource::op_readable_stream_resource_allocate,
stream_resource::op_readable_stream_resource_allocate_sized,
stream_resource::op_readable_stream_resource_get_sink,
@@ -424,19 +423,6 @@ fn op_encoding_encode_into_fast(
out_buf[1] = boundary as u32;
}
-#[op2]
-fn op_transfer_arraybuffer<'a>(
- scope: &mut v8::HandleScope<'a>,
- ab: &v8::ArrayBuffer,
-) -> Result<v8::Local<'a, v8::ArrayBuffer>, AnyError> {
- if !ab.is_detachable() {
- return Err(type_error("ArrayBuffer is not detachable"));
- }
- let bs = ab.get_backing_store();
- ab.detach(None);
- Ok(v8::ArrayBuffer::with_backing_store(scope, &bs))
-}
-
pub fn get_declaration() -> PathBuf {
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lib.deno_web.d.ts")
}