summaryrefslogtreecommitdiff
path: root/src/env.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-03-05 23:03:24 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-09 00:27:29 +0100
commit2699f8c860084565a8b3748b3fdf1ebba204f3f7 (patch)
tree35b317504f40d0e3b3a25e5b4205596c41a6b76c /src/env.cc
parentc957b0517766729f931a1ef7ab134f75d6a01864 (diff)
downloadandroid-node-v8-2699f8c860084565a8b3748b3fdf1ebba204f3f7.tar.gz
android-node-v8-2699f8c860084565a8b3748b3fdf1ebba204f3f7.tar.bz2
android-node-v8-2699f8c860084565a8b3748b3fdf1ebba204f3f7.zip
src: merge debug-only `SealHandleScope`s
Instead of repeating the same `#ifdef DEBUG` + `SealHandleScope` pattern over and over, create an utility that does this for us. PR-URL: https://github.com/nodejs/node/pull/26459 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/env.cc')
-rw-r--r--src/env.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/env.cc b/src/env.cc
index bd44480184..ba3e63ad8d 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -644,9 +644,7 @@ void Environment::RunAndClearNativeImmediates() {
auto drain_list = [&]() {
TryCatchScope try_catch(this);
for (auto it = list.begin(); it != list.end(); ++it) {
-#ifdef DEBUG
- v8::SealHandleScope seal_handle_scope(isolate());
-#endif
+ DebugSealHandleScope seal_handle_scope(isolate());
it->cb_(this, it->data_);
if (it->refed_)
ref_count++;