Skip to content

Commit b194685

Browse files
authored
new package: electron-28 (#31)
[skip ci]
1 parent 0d87aef commit b194685

10 files changed

+523
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
We pass `--no-history` to gclient, so there will be no version for electron.
2+
--- a/electron/script/get-git-version.py
3+
+++ b/electron/script/get-git-version.py
4+
@@ -20,7 +20,7 @@
5+
6+
try:
7+
output = subprocess.check_output(
8+
- ['git', 'describe', '--tags', '--abbrev=0'],
9+
+ ['cat', 'ELECTRON_VERSION'],
10+
cwd=os.path.abspath(os.path.join(os.path.dirname(__file__), '..')),
11+
stderr=subprocess.PIPE,
12+
universal_newlines=True)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/third_party/electron_node/deps/v8/src/trap-handler/trap-handler.h
2+
+++ b/third_party/electron_node/deps/v8/src/trap-handler/trap-handler.h
3+
@@ -19,7 +19,7 @@
4+
5+
// X64 on Linux, Windows, MacOS, FreeBSD.
6+
#if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \
7+
- ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \
8+
+ (V8_OS_LINUX || V8_OS_WIN || V8_OS_DARWIN || \
9+
V8_OS_FREEBSD)
10+
#define V8_TRAP_HANDLER_SUPPORTED true
11+
// Arm64 (non-simulator) on Mac.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--- a/third_party/electron_node/deps/cares/config/linux/ares_config.h
2+
+++ b/third_party/electron_node/deps/cares/config/linux/ares_config.h
3+
@@ -59,10 +59,10 @@
4+
#define HAVE_ARPA_INET_H 1
5+
6+
/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
7+
-#define HAVE_ARPA_NAMESER_COMPAT_H 1
8+
+// #define HAVE_ARPA_NAMESER_COMPAT_H 1
9+
10+
/* Define to 1 if you have the <arpa/nameser.h> header file. */
11+
-#define HAVE_ARPA_NAMESER_H 1
12+
+// #define HAVE_ARPA_NAMESER_H 1
13+
14+
/* Define to 1 if you have the <assert.h> header file. */
15+
#define HAVE_ASSERT_H 1
16+
@@ -128,7 +128,7 @@
17+
#define HAVE_GETNAMEINFO 1
18+
19+
/* Define to 1 if you have the getservbyport_r function. */
20+
-#define HAVE_GETSERVBYPORT_R 1
21+
+// #define HAVE_GETSERVBYPORT_R 1
22+
23+
/* Define to 1 if you have the `gettimeofday' function. */
24+
#define HAVE_GETTIMEOFDAY 1
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- a/electron/shell/app/electron_main_delegate.cc
2+
+++ b/electron/shell/app/electron_main_delegate.cc
3+
@@ -256,8 +256,13 @@
4+
if (env->HasVar(kElectronEnableStackDumping))
5+
base::debug::EnableInProcessStackDumping();
6+
7+
+#ifndef __TERMUX__
8+
if (env->HasVar(kElectronDisableSandbox))
9+
command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox);
10+
+#else
11+
+ command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox);
12+
+ command_line->AppendSwitch(sandbox::policy::switches::kDisableSeccompFilterSandbox);
13+
+#endif
14+
15+
tracing_sampler_profiler_ =
16+
tracing::TracingSamplerProfiler::CreateOnMainThread();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- a/third_party/electron_node/src/node_internals.h
2+
+++ b/third_party/electron_node/src/node_internals.h
3+
@@ -287,9 +287,9 @@
4+
5+
// Functions defined in node.cc that are exposed via the bootstrapper object
6+
7+
-#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
8+
+#if defined(__POSIX__) && !defined(__CloudABI__)
9+
#define NODE_IMPLEMENTS_POSIX_CREDENTIALS 1
10+
-#endif // defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
11+
+#endif // defined(__POSIX__) && !defined(__CloudABI__)
12+
13+
namespace credentials {
14+
bool SafeGetenv(const char* key,
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
--- a/ui/gtk/gtk_compat.cc
2+
+++ b/ui/gtk/gtk_compat.cc
3+
@@ -62,22 +62,38 @@
4+
}
5+
6+
void* GetLibGio() {
7+
+#ifdef __TERMUX__
8+
+ static void* libgio = DlOpen("libgio-2.0.so");
9+
+#else
10+
static void* libgio = DlOpen("libgio-2.0.so.0");
11+
+#endif
12+
return libgio;
13+
}
14+
15+
void* GetLibGdk3() {
16+
+#ifdef __TERMUX__
17+
+ static void* libgdk3 = DlOpen("libgdk-3.so");
18+
+#else
19+
static void* libgdk3 = DlOpen("libgdk-3.so.0");
20+
+#endif
21+
return libgdk3;
22+
}
23+
24+
void* GetLibGtk3(bool check = true) {
25+
+#ifdef __TERMUX__
26+
+ static void* libgtk3 = DlOpen("libgtk-3.so", check);
27+
+#else
28+
static void* libgtk3 = DlOpen("libgtk-3.so.0", check);
29+
+#endif
30+
return libgtk3;
31+
}
32+
33+
void* GetLibGtk4(bool check = true) {
34+
+#ifdef __TERMUX__
35+
+ static void* libgtk4 = DlOpen("libgtk-4.so", check);
36+
+#else
37+
static void* libgtk4 = DlOpen("libgtk-4.so.1", check);
38+
+#endif
39+
return libgtk4;
40+
}
41+
42+
@@ -124,7 +140,11 @@
43+
} // namespace
44+
45+
void* GetLibGdkPixbuf() {
46+
+#ifdef __TERMUX__
47+
+ static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so");
48+
+#else
49+
static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0");
50+
+#endif
51+
return libgdk_pixbuf;
52+
}
53+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- a/electron/shell/browser/extensions/api/extension_action/extension_action_api.cc
2+
+++ b/electron/shell/browser/extensions/api/extension_action/extension_action_api.cc
3+
@@ -154,6 +154,13 @@
4+
}
5+
6+
ExtensionFunction::ResponseAction
7+
+ExtensionActionOpenPopupFunction::RunExtensionAction() {
8+
+ LOG(INFO) << "chrome.action.openPopup is not supported in Electron";
9+
+
10+
+ return RespondNow(NoArguments());
11+
+}
12+
+
13+
+ExtensionFunction::ResponseAction
14+
ExtensionActionGetBadgeTextFunction::RunExtensionAction() {
15+
LOG(INFO) << "chrome.action.getBadgeText is not supported in Electron";
16+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/third_party/electron_node/deps/uv/src/unix/internal.h
2+
+++ b/third_party/electron_node/deps/uv/src/unix/internal.h
3+
@@ -79,7 +79,7 @@
4+
# define UV__PATH_MAX 8192
5+
#endif
6+
7+
-#if defined(__ANDROID__)
8+
+#if defined(__ANDROID__) && __ANDROID_API__ < 16
9+
int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset);
10+
# ifdef pthread_sigmask
11+
# undef pthread_sigmask

0 commit comments

Comments
 (0)