From e021070a2a564b2e972851360265f2466f7e4b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 May 2023 21:37:29 +0200 Subject: refactor(core): make sure to always set embedder wrapper offset (#19048) --- core/runtime.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'core') diff --git a/core/runtime.rs b/core/runtime.rs index bd79ca6cc..3c2e6f3e1 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -396,12 +396,11 @@ impl JsRuntime { let mut params = options .create_params .take() - .unwrap_or_else(|| { - v8::CreateParams::default().embedder_wrapper_type_info_offsets( - V8_WRAPPER_TYPE_INDEX, - V8_WRAPPER_OBJECT_INDEX, - ) - }) + .unwrap_or_default() + .embedder_wrapper_type_info_offsets( + V8_WRAPPER_TYPE_INDEX, + V8_WRAPPER_OBJECT_INDEX, + ) .external_references(&**refs); if let Some(snapshot) = options.startup_snapshot { -- cgit v1.2.3