Skip to content

Commit

Permalink
src: add support for externally shared js builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jan 9, 2023
1 parent d44581f commit 3faa1d0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
1 change: 1 addition & 0 deletions patches/node/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ fix_prevent_changing_functiontemplateinfo_after_publish.patch
enable_crashpad_linux_node_processes.patch
allow_embedder_to_control_codegenerationfromstringscallback.patch
chore_remove_errant_semicolons.patch
chore_remove_unreached_return.patch
22 changes: 22 additions & 0 deletions patches/node/chore_remove_unreached_return.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Mon, 9 Jan 2023 14:34:01 +0100
Subject: chore: remove unreached return

https://github.com/nodejs/node/pull/44376 added a return after a call to
ABORT(), triggering an unreachable code error.

This should be upstreamed.

diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 25b02f9904127780c68db9b451a7dfcf02a6fc5e..1be20aea500fd9d606c5a38a86b4aef66b49d133 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -247,7 +247,6 @@ void BuiltinLoader::AddExternalizedBuiltin(const char* id,
fprintf(
stderr, "Cannot load externalized builtin: \"%s:%s\".\n", id, filename);
ABORT();
- return;
}

icu::UnicodeString utf16 = icu::UnicodeString::fromUTF8(
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ index 0f5ddfb3ca21b7e5b38d0a4ce4b9e77387597199..ba815202fb157aa82859ec0518523cf6
.. c:function:: int uv_loop_close(uv_loop_t* loop)

diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
index 606083c87de5790d7e66fc34aeaae9a58acb8ef4..824b0b77cf5f0a46dcb3855c44ac73faaba2055f 100644
index ee1c94ccd389915ea7572cce044256a7788025ad..d31abf714d5d1433ec8473ccb1aae3b6615c477a 100644
--- a/deps/uv/include/uv.h
+++ b/deps/uv/include/uv.h
@@ -252,7 +252,8 @@ typedef struct uv_statfs_s uv_statfs_t;
Expand Down Expand Up @@ -102,10 +102,10 @@ index e1805c323795e5b0c465d80100eebeb7bf838caa..dd4358c0cdaa97ba8fadf4d975599380
int pipefd[2];
int err;
diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c
index 7cd3a2a954ff7d70e6ba7a6f7538648841bc54b2..f89b7158218be60ac10e61484a2d5e5e28a3182f 100644
index 54c769f37f2331136c87a37c13fb4e3f9a8f22f9..ac52ab79a5fc3050effd2b1f2f605cee9b1ab336 100644
--- a/deps/uv/src/unix/core.c
+++ b/deps/uv/src/unix/core.c
@@ -887,6 +887,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
@@ -900,6 +900,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
loop->watchers[w->fd] = w;
loop->nfds++;
}
Expand All @@ -115,7 +115,7 @@ index 7cd3a2a954ff7d70e6ba7a6f7538648841bc54b2..f89b7158218be60ac10e61484a2d5e5e
}


@@ -918,6 +921,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
@@ -931,6 +934,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
}
else if (QUEUE_EMPTY(&w->watcher_queue))
QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue);
Expand All @@ -125,7 +125,7 @@ index 7cd3a2a954ff7d70e6ba7a6f7538648841bc54b2..f89b7158218be60ac10e61484a2d5e5e
}


@@ -934,6 +940,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
@@ -947,6 +953,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
void uv__io_feed(uv_loop_t* loop, uv__io_t* w) {
if (QUEUE_EMPTY(&w->pending_queue))
QUEUE_INSERT_TAIL(&loop->pending_queue, &w->pending_queue);
Expand Down Expand Up @@ -217,10 +217,10 @@ index 6001b0cf68d0b0268b578218b664a737f43c9521..5d2212571f4bcb648ab332f0c5650d0f
while (0)

diff --git a/deps/uv/src/win/core.c b/deps/uv/src/win/core.c
index e53a0f8e28637a58ceec7852d1a79874fc1a9548..dd4065c1cc68763bfe258492e3119669311394dc 100644
index 67af93e6571ed4324d80b6dfb2ff93db7b9cd9b1..e88008b6a288d1508c5c117d814000d63cab81c3 100644
--- a/deps/uv/src/win/core.c
+++ b/deps/uv/src/win/core.c
@@ -381,10 +381,20 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
@@ -384,10 +384,20 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
return 0;
}

Expand All @@ -242,7 +242,7 @@ index e53a0f8e28637a58ceec7852d1a79874fc1a9548..dd4065c1cc68763bfe258492e3119669
return -1;
}
diff --git a/deps/uv/test/test-embed.c b/deps/uv/test/test-embed.c
index 1d3355fdc6..77a63dbb4d 100644
index 1d3355fdc67310feb63738c9e30724f0e77f7895..77a63dbb4d188b2ad571c814dbc6cbc6fe5fa205 100644
--- a/deps/uv/test/test-embed.c
+++ b/deps/uv/test/test-embed.c
@@ -25,54 +25,184 @@
Expand Down Expand Up @@ -466,7 +466,7 @@ index 1d3355fdc6..77a63dbb4d 100644
MAKE_VALGRIND_HAPPY();
return 0;
diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h
index a43edf1a4a9b0932ec73b8edaca0f676ecf3ccfa..199402e31406cf8ba360d54769461bb5285011ee 100644
index b19c10c7e40c77061337416fd623c53d0863d276..1f54ac21c36902bccb35c64cefa8bb14dd675bb0 100644
--- a/deps/uv/test/test-list.h
+++ b/deps/uv/test/test-list.h
@@ -265,6 +265,7 @@ TEST_DECLARE (process_priority)
Expand Down

0 comments on commit 3faa1d0

Please sign in to comment.