Commit 59e2e119 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[clang-tidy] Make deleted constructor public

Making them private was a way to hide the constructor, we can
explicitly delete them, which give a better compilation error message as
well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: I8a116637608fcc6a93d6fc4f5ee014d2db863669
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204156Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67872}
parent 4f3b9ddd
......@@ -464,6 +464,8 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
public:
using HandleScopeType = HandleScope;
void* operator new(size_t) = delete;
void operator delete(void*) = delete;
// A thread has a PerIsolateThreadData instance for each isolate that it has
// entered. That instance is allocated when the isolate is initially entered
......@@ -1860,8 +1862,6 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
// Delete new/delete operators to ensure that Isolate::New() and
// Isolate::Delete() are used for Isolate creation and deletion.
void* operator new(size_t, void* ptr) { return ptr; }
void* operator new(size_t) = delete;
void operator delete(void*) = delete;
friend class heap::HeapTester;
friend class TestSerializer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment