Make all inheritance from angle::NonCopyable private so the compiler
complains about this (admittedly unlikely) code:
class Foo: angle::NonCopyable {
virtual ~Foo() { ... }
};
angle::NonCopyable *p = new Foo;
delete p;
In the above code ~Foo() is not called, only ~NonCopyable(), because the
latter is not virtual. Making it virtual would add overhead to all derived
classes which don't already have a virtual method.
Also tighten access in NonCopyable, because we can.
BUG=angleproject:2026
Change-Id: Id0dc4d959cfb7bb82cf49382118129abb1d3a4f0
Reviewed-on: https://chromium-review.googlesource.com/495352Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Reviewed-by:
Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| third_party/perf | Loading commit data... | |
| ANGLEPerfTest.cpp | Loading commit data... | |
| ANGLEPerfTest.h | Loading commit data... | |
| BindingPerf.cpp | Loading commit data... | |
| BitSetIteratorPerf.cpp | Loading commit data... | |
| BlitFramebufferPerf.cpp | Loading commit data... | |
| BufferSubData.cpp | Loading commit data... | |
| DrawCallPerf.cpp | Loading commit data... | |
| DrawCallPerfParams.cpp | Loading commit data... | |
| DrawCallPerfParams.h | Loading commit data... | |
| DynamicPromotionPerfTest.cpp | Loading commit data... | |
| EGLInitializePerf.cpp | Loading commit data... | |
| IndexConversionPerf.cpp | Loading commit data... | |
| IndexDataManagerTest.cpp | Loading commit data... | |
| InstancingPerf.cpp | Loading commit data... | |
| InterleavedAttributeData.cpp | Loading commit data... | |
| LinkProgramPerfTest.cpp | Loading commit data... | |
| PointSprites.cpp | Loading commit data... | |
| TexSubImage.cpp | Loading commit data... | |
| TextureSampling.cpp | Loading commit data... | |
| TexturesPerf.cpp | Loading commit data... | |
| UniformsPerf.cpp | Loading commit data... |