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-05-08 06:56:31 +0300
committerMichaƫl Zasso <targos@protonmail.com>2020-05-10 15:08:40 +0300
commit34d92b78ab93e86168a2ddfe633eea42958bdd9d (patch)
tree3b8f2d9f2a03a9d6eb64eebb3b2326b788e4e11f /src/node_internals.h
parent18584727de5df6bf7332e746b9caee0adb278b98 (diff)
src: remove unnecessary Isolate::GetCurrent() calls
These calls are unnecessary in Release mode but would still have been included, so move them to the `DebugSealHandleScope` constructor. PR-URL: https://github.com/nodejs/node/pull/33298 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index fa3ba022fe7..70750cc8717 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -243,9 +243,9 @@ class InternalCallbackScope {
class DebugSealHandleScope {
public:
- explicit inline DebugSealHandleScope(v8::Isolate* isolate)
+ explicit inline DebugSealHandleScope(v8::Isolate* isolate = nullptr)
#ifdef DEBUG
- : actual_scope_(isolate)
+ : actual_scope_(isolate != nullptr ? isolate : v8::Isolate::GetCurrent())
#endif
{}