electron/patches/node/fix_expose_internalcallbackscope.patch
Electron Bot cfae97a64c chore: bump node to v12.14.1 (master) (#21703)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2020-01-09 10:42:53 -08:00

20 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Sat, 6 Jan 2018 18:28:10 +0530
Subject: fix: expose InternalCallbackScope
This commit exposes InternalCallbackScope in order to allow us access to kAllowEmptyResource for usage https://github.com/electron/electron/blob/master/atom/common/api/atom_bindings.cc\#L108. We should look to accomplish this another way so we no longer need to do this, as in verbose mode the regular CallBack Scope doesn't swallow errors and so we can otherwise use it.
diff --git a/src/node_internals.h b/src/node_internals.h
index 0fff2e6111e53f99ca8e92d6966d9847570d01bd..e8d6705e0197aad55b931910bb5221dd33b37fb0 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -203,7 +203,7 @@ v8::MaybeLocal<v8::Value> InternalMakeCallback(
v8::Local<v8::Value> argv[],
async_context asyncContext);
-class InternalCallbackScope {
+class NODE_EXTERN InternalCallbackScope {
public:
// Tell the constructor whether its `object` parameter may be empty or not.
enum ResourceExpectation { kRequireResource, kAllowEmptyResource };