| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6256bd5 commit 8082c24
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -498,6 +498,9 @@ class ArrayBufferViewContents { | |||
| 498 | 498 | public: | |
| 499 | 499 | ArrayBufferViewContents() = default; | |
| 500 | 500 | ||
| 501 | + ArrayBufferViewContents(const ArrayBufferViewContents&) = delete; | ||
| 502 | + void operator=(const ArrayBufferViewContents&) = delete; | ||
| 503 | + | ||
| 501 | 504 | explicit inline ArrayBufferViewContents(v8::Local<v8::Value> value); | |
| 502 | 505 | explicit inline ArrayBufferViewContents(v8::Local<v8::Object> value); | |
| 503 | 506 | explicit inline ArrayBufferViewContents(v8::Local<v8::ArrayBufferView> abv); | |
@@ -507,6 +510,13 @@ class ArrayBufferViewContents { | |||
| 507 | 510 | inline size_t length() const { return length_; } | |
| 508 | 511 | ||
| 509 | 512 | private: | |
| 513 | + // Declaring operator new and delete as deleted is not spec compliant. | ||
| 514 | + // Therefore, declare them private instead to disable dynamic alloc. | ||
| 515 | + void* operator new(size_t size); | ||
| 516 | + void* operator new[](size_t size); | ||
| 517 | + void operator delete(void*, size_t); | ||
| 518 | + void operator delete[](void*, size_t); | ||
| 519 | + | ||
| 510 | 520 | T stack_storage_[kStackStorageSize]; | |
| 511 | 521 | T* data_ = nullptr; | |
| 512 | 522 | size_t length_ = 0; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments