chore: update chore_add_context_to_context_aware_module_prevention.patch (#31579) (#31627)

Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
Milan Burda
2021-11-01 21:43:41 +01:00
committed by GitHub
parent 8638e8cea9
commit bb418b6e06

View File

@@ -8,7 +8,7 @@ modules from being used in the renderer process. This should be upstreamed as
a customizable error message.
diff --git a/src/node_binding.cc b/src/node_binding.cc
index ca5a01f925a2ae69ba4295d82316e546f45c60cd..a0f6730de75b9b1dc58e2cec5ed64f9619162a2b 100644
index ca5a01f925a2ae69ba4295d82316e546f45c60cd..7aa9190b383050dd7cdf7ae3f9620105b6a6f473 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -3,6 +3,7 @@
@@ -27,7 +27,7 @@ index ca5a01f925a2ae69ba4295d82316e546f45c60cd..a0f6730de75b9b1dc58e2cec5ed64f96
+ char errmsg[1024];
+ snprintf(errmsg,
+ sizeof(errmsg),
+ "Loading non-context-aware native module in renderer: '%s', but app.allowRendererProcessReuse is true. See https://github.com/electron/electron/issues/18397.",
+ "Loading non-context-aware native module in renderer: '%s'. See https://github.com/electron/electron/issues/18397.",
+ *filename);
+ env->ThrowError(errmsg);
return false;