summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-09-01 15:54:40 +0530
committerGitHub <noreply@github.com>2022-09-01 15:54:40 +0530
commite267ec6ed5002a3e300e948d2bcb883d260ac89b (patch)
treeedd7575ad5930ee1a224fc5c95f468d8cffb17a5 /core
parent805ce6fdf70f09e9b3f73b48d42e475a4189a904 (diff)
chore(serde_v8): take mutable reference in `ToV8::to_v8` (#15707)
Diffstat (limited to 'core')
-rw-r--r--core/ops.rs2
-rw-r--r--core/runtime.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/ops.rs b/core/ops.rs
index a96681eb5..d22a703bd 100644
--- a/core/ops.rs
+++ b/core/ops.rs
@@ -99,7 +99,7 @@ pub enum OpResult {
impl OpResult {
pub fn to_v8<'a>(
- &self,
+ &mut self,
scope: &mut v8::HandleScope<'a>,
) -> Result<v8::Local<'a, v8::Value>, serde_v8::Error> {
match self {
diff --git a/core/runtime.rs b/core/runtime.rs
index 366e834a2..47777099c 100644
--- a/core/runtime.rs
+++ b/core/runtime.rs
@@ -1944,7 +1944,7 @@ impl JsRuntime {
// and then each tuple is used to resolve or reject promises
let mut args = vec![];
- for (promise_id, resp) in results.into_iter() {
+ for (promise_id, mut resp) in results.into_iter() {
args.push(v8::Integer::new(scope, promise_id).into());
args.push(resp.to_v8(scope).unwrap());
}