mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
refactor: move gin_helper::Constructible methods to prototype (#37087)
This commit is contained in:
@@ -24,7 +24,7 @@ class EventEmitterMixin;
|
||||
// public gin_helper::Constructible<Example> {
|
||||
// public:
|
||||
// static gin::Handle<Tray> New(...usual gin method arguments...);
|
||||
// static v8::Local<v8::ObjectTemplate> FillObjectTemplate(
|
||||
// static void FillObjectTemplate(
|
||||
// v8::Isolate*,
|
||||
// v8::Local<v8::ObjectTemplate>);
|
||||
// }
|
||||
@@ -55,9 +55,8 @@ class Constructible {
|
||||
}
|
||||
constructor->InstanceTemplate()->SetInternalFieldCount(
|
||||
gin::kNumberOfInternalFields);
|
||||
v8::Local<v8::ObjectTemplate> obj_templ =
|
||||
T::FillObjectTemplate(isolate, constructor->InstanceTemplate());
|
||||
data->SetObjectTemplate(wrapper_info, obj_templ);
|
||||
T::FillObjectTemplate(isolate, constructor->PrototypeTemplate());
|
||||
data->SetObjectTemplate(wrapper_info, constructor->InstanceTemplate());
|
||||
data->SetFunctionTemplate(wrapper_info, constructor);
|
||||
}
|
||||
return constructor->GetFunction(context).ToLocalChecked();
|
||||
|
||||
Reference in New Issue
Block a user