From f49d9556015a7d4c04e9db3f0c85d4399f6125ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 1 Dec 2020 23:33:44 +0100 Subject: fix(compile): disable source mapping of errors (#8581) This commit disables source mapping of errors for standalone binaries. Since applying source maps relies on using file fetcher infrastructure it's not feasible to use it for standalone binaries that are not supposed to use that infrastructure. --- core/lib.rs | 1 + core/runtime.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/lib.rs b/core/lib.rs index 732c5d745..372cd558e 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -60,6 +60,7 @@ pub use crate::resources2::Resource; pub use crate::resources2::ResourceId; pub use crate::resources2::ResourceTable2; pub use crate::runtime::GetErrorClassFn; +pub use crate::runtime::JsErrorCreateFn; pub use crate::runtime::JsRuntime; pub use crate::runtime::RuntimeOptions; pub use crate::runtime::Snapshot; diff --git a/core/runtime.rs b/core/runtime.rs index c079783f3..5044072b6 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -53,7 +53,7 @@ pub enum Snapshot { Boxed(Box<[u8]>), } -type JsErrorCreateFn = dyn Fn(JsError) -> AnyError; +pub type JsErrorCreateFn = dyn Fn(JsError) -> AnyError; pub type GetErrorClassFn = &'static dyn for<'e> Fn(&'e AnyError) -> &'static str; -- cgit v1.2.3