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:
authorJoyee Cheung <joyeec9h3@gmail.com>2021-02-08 17:13:37 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2021-02-19 14:08:06 +0300
commit8aa9b772f4892ab44e74d3e7df0733408b7d2bc8 (patch)
tree325563f3d49e086f75a0cdf9f4a9219c0734c443 /src/node_file.h
parent3c8290c5a8afd851f2521a507b375ca5c91ce87b (diff)
bootstrap: include fs module into the builtin snapshot
PR-URL: https://github.com/nodejs/node/pull/36943 Fixes: https://github.com/nodejs/node/issues/35930 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_file.h')
-rw-r--r--src/node_file.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/node_file.h b/src/node_file.h
index 9e652dc7a4a..f1515a3e25d 100644
--- a/src/node_file.h
+++ b/src/node_file.h
@@ -3,23 +3,19 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
-#include "node.h"
#include "aliased_buffer.h"
#include "node_messaging.h"
+#include "node_snapshotable.h"
#include "stream_base.h"
-#include <iostream>
namespace node {
namespace fs {
class FileHandleReadWrap;
-class BindingData : public BaseObject {
+class BindingData : public SnapshotableObject {
public:
- explicit BindingData(Environment* env, v8::Local<v8::Object> wrap)
- : BaseObject(env, wrap),
- stats_field_array(env->isolate(), kFsStatsBufferLength),
- stats_field_bigint_array(env->isolate(), kFsStatsBufferLength) {}
+ explicit BindingData(Environment* env, v8::Local<v8::Object> wrap);
AliasedFloat64Array stats_field_array;
AliasedBigUint64Array stats_field_bigint_array;
@@ -27,7 +23,10 @@ class BindingData : public BaseObject {
std::vector<BaseObjectPtr<FileHandleReadWrap>>
file_handle_read_wrap_freelist;
- static constexpr FastStringKey type_name { "fs" };
+ SERIALIZABLE_OBJECT_METHODS()
+ static constexpr FastStringKey type_name{"node::fs::BindingData"};
+ static constexpr EmbedderObjectType type_int =
+ EmbedderObjectType::k_fs_binding_data;
void MemoryInfo(MemoryTracker* tracker) const override;
SET_SELF_SIZE(BindingData)