diff options
author | Luca Casonato <hello@lcas.dev> | 2022-06-26 00:13:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-26 00:13:24 +0200 |
commit | 8d82ba729937baf83011354242cabc3d50c13dc2 (patch) | |
tree | 3e8c4d87986338639eeef4a76543e4335020262c /core/modules.rs | |
parent | 38505db39137f33bfdb942658ea892a617ac0980 (diff) |
build: require safety comments on unsafe code (#13870)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'core/modules.rs')
-rw-r--r-- | core/modules.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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<v8::Module>, ) -> Option<v8::Local<'a, v8::Value>> { + // SAFETY: `CallbackScope` can be safely constructed from `Local<Context>` let scope = &mut unsafe { v8::CallbackScope::new(context) }; let tc_scope = &mut v8::TryCatch::new(scope); let module_map = tc_scope |