Skip to content
This repository was archived by the owner on Aug 9, 2021. It is now read-only.

Commit 6956bdf

Browse files
committed
upgrade to node v14.2.0
1 parent 43c8a33 commit 6956bdf

10 files changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
types: [created]
44
jobs:
55
build:
6-
runs-on: ubuntu-18.04
6+
runs-on: ubuntu-16.04
77
steps:
88
- uses: actions/setup-node@master
99
with:

build.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env node
22

33
const path = require("path");
4+
const os = require('os');
45

56
//==================================
67
// HELPER UTILITIES
@@ -55,7 +56,7 @@ const epath = `${path.join("..", "bin", "ninja")}${path.delimiter}${
5556
process.env.PATH
5657
}`;
5758

58-
execSync(`ninja -j8 -C out/Release qode`, {
59+
execSync(`ninja -j${os.cpus().length} -C out/Release qode`, {
5960
cwd: "node",
6061
env: { PATH: epath }
6162
});

node

Submodule node updated from def0030 to 53328fd

qode.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
'MinimumRequiredVersion': '5.02',
6767
# A win32 GUI program use 2 and for CUI use 1.
6868
'SubSystem': '1',
69+
# Defined in node target, required for building x86.
70+
'ImageHasSafeExceptionHandlers': 'false',
6971
},
7072
},
7173
'msvs_disabled_warnings': [

src/integration/node_integration.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ void NodeIntegration::UvRunOnce() {
6464
// Deal with uv events.
6565
uv_run(uv_loop_, UV_RUN_NOWAIT);
6666

67-
isolate->RunMicrotasks(); //TODO: fix me
6867
// Tell the worker thread to continue polling.
6968
uv_sem_post(&embed_sem_);
7069
}
@@ -131,7 +130,7 @@ void NodeIntegration::OnCallNextTick(uv_async_t* handle) {
131130
env,
132131
v8::Object::New(isolate),
133132
{0, 0},
134-
node::InternalCallbackScope::Flags::kNoFlags);
133+
node::InternalCallbackScope::kNoFlags);
135134
}
136135

137136
} // namespace qode

src/integration/node_integration.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class NodeIntegration {
5757
uv_loop_t* uv_loop_;
5858

5959
private:
60+
NodeIntegration(const NodeIntegration&) = delete;
61+
NodeIntegration& operator=(const NodeIntegration&) = delete;
62+
6063
// Thread to poll uv events.
6164
static void EmbedThreadRunner(void* arg);
6265

@@ -78,7 +81,6 @@ class NodeIntegration {
7881
// Semaphore to wait for main loop in the embed thread.
7982
uv_sem_t embed_sem_;
8083

81-
DISALLOW_COPY_AND_ASSIGN(NodeIntegration);
8284
};
8385

8486
} // namespace qode

src/integration/node_integration_linux.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class NodeIntegrationLinux : public NodeIntegration {
2424
// Epoll to poll for uv's backend fd.
2525
int epoll_;
2626

27-
DISALLOW_COPY_AND_ASSIGN(NodeIntegrationLinux);
2827
};
2928

3029
} // namespace qode

src/integration/node_integration_mac.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class NodeIntegrationMac : public NodeIntegration {
2121
// Called when uv's watcher queue changes.
2222
static void OnWatcherQueueChanged(uv_loop_t* loop);
2323

24-
DISALLOW_COPY_AND_ASSIGN(NodeIntegrationMac);
2524
};
2625

2726
} // namespace qode

src/integration/node_integration_win.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class NodeIntegrationWin : public NodeIntegration {
3232
int task_id_ = 0;
3333
std::unordered_map<UINT_PTR, std::function<void()>> tasks_;
3434

35-
DISALLOW_COPY_AND_ASSIGN(NodeIntegrationWin);
3635
};
3736

3837
} // namespace qode

src/qode.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ void ActivateUvLoop(const v8::FunctionCallbackInfo<v8::Value> &args) {
3232

3333

3434
bool InitWrapper(node::Environment *env) {
35+
// Set MicrotasksPolicy to Auto otherwise microtasks won't run.
36+
env->isolate()->SetMicrotasksPolicy(v8::MicrotasksPolicy::kAuto);
37+
3538
v8::HandleScope handle_scope(env->isolate());
3639
v8::Local<v8::Value> versions =
3740
env->process_object()

0 commit comments

Comments
 (0)