1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-30 16:40:57 -05:00

fix(ops): use qualified borrow in op macro (#15769)

Fix https://github.com/denoland/deno/issues/15764

Use RefCell::borrow instead of state.borrow to avoid clash with std::borrow::Borrow
This commit is contained in:
sigmaSd 2022-09-05 02:59:36 +01:00 committed by Yoshiya Hinosawa
parent f98cc1cad4
commit 52cccbf83d
No known key found for this signature in database
GPG key ID: 0E8BFAA8A5B4E92B

View file

@ -476,7 +476,8 @@ fn codegen_v8_sync(
let result = Self::call::<#type_params>(#args_head #args_tail); let result = Self::call::<#type_params>(#args_head #args_tail);
let op_state = &*ctx.state.borrow(); // use RefCell::borrow instead of state.borrow to avoid clash with std::borrow::Borrow
let op_state = ::std::cell::RefCell::borrow(&*ctx.state);
op_state.tracker.track_sync(ctx.id); op_state.tracker.track_sync(ctx.id);
#ret #ret