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
parent 89d5b6cd5b
commit e3f358a45a
95 changed files with 555 additions and 419 deletions

View File

@@ -17,7 +17,6 @@
#include "content/public/browser/child_process_host.h"
#include "content/public/browser/service_process_host.h"
#include "content/public/common/result_codes.h"
#include "gin/handle.h"
#include "gin/object_template_builder.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "shell/browser/api/message_port.h"
@@ -28,6 +27,7 @@
#include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/error_thrower.h"
#include "shell/common/gin_helper/handle.h"
#include "shell/common/gin_helper/object_template_builder.h"
#include "shell/common/node_includes.h"
#include "shell/common/v8_util.h"
@@ -347,7 +347,7 @@ void UtilityProcessWrapper::PostMessage(gin::Arguments* args) {
}
v8::Local<v8::Value> transferables;
std::vector<gin::Handle<MessagePort>> wrapped_ports;
std::vector<gin_helper::Handle<MessagePort>> wrapped_ports;
if (args->GetNext(&transferables)) {
std::vector<v8::Local<v8::Value>> wrapped_port_values;
if (!gin::ConvertFromV8(args->isolate(), transferables,
@@ -435,7 +435,7 @@ raw_ptr<UtilityProcessWrapper> UtilityProcessWrapper::FromProcessId(
}
// static
gin::Handle<UtilityProcessWrapper> UtilityProcessWrapper::Create(
gin_helper::Handle<UtilityProcessWrapper> UtilityProcessWrapper::Create(
gin::Arguments* args) {
if (!Browser::Get()->is_ready()) {
gin_helper::ErrorThrower(args->isolate())
@@ -498,7 +498,7 @@ gin::Handle<UtilityProcessWrapper> UtilityProcessWrapper::Create(
opts.Get("allowLoadingUnsignedLibraries", &use_plugin_helper);
#endif
}
auto handle = gin::CreateHandle(
auto handle = gin_helper::CreateHandle(
args->isolate(), new UtilityProcessWrapper(
std::move(params), display_name, std::move(stdio),
env_map, current_working_directory,