summaryrefslogtreecommitdiff
path: root/src/node_platform.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-04-16 11:43:50 +0200
committerAnna Henningsen <anna@addaleax.net>2019-04-18 12:50:52 +0200
commitf9da3f0cce7188dc9ddbc5c32da550f940ed5f38 (patch)
tree3e4e939b352e38282c5635fe4af6bb58be9ea934 /src/node_platform.cc
parentd17dfc7bb1660b3579407e5f6e106b0431cc264b (diff)
downloadandroid-node-v8-f9da3f0cce7188dc9ddbc5c32da550f940ed5f38.tar.gz
android-node-v8-f9da3f0cce7188dc9ddbc5c32da550f940ed5f38.tar.bz2
android-node-v8-f9da3f0cce7188dc9ddbc5c32da550f940ed5f38.zip
src: enable non-nestable V8 platform tasks
We never execute tasks in a nested fashion, so enabling them should be as simple as forwarding tasks to the existing `Post*` methods. PR-URL: https://github.com/nodejs/node/pull/27252 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'src/node_platform.cc')
-rw-r--r--src/node_platform.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/node_platform.cc b/src/node_platform.cc
index 47c4373a0f..8c097c03c7 100644
--- a/src/node_platform.cc
+++ b/src/node_platform.cc
@@ -257,6 +257,16 @@ void PerIsolatePlatformData::PostDelayedTask(
uv_async_send(flush_tasks_);
}
+void PerIsolatePlatformData::PostNonNestableTask(std::unique_ptr<Task> task) {
+ PostTask(std::move(task));
+}
+
+void PerIsolatePlatformData::PostNonNestableDelayedTask(
+ std::unique_ptr<Task> task,
+ double delay_in_seconds) {
+ PostDelayedTask(std::move(task), delay_in_seconds);
+}
+
PerIsolatePlatformData::~PerIsolatePlatformData() {
Shutdown();
}