Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-03-14 22:24:41 +0300
committerJames M Snell <jasnell@gmail.com>2020-03-21 03:50:35 +0300
commitd129e0c782914df8720d1335c95bd7f635f2788e (patch)
tree093746c065dd09ca0148fe0ec967fa3558f938de /src/node_platform.h
parent064a6703a720f669f868e35cca69412ee3f962c5 (diff)
src: avoid Isolate::GetCurrent() for platform implementation
There’s no need to use `Isolate::GetCurrent()`, which is generally discouraged, as the `Isolate*` pointer can generally be looked up from the per-Isolate platform data structure. PR-URL: https://github.com/nodejs/node/pull/32269 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_platform.h')
-rw-r--r--src/node_platform.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_platform.h b/src/node_platform.h
index c217480ed1c..2ae95e3dae2 100644
--- a/src/node_platform.h
+++ b/src/node_platform.h
@@ -88,7 +88,7 @@ class PerIsolatePlatformData :
void DecreaseHandleCount();
static void FlushTasks(uv_async_t* handle);
- static void RunForegroundTask(std::unique_ptr<v8::Task> task);
+ void RunForegroundTask(std::unique_ptr<v8::Task> task);
static void RunForegroundTask(uv_timer_t* timer);
struct ShutdownCallback {
@@ -101,6 +101,7 @@ class PerIsolatePlatformData :
std::shared_ptr<PerIsolatePlatformData> self_reference_;
uint32_t uv_handle_count_ = 1; // 1 = flush_tasks_
+ v8::Isolate* const isolate_;
uv_loop_t* const loop_;
uv_async_t* flush_tasks_ = nullptr;
TaskQueue<v8::Task> foreground_tasks_;