diff options
Diffstat (limited to 'chromium/v8/src/handles/handles.h')
-rw-r--r-- | chromium/v8/src/handles/handles.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/chromium/v8/src/handles/handles.h b/chromium/v8/src/handles/handles.h index aa9e522c0e6..a6a83dcca2d 100644 --- a/chromium/v8/src/handles/handles.h +++ b/chromium/v8/src/handles/handles.h @@ -199,6 +199,15 @@ class HandleScope { explicit inline HandleScope(Isolate* isolate); inline HandleScope(HandleScope&& other) V8_NOEXCEPT; + // Allow placement new. + void* operator new(size_t size, void* storage) { + return ::operator new(size, storage); + } + + // Prevent heap allocation or illegal handle scopes. + void* operator new(size_t size) = delete; + void operator delete(void* size_t) = delete; + inline ~HandleScope(); inline HandleScope& operator=(HandleScope&& other) V8_NOEXCEPT; @@ -234,10 +243,6 @@ class HandleScope { static const int kCheckHandleThreshold = 30 * 1024; private: - // Prevent heap allocation or illegal handle scopes. - void* operator new(size_t size); - void operator delete(void* size_t); - Isolate* isolate_; Address* prev_next_; Address* prev_limit_; |