A &mut OpState parameter will cause the OpState to be borrowed exclusively for the entirety of an op call, but this function can call user code during IDL conversions, which can in turn call other ops that also attempt to borrow the OpState. To fix this, the type of the state parameter needs to be changed to Rc<RefCell<OpState>>, and the borrow as short-lived as possible.
denoland/deno#27527 (comment)