diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-21 15:03:21 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-23 06:26:09 +0300 |
commit | d5d9c349d3f0ff268f8dc2cc31812581bbe2815e (patch) | |
tree | d8321a2f2e153f4d236b9fca6f76ab2c1a6bc24d /src/env.cc | |
parent | eb23b176d8c7122af6add5ee38f87044288d3d39 (diff) |
src: use std::vector<size_t> instead of IndexArray
PR-URL: https://github.com/nodejs/node/pull/27321
Refs: https://github.com/nodejs/node/issues/17058
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/env.cc')
-rw-r--r-- | src/env.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/env.cc b/src/env.cc index 5ef32e2b0ef..ad43b136070 100644 --- a/src/env.cc +++ b/src/env.cc @@ -75,8 +75,7 @@ std::vector<size_t> IsolateData::Serialize(SnapshotCreator* creator) { return indexes; } -void IsolateData::DeserializeProperties( - const NodeMainInstance::IndexArray* indexes) { +void IsolateData::DeserializeProperties(const std::vector<size_t>* indexes) { size_t i = 0; HandleScope handle_scope(isolate_); @@ -86,7 +85,7 @@ void IsolateData::DeserializeProperties( #define V(TypeName, PropertyName) \ do { \ MaybeLocal<TypeName> field = \ - isolate_->GetDataFromSnapshotOnce<TypeName>(indexes->Get(i++)); \ + isolate_->GetDataFromSnapshotOnce<TypeName>((*indexes)[i++]); \ if (field.IsEmpty()) { \ fprintf(stderr, "Failed to deserialize " #PropertyName "\n"); \ } \ @@ -155,7 +154,7 @@ IsolateData::IsolateData(Isolate* isolate, uv_loop_t* event_loop, MultiIsolatePlatform* platform, ArrayBufferAllocator* node_allocator, - const NodeMainInstance::IndexArray* indexes) + const std::vector<size_t>* indexes) : isolate_(isolate), event_loop_(event_loop), allocator_(isolate->GetArrayBufferAllocator()), |