mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -1301,7 +1301,7 @@ gin::Handle<Session> Session::New() {
|
||||
|
||||
void Session::FillObjectTemplate(v8::Isolate* isolate,
|
||||
v8::Local<v8::ObjectTemplate> templ) {
|
||||
gin::ObjectTemplateBuilder(isolate, "Session", templ)
|
||||
gin::ObjectTemplateBuilder(isolate, GetClassName(), templ)
|
||||
.SetMethod("resolveHost", &Session::ResolveHost)
|
||||
.SetMethod("resolveProxy", &Session::ResolveProxy)
|
||||
.SetMethod("getCacheSize", &Session::GetCacheSize)
|
||||
@@ -1379,7 +1379,7 @@ void Session::FillObjectTemplate(v8::Isolate* isolate,
|
||||
}
|
||||
|
||||
const char* Session::GetTypeName() {
|
||||
return "Session";
|
||||
return GetClassName();
|
||||
}
|
||||
|
||||
} // namespace electron::api
|
||||
|
||||
Reference in New Issue
Block a user