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
committerMyles Borins <mylesborins@google.com>2020-03-24 09:55:13 +0300
commitbd55a9a607187fe85608a6facd90a6cdd898d29d (patch)
tree42e264f6012b82fe29b6b83698ec3090fdcd9fc0 /src/node_platform.h
parent11650c683eccada148e2f10c02219898c9d375cb (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 bebd61b0c22..533ae1bcca8 100644
--- a/src/node_platform.h
+++ b/src/node_platform.h
@@ -86,7 +86,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 {
@@ -99,6 +99,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_;