chore: move gin::Handle to gin_helper (#48016)

chore: move gin::Handle to gin_helper (#47959)

* chore: move gin::Handle to gin_helper

* chore: fix lint

Co-authored-by: Robo <hop2deep@gmail.com>
This commit is contained in:
Calvin 2025-08-10 13:46:37 -06:00 committed by GitHub
commit e3f358a45a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
95 changed files with 555 additions and 419 deletions

View file

@ -11,7 +11,6 @@
#include "base/containers/contains.h"
#include "content/common/url_schemes.h"
#include "content/public/browser/child_process_security_policy.h"
#include "gin/handle.h"
#include "gin/object_template_builder.h"
#include "shell/browser/browser.h"
#include "shell/browser/javascript_environment.h"
@ -19,6 +18,7 @@
#include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/net_converter.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/handle.h"
#include "shell/common/gin_helper/object_template_builder.h"
#include "shell/common/gin_helper/promise.h"
#include "shell/common/node_includes.h"
@ -288,13 +288,14 @@ void Protocol::HandleOptionalCallback(gin::Arguments* args, Error error) {
}
// static
gin::Handle<Protocol> Protocol::Create(v8::Isolate* isolate,
ProtocolRegistry* protocol_registry) {
return gin::CreateHandle(isolate, new Protocol{protocol_registry});
gin_helper::Handle<Protocol> Protocol::Create(
v8::Isolate* isolate,
ProtocolRegistry* protocol_registry) {
return gin_helper::CreateHandle(isolate, new Protocol{protocol_registry});
}
// static
gin::Handle<Protocol> Protocol::New(gin_helper::ErrorThrower thrower) {
gin_helper::Handle<Protocol> Protocol::New(gin_helper::ErrorThrower thrower) {
thrower.ThrowError("Protocol cannot be created from JS");
return {};
}