From 8d82ba729937baf83011354242cabc3d50c13dc2 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Sun, 26 Jun 2022 00:13:24 +0200 Subject: build: require safety comments on unsafe code (#13870) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk Co-authored-by: Divy Srivastava --- core/modules.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'core/modules.rs') diff --git a/core/modules.rs b/core/modules.rs index e86fdbf73..aec8c498f 100644 --- a/core/modules.rs +++ b/core/modules.rs @@ -122,6 +122,7 @@ fn json_module_evaluation_steps<'a>( context: v8::Local<'a, v8::Context>, module: v8::Local, ) -> Option> { + // SAFETY: `CallbackScope` can be safely constructed from `Local` let scope = &mut unsafe { v8::CallbackScope::new(context) }; let tc_scope = &mut v8::TryCatch::new(scope); let module_map = tc_scope -- cgit v1.2.3