fix: set prototype names on gin::Constructible
classes (#39006)
* fix: set prototype names on gin::Constructible classes * test: add tests
This commit is contained in:
parent
56b5c00312
commit
c7bdd907d7
23 changed files with 71 additions and 15 deletions
|
@ -283,7 +283,7 @@ gin::Handle<Protocol> Protocol::New(gin_helper::ErrorThrower thrower) {
|
|||
v8::Local<v8::ObjectTemplate> Protocol::FillObjectTemplate(
|
||||
v8::Isolate* isolate,
|
||||
v8::Local<v8::ObjectTemplate> tmpl) {
|
||||
return gin::ObjectTemplateBuilder(isolate, "Protocol", tmpl)
|
||||
return gin::ObjectTemplateBuilder(isolate, GetClassName(), tmpl)
|
||||
.SetMethod("registerStringProtocol",
|
||||
&Protocol::RegisterProtocolFor<ProtocolType::kString>)
|
||||
.SetMethod("registerBufferProtocol",
|
||||
|
@ -317,7 +317,7 @@ v8::Local<v8::ObjectTemplate> Protocol::FillObjectTemplate(
|
|||
}
|
||||
|
||||
const char* Protocol::GetTypeName() {
|
||||
return "Protocol";
|
||||
return GetClassName();
|
||||
}
|
||||
|
||||
} // namespace electron::api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue