mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: declare gin::Wrapper subclasses as final (#43566)
As per the gin docs: "Wrappable<T> explicitly does not support further subclassing of T. Subclasses of Wrappable<T> should be declared final." Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
@@ -43,7 +43,7 @@ class Arguments;
|
||||
|
||||
namespace electron::api {
|
||||
|
||||
class NativeImage : public gin::Wrappable<NativeImage> {
|
||||
class NativeImage final : public gin::Wrappable<NativeImage> {
|
||||
public:
|
||||
NativeImage(v8::Isolate* isolate, const gfx::Image& image);
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
|
||||
@@ -161,8 +161,9 @@ class BufferDataSource : public mojo::DataPipeProducer::DataSource {
|
||||
std::vector<char> buffer_;
|
||||
};
|
||||
|
||||
class JSChunkedDataPipeGetter : public gin::Wrappable<JSChunkedDataPipeGetter>,
|
||||
public network::mojom::ChunkedDataPipeGetter {
|
||||
class JSChunkedDataPipeGetter final
|
||||
: public gin::Wrappable<JSChunkedDataPipeGetter>,
|
||||
public network::mojom::ChunkedDataPipeGetter {
|
||||
public:
|
||||
static gin::Handle<JSChunkedDataPipeGetter> Create(
|
||||
v8::Isolate* isolate,
|
||||
|
||||
@@ -44,7 +44,7 @@ class ElectronBrowserContext;
|
||||
namespace electron::api {
|
||||
|
||||
/** Wraps a SimpleURLLoader to make it usable from JavaScript */
|
||||
class SimpleURLLoaderWrapper
|
||||
class SimpleURLLoaderWrapper final
|
||||
: public gin::Wrappable<SimpleURLLoaderWrapper>,
|
||||
public gin_helper::EventEmitterMixin<SimpleURLLoaderWrapper>,
|
||||
private network::SimpleURLLoaderStreamConsumer,
|
||||
|
||||
Reference in New Issue
Block a user