diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-14 09:41:04 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-16 21:44:24 +0300 |
commit | cab1dc5bb346b6c4d0e02e6785715af6ff6fb090 (patch) | |
tree | 9978077693ef273f3d19bf2b4f1a9e1cc9df1582 /src/env.cc | |
parent | c6c37e9e850fa2a30b12a0d0fd0dfe144eda0959 (diff) |
src: use RAII to manage the main isolate data
This patch encapsulates the main isolate management into a
NodeMainInstance class that manages the resources with RAII
and controls the Isolate::CreateParams (which is necessary
for deserializing snapshots with external references)
PR-URL: https://github.com/nodejs/node/pull/27220
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/env.cc')
-rw-r--r-- | src/env.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/env.cc b/src/env.cc index 88017ab5452..ccb3c404f91 100644 --- a/src/env.cc +++ b/src/env.cc @@ -76,6 +76,8 @@ IsolateData::IsolateData(Isolate* isolate, // One byte because our strings are ASCII and we can safely skip V8's UTF-8 // decoding step. + HandleScope handle_scope(isolate); + #define V(PropertyName, StringValue) \ PropertyName ## _.Set( \ isolate, \ |