diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-12-15 16:26:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-15 15:26:10 +0000 |
| commit | 585ec1218f8cdc191f2e733beb2e6c7a230ac85c (patch) | |
| tree | 8a0e5d88f2390890121a6083a39c833af21ea5d1 /ops/optimizer_tests/op_blob_revoke_object_url.out | |
| parent | 0d4e4af7acf82c1365999a7281910daa05f0e982 (diff) | |
Revert "feat(ops): Fast zero copy string arguments (#16777)" (#17063)
This reverts commit 9b2b8df927ac23cfa99016a684179f2a3198ba2e.
Closes https://github.com/dsherret/ts-morph/issues/1372
Closes https://github.com/denoland/deno/issues/16979
Diffstat (limited to 'ops/optimizer_tests/op_blob_revoke_object_url.out')
| -rw-r--r-- | ops/optimizer_tests/op_blob_revoke_object_url.out | 62 |
1 files changed, 2 insertions, 60 deletions
diff --git a/ops/optimizer_tests/op_blob_revoke_object_url.out b/ops/optimizer_tests/op_blob_revoke_object_url.out index 28fe17acb..72bc75e05 100644 --- a/ops/optimizer_tests/op_blob_revoke_object_url.out +++ b/ops/optimizer_tests/op_blob_revoke_object_url.out @@ -18,11 +18,7 @@ impl op_blob_revoke_object_url { name: Self::name(), v8_fn_ptr: Self::v8_fn_ptr(), enabled: true, - fast_fn: Some( - Box::new(op_blob_revoke_object_url_fast { - _phantom: ::std::marker::PhantomData, - }), - ), + fast_fn: None, is_async: false, is_unstable: false, is_v8: false, @@ -31,7 +27,7 @@ impl op_blob_revoke_object_url { } #[inline] #[allow(clippy::too_many_arguments)] - pub fn call(state: &mut OpState, url: String) -> Result<(), AnyError> { + pub fn call(state: &mut deno_core::OpState, url: String) -> Result<(), AnyError> { let url = Url::parse(&url)?; let blob_store = state.borrow::<BlobStore>(); blob_store.remove_object_url(&url); @@ -46,18 +42,6 @@ impl op_blob_revoke_object_url { &*(deno_core::v8::Local::<deno_core::v8::External>::cast(args.data()).value() as *const deno_core::_ops::OpCtx) }; - { - let op_state = &mut std::cell::RefCell::borrow_mut(&ctx.state); - if let Some(err) = op_state.last_fast_op_error.take() { - let exception = deno_core::error::to_v8_error( - scope, - op_state.get_error_class_fn, - &err, - ); - scope.throw_exception(exception); - return; - } - } let arg_0 = match deno_core::v8::Local::< deno_core::v8::String, >::try_from(args.get(0usize as i32)) { @@ -85,45 +69,3 @@ impl op_blob_revoke_object_url { }; } } -struct op_blob_revoke_object_url_fast { - _phantom: ::std::marker::PhantomData<()>, -} -impl<'scope> deno_core::v8::fast_api::FastFunction for op_blob_revoke_object_url_fast { - fn function(&self) -> *const ::std::ffi::c_void { - op_blob_revoke_object_url_fast_fn as *const ::std::ffi::c_void - } - fn args(&self) -> &'static [deno_core::v8::fast_api::Type] { - use deno_core::v8::fast_api::Type::*; - use deno_core::v8::fast_api::CType; - &[V8Value, SeqOneByteString, CallbackOptions] - } - fn return_type(&self) -> deno_core::v8::fast_api::CType { - deno_core::v8::fast_api::CType::Void - } -} -fn op_blob_revoke_object_url_fast_fn<'scope>( - _: deno_core::v8::Local<deno_core::v8::Object>, - url: *const deno_core::v8::fast_api::FastApiOneByteString, - fast_api_callback_options: *mut deno_core::v8::fast_api::FastApiCallbackOptions, -) -> () { - use deno_core::v8; - use deno_core::_ops; - let __opts: &mut v8::fast_api::FastApiCallbackOptions = unsafe { - &mut *fast_api_callback_options - }; - let __ctx = unsafe { - &*(v8::Local::<v8::External>::cast(unsafe { __opts.data.data }).value() - as *const _ops::OpCtx) - }; - let state = &mut ::std::cell::RefCell::borrow_mut(&__ctx.state); - let url = unsafe { &*url }.as_str().to_owned(); - let result = op_blob_revoke_object_url::call(state, url); - match result { - Ok(result) => result, - Err(err) => { - state.last_fast_op_error.replace(err); - __opts.fallback = true; - Default::default() - } - } -} |
