Skip to content

Commit

Permalink
Fixup async id assertion patch
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jun 18, 2020
1 parent be20e70 commit 1d8e416
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion patches/node/build_add_gn_build_files.patch
Expand Up @@ -1586,7 +1586,7 @@ index 0000000000000000000000000000000000000000..f3c5c798c0aefcb8cf9b1570a7b4817c
+ args = rebase_path(inputs + outputs, root_build_dir)
+}
diff --git a/src/node_version.h b/src/node_version.h
index 49d0f6f8a69b48b79556e36c54daae080a00386b..aa1563e93ee66f1c1a2c6840b3d020dc8f9cef68 100644
index 3d9276b8c92ad49681147b809a276c8157907b5e..2cc9fa91bf20bbde278e5d333ca485c0c159504e 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -89,7 +89,10 @@
Expand Down
Expand Up @@ -10,7 +10,7 @@ THe fix for this should land in node-gyp as discussed in above issue,
landing this as temporary patch.

diff --git a/common.gypi b/common.gypi
index 1e8cac3c5123698d9551835639e87a0afa7a2246..325382613e59ef8796c1e878afed0cf66bc1e0ca 100644
index 344466dd249323768541ae8c6c2800795845eea8..572597ef60c13dfc332c7da49b606867f0561c54 100644
--- a/common.gypi
+++ b/common.gypi
@@ -19,7 +19,7 @@
Expand Down
Expand Up @@ -41,10 +41,10 @@ index e478c57af873da717c00db73d6719f806280efe1..1c949cab49224a6f1be7685acfd3ed19
try {
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
diff --git a/src/env.h b/src/env.h
index deeeb2a385ab75fbfd86af619e1aad118f1a0794..5c0392a59b3938b0b6e433024f9dd92e222a1b47 100644
index c1fda87ecd536f2347f5011414932ec79aebfc60..12ba5b69369e858ee9e743ef06059d6cd5541078 100644
--- a/src/env.h
+++ b/src/env.h
@@ -887,6 +887,15 @@ class Environment : public MemoryRetainer {
@@ -888,6 +888,15 @@ class Environment : public MemoryRetainer {
uint64_t thread_id = kNoThreadId);
~Environment() override;

Expand All @@ -60,7 +60,7 @@ index deeeb2a385ab75fbfd86af619e1aad118f1a0794..5c0392a59b3938b0b6e433024f9dd92e
void InitializeLibuv(bool start_profiler_idle_notifier);
inline const std::vector<std::string>& exec_argv();
inline const std::vector<std::string>& argv();
@@ -1270,6 +1279,9 @@ class Environment : public MemoryRetainer {
@@ -1271,6 +1280,9 @@ class Environment : public MemoryRetainer {
inline void ThrowError(v8::Local<v8::Value> (*fun)(v8::Local<v8::String>),
const char* errmsg);

Expand Down
Expand Up @@ -7,7 +7,7 @@ This is used so that we can modify the flag at runtime where
config can only be set at compile time.

diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index 36d06759aac57b1aa813b52c94e2168b8a8f9087..fd97a471aecc5182dfc3790286a3e01f02117937 100644
index 4e7c3c10255a0eae4d5333f88e51cf7178163a44..a6e33757ca00771671583203c37d9b121abf489b 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -118,7 +118,7 @@ const {
Expand Down
Expand Up @@ -45,10 +45,10 @@ index 60d30b7eff7329c4235024c31525107216d70d7a..21980987644c6e83029157785dea4630
v8::CpuProfiler::UseDetailedSourcePositionsForProfiling(isolate);
}
diff --git a/src/env-inl.h b/src/env-inl.h
index fcb58dc6709d1333fb992e4a0fbf498fbb496994..71d86c4976806508c5b2db1563bfa4f460ff618f 100644
index c6ef9dc13ab6f1d1a778871a62a0a98a01d84ec6..222555831aa1bf0b7b29b4b46e235c98a5dd4ac5 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -1191,12 +1191,6 @@ void Environment::RemoveCleanupHook(void (*fn)(void*), void* arg) {
@@ -1123,12 +1123,6 @@ void Environment::RemoveCleanupHook(void (*fn)(void*), void* arg) {
cleanup_hooks_.erase(search);
}

Expand All @@ -62,7 +62,7 @@ index fcb58dc6709d1333fb992e4a0fbf498fbb496994..71d86c4976806508c5b2db1563bfa4f4
const CleanupHookCallback& cb) const {
return std::hash<void*>()(cb.arg_);
diff --git a/src/env.cc b/src/env.cc
index 3974e6c7ebe74004a7a9e4dc2966fd8651c1522f..da779854f928abda5ee9d08c39ba1b5e5eb798a4 100644
index c56a25f31e42aaf8bcbc0e3bb3db4f7aad0cf124..58f2372d664c4c6f8a513cb4206c24940891aa6d 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -30,7 +30,6 @@ using v8::ArrayBuffer;
Expand All @@ -81,7 +81,7 @@ index 3974e6c7ebe74004a7a9e4dc2966fd8651c1522f..da779854f928abda5ee9d08c39ba1b5e
env->RunAndClearNativeImmediates();
});
uv_unref(reinterpret_cast<uv_handle_t*>(&idle_prepare_handle_));
@@ -1138,25 +1136,6 @@ void Environment::RunWeakRefCleanup() {
@@ -1127,25 +1125,6 @@ void Environment::RunWeakRefCleanup() {
isolate()->ClearKeptObjects();
}

Expand All @@ -108,10 +108,10 @@ index 3974e6c7ebe74004a7a9e4dc2966fd8651c1522f..da779854f928abda5ee9d08c39ba1b5e
void BaseObject::DeleteMe(void* data) {
BaseObject* self = static_cast<BaseObject*>(data);
diff --git a/src/env.h b/src/env.h
index 5c0392a59b3938b0b6e433024f9dd92e222a1b47..7ba18f8ec0e2675cb634e26250266ad809708f82 100644
index 12ba5b69369e858ee9e743ef06059d6cd5541078..b0b9b17dd6684c10139435b85e8724e31ad4d92c 100644
--- a/src/env.h
+++ b/src/env.h
@@ -1129,9 +1129,7 @@ class Environment : public MemoryRetainer {
@@ -1130,9 +1130,7 @@ class Environment : public MemoryRetainer {
void AtExit(void (*cb)(void* arg), void* arg);
void RunAtExitCallbacks();

Expand All @@ -121,7 +121,7 @@ index 5c0392a59b3938b0b6e433024f9dd92e222a1b47..7ba18f8ec0e2675cb634e26250266ad8

// Strings and private symbols are shared across shared contexts
// The getters simply proxy to the per-isolate primitive.
@@ -1354,8 +1352,6 @@ class Environment : public MemoryRetainer {
@@ -1355,8 +1353,6 @@ class Environment : public MemoryRetainer {
uint64_t thread_id_;
std::unordered_set<worker::Worker*> sub_worker_contexts_;

Expand Down
Expand Up @@ -8,7 +8,7 @@ node modules will have different (wrong) ideas about how v8 structs are laid
out in memory on 64-bit machines, and will summarily fail to work.

diff --git a/common.gypi b/common.gypi
index 325382613e59ef8796c1e878afed0cf66bc1e0ca..4f629462828dfe23f3c9e28f70376f892dead76c 100644
index 572597ef60c13dfc332c7da49b606867f0561c54..db8dc7452552beb6a758d1b6175bd402b6a09d24 100644
--- a/common.gypi
+++ b/common.gypi
@@ -71,6 +71,9 @@
Expand Down
Expand Up @@ -24,7 +24,7 @@ Environment on the V8 context of blink, so no new V8 context is created.
As a result, a renderer process may have multiple Node Environments in it.

diff --git a/src/env.cc b/src/env.cc
index 5b8a63a0017c4f9eed50afacb8de0b7f659f81b6..3974e6c7ebe74004a7a9e4dc2966fd8651c1522f 100644
index 657d711e539d81bfd03166bbaaae7f0b5db91a5f..c56a25f31e42aaf8bcbc0e3bb3db4f7aad0cf124 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -410,6 +410,12 @@ Environment::Environment(IsolateData* isolate_data,
Expand All @@ -41,10 +41,10 @@ index 5b8a63a0017c4f9eed50afacb8de0b7f659f81b6..3974e6c7ebe74004a7a9e4dc2966fd86

Environment::~Environment() {
diff --git a/src/node.cc b/src/node.cc
index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce9f20042c 100644
index 4ff7824b0011685289716d61b02427c3e264965d..2a21c6dfe74b97c0d4ca8608486f8f35c77cc831 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -124,6 +124,9 @@ using v8::Undefined;
@@ -122,6 +122,9 @@ using v8::Undefined;
using v8::V8;
using v8::Value;

Expand All @@ -54,7 +54,7 @@ index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce
namespace per_process {

// node_revert.h
@@ -339,6 +342,13 @@ MaybeLocal<Value> Environment::RunBootstrapping() {
@@ -337,6 +340,13 @@ MaybeLocal<Value> Environment::RunBootstrapping() {

CHECK(!has_run_bootstrapping_code());

Expand All @@ -68,7 +68,7 @@ index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce
if (BootstrapInternalLoaders().IsEmpty()) {
return MaybeLocal<Value>();
}
@@ -735,7 +745,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
@@ -733,7 +743,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
binding::RegisterBuiltinModules();

// Make inherited handles noninheritable.
Expand All @@ -79,7 +79,7 @@ index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce

// Cache the original command line to be
// used in diagnostic reports.
@@ -769,6 +781,8 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
@@ -767,6 +779,8 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
if (exit_code != 0) return exit_code;
}
#endif
Expand All @@ -88,7 +88,7 @@ index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce

const int exit_code = ProcessGlobalArgs(argv,
exec_argv,
@@ -813,6 +827,7 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
@@ -811,6 +825,7 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
}
per_process::metadata.versions.InitializeIntlVersions();
#endif
Expand Down
4 changes: 2 additions & 2 deletions patches/node/feat_add_uv_loop_watcher_queue_code.patch
Expand Up @@ -6,10 +6,10 @@ Subject: feat: add uv_loop watcher_queue code
Electron's Node Integration works by listening to Node's backend file descriptor in a separate thread; when an event is ready the backend file descriptor will trigger a new event for it, and the main thread will then iterate the libuv loop. For certain operations (ex. adding a timeout task) the backend file descriptor isn't informed, & as a result the main thread doesn't know it needs to iterate the libuv loop so the timeout task will never execute until something else trigger a new event. This commit should be removed when https://github.com/libuv/libuv/pull/1921 is merged

diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
index a3a770db88b90e3afc8f344c585c8c598ba2c088..b91e31237c5b3e2fb8c0bee8516155d23624a337 100644
index fec663136a4ff14480cc8edcf846cba320ddd4eb..653c8910d7350185d1db4d343e19236a899b3a04 100644
--- a/deps/uv/include/uv.h
+++ b/deps/uv/include/uv.h
@@ -1767,6 +1767,8 @@ union uv_any_req {
@@ -1770,6 +1770,8 @@ union uv_any_req {
struct uv_loop_s {
/* User data - use this for whatever. */
void* data;
Expand Down
Expand Up @@ -8,7 +8,7 @@ common.gypi is a file that's included in the node header bundle, despite
the fact that we do not build node with gyp.

diff --git a/common.gypi b/common.gypi
index 7b97fbebe2deac534b3a24c807074c02b4336cf4..1e8cac3c5123698d9551835639e87a0afa7a2246 100644
index 3b9cc3e885b254c80b2ff2ba1585972ce51a1e70..344466dd249323768541ae8c6c2800795845eea8 100644
--- a/common.gypi
+++ b/common.gypi
@@ -73,6 +73,22 @@
Expand Down
Expand Up @@ -9,7 +9,7 @@ with what's exposed through BoringSSL. I plan to upstream parts of this or
otherwise introduce shims to reduce friction.

diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index ce48e608c07ca3d9dd717f92566c71c2a77cbcbc..a144d570d21cadccbb02349dc2f4ef44f6e7d79a 100644
index cd763fd3755357b36e753cf778550cf2d498ed57..dad343e15d0f76bdef9d9cc4e78c7e20b1b58bb0 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -5142,6 +5142,7 @@ bool DiffieHellman::Init(int primeLength, int g) {
Expand Down
2 changes: 1 addition & 1 deletion patches/node/fix_expose_internalcallbackscope.patch
Expand Up @@ -6,7 +6,7 @@ Subject: fix: expose InternalCallbackScope
This commit exposes InternalCallbackScope in order to allow us access to its internal flags.

diff --git a/src/node_internals.h b/src/node_internals.h
index 7ec3eac697e4b7d6160da59df709f416814e1f73..c362485dca561ed4a5210d7ac9f0e3b2a36a8d0c 100644
index c1555b312e2f22e191d91d34a348d2e163d85b5b..084ecfa73657d1958d7552baa896e170934639c8 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -209,7 +209,7 @@ v8::MaybeLocal<v8::Value> InternalMakeCallback(
Expand Down
Expand Up @@ -6,7 +6,7 @@ Subject: fix: key gen APIs are not available in BoringSSL
This will make Node's key pair generation APIs fail.

diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 9e3c63b5ec92459a98c0f64f57b79d8732a9a25d..39f2c58657fb7315b9abb1817ccafb9cb3f64948 100644
index f08d68d6b6e6303485e2c53aebc0d42708bd022a..17aeb99d586161d0af69376811b42e84a80553e3 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -267,24 +267,14 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj,
Expand Down
2 changes: 1 addition & 1 deletion patches/node/fix_use_crypto_impls_for_compat.patch
Expand Up @@ -8,7 +8,7 @@ by using the implementations of those functions as found in the OpenSSL repo.
I plan to try and upstream a version of this.

diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index f81e2f789c4b3b5655073cf44700a16e5b2ec45c..ce48e608c07ca3d9dd717f92566c71c2a77cbcbc 100644
index 14029692e57b219d245d529a0be175c80f3a32de..cd763fd3755357b36e753cf778550cf2d498ed57 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -4522,7 +4522,7 @@ static unsigned int GetBytesOfRS(const ManagedEVPPKey& pkey) {
Expand Down
2 changes: 1 addition & 1 deletion patches/node/fixme_comment_trace_event_macro.patch
Expand Up @@ -7,7 +7,7 @@ This broke the build at some point. Does it still? We should probably remove
this patch and find out!

diff --git a/src/node_internals.h b/src/node_internals.h
index c362485dca561ed4a5210d7ac9f0e3b2a36a8d0c..b627ad3ef42835407a83b721a2f78d4128e48327 100644
index 084ecfa73657d1958d7552baa896e170934639c8..cb388f3a9f12949fd3ecb0406f7b550f4ca5ca7c 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -375,10 +375,11 @@ class TraceEventScope {
Expand Down
6 changes: 3 additions & 3 deletions patches/node/fixme_remove_async_id_assertion_check.patch
Expand Up @@ -7,11 +7,11 @@ async hooks are hella broken in Electron. This was checking that they weren't,
but they are, so we just disabled the check. YOLO.

diff --git a/src/api/callback.cc b/src/api/callback.cc
index f7e7ddedfae377daa1441b0845c6828aedfc2a44..dc62f8cc1b80a1b7558ec1000ac856e9929c68a5 100644
index c8934e1cd33a364ba55b437b080fe2c1c0f5de6c..63c9f5d7c08bebd25bd2602ab6b97c8987a102a4 100644
--- a/src/api/callback.cc
+++ b/src/api/callback.cc
@@ -111,12 +111,14 @@ void InternalCallbackScope::Close() {
MicrotasksScope::PerformCheckpoint(env_->isolate());
@@ -117,12 +117,14 @@ void InternalCallbackScope::Close() {
perform_stopping_check();
}

+#if 0 // FIXME(codebytere): figure out why this check fails/causes crash
Expand Down
2 changes: 1 addition & 1 deletion patches/node/override_existing_v8_reallocate.patch
Expand Up @@ -9,7 +9,7 @@ be overridden. This patch can be removed once the relevant version of V8
makes its way into Node.js.

diff --git a/src/node_internals.h b/src/node_internals.h
index b627ad3ef42835407a83b721a2f78d4128e48327..efea9db2da008be6a1a470cece9d7a04a628c1a8 100644
index cb388f3a9f12949fd3ecb0406f7b550f4ca5ca7c..f4b5c9bb7058da2355204a7285e5f7cc70c4ffda 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -115,7 +115,7 @@ class NodeArrayBufferAllocator : public ArrayBufferAllocator {
Expand Down
Expand Up @@ -7,7 +7,7 @@ We use this to allow node's 'fs' module to read from ASAR files as if they were
a real filesystem.

diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index bb9a2b177c4304496dab1f1beaedc1ae9d9f55d9..36d06759aac57b1aa813b52c94e2168b8a8f9087 100644
index c872941b974216d94863bcbf0e597b9c09ca50e2..4e7c3c10255a0eae4d5333f88e51cf7178163a44 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -57,6 +57,10 @@ setupBuffer();
Expand Down
Expand Up @@ -7,7 +7,7 @@ Subject: refactor: TransferrableModule is deprecated, use CompiledWasmModule
This is already present in Node.js v14 and can be removed when we upgrade.

diff --git a/src/node_messaging.cc b/src/node_messaging.cc
index fa7132d7b43a3d9b04d4e830357e661a860916b3..8e8f458ef9f557f84b2a92ea20d8c9470b4a9cba 100644
index 16b1a97eec2dfc236d54e76ef795ce1c0b958fb8..9ed2526fc04f63d857942684dd63b1b93ef2969e 100644
--- a/src/node_messaging.cc
+++ b/src/node_messaging.cc
@@ -57,7 +57,7 @@ class DeserializerDelegate : public ValueDeserializer::Delegate {
Expand Down
2 changes: 1 addition & 1 deletion patches/node/revert_crypto_add_oaeplabel_option.patch
Expand Up @@ -8,7 +8,7 @@ The BoringSSL incompatibilities (OPENSSL_memdup) will be shimmed in and this sho
be removed when the associated update is rolled into Chromium.

diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 39f2c58657fb7315b9abb1817ccafb9cb3f64948..f81e2f789c4b3b5655073cf44700a16e5b2ec45c 100644
index 17aeb99d586161d0af69376811b42e84a80553e3..14029692e57b219d245d529a0be175c80f3a32de 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -5011,18 +5011,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
Expand Down

0 comments on commit 1d8e416

Please sign in to comment.