| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8024ffb commit 33436e3
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -158,8 +158,7 @@ class BaseObject : public MemoryRetainer { | |||
| 158 | 158 | ||
| 159 | 159 | virtual inline void OnGCCollect(); | |
| 160 | 160 | ||
| 161 | - bool is_snapshotable() const { return is_snapshotable_; } | ||
| 162 | - void set_is_snapshotable(bool val) { is_snapshotable_ = val; } | ||
| 161 | + virtual inline bool is_snapshotable() const { return false; } | ||
| 163 | 162 | ||
| 164 | 163 | private: | |
| 165 | 164 | v8::Local<v8::Object> WrappedObject() const override; | |
@@ -209,7 +208,6 @@ class BaseObject : public MemoryRetainer { | |||
| 209 | 208 | ||
| 210 | 209 | Environment* env_; | |
| 211 | 210 | PointerData* pointer_data_ = nullptr; | |
| 212 | - bool is_snapshotable_ = false; | ||
| 213 | 211 | }; | |
| 214 | 212 | ||
| 215 | 213 | // Global alias for FromJSObject() to avoid churn. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,6 @@ SnapshotableObject::SnapshotableObject(Environment* env, | |||
| 16 | 16 | Local<Object> wrap, | |
| 17 | 17 | EmbedderObjectType type) | |
| 18 | 18 | : BaseObject(env, wrap), type_(type) { | |
| 19 | - set_is_snapshotable(true); | ||
| 20 | 19 | } | |
| 21 | 20 | ||
| 22 | 21 | const char* SnapshotableObject::GetTypeNameChars() const { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,6 +90,7 @@ class SnapshotableObject : public BaseObject { | |||
| 90 | 90 | virtual void PrepareForSerialization(v8::Local<v8::Context> context, | |
| 91 | 91 | v8::SnapshotCreator* creator) = 0; | |
| 92 | 92 | virtual InternalFieldInfo* Serialize(int index) = 0; | |
| 93 | + bool is_snapshotable() const override { return true; } | ||
| 93 | 94 | // We'll make sure that the type is set in the constructor | |
| 94 | 95 | EmbedderObjectType type() { return type_; } | |
| 95 | 96 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments