mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -11,10 +11,10 @@
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "gin/handle.h"
|
||||
#include "mojo/public/cpp/system/data_pipe.h"
|
||||
#include "mojo/public/cpp/system/simple_watcher.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "shell/common/gin_helper/handle.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
#include "shell/common/key_weak_map.h"
|
||||
#include "shell/common/node_util.h"
|
||||
@@ -171,21 +171,21 @@ const char* DataPipeHolder::GetTypeName() {
|
||||
}
|
||||
|
||||
// static
|
||||
gin::Handle<DataPipeHolder> DataPipeHolder::Create(
|
||||
gin_helper::Handle<DataPipeHolder> DataPipeHolder::Create(
|
||||
v8::Isolate* isolate,
|
||||
const network::DataElement& element) {
|
||||
auto handle = gin::CreateHandle(isolate, new DataPipeHolder(element));
|
||||
auto handle = gin_helper::CreateHandle(isolate, new DataPipeHolder(element));
|
||||
AllDataPipeHolders().Set(isolate, handle->id(),
|
||||
handle->GetWrapper(isolate).ToLocalChecked());
|
||||
return handle;
|
||||
}
|
||||
|
||||
// static
|
||||
gin::Handle<DataPipeHolder> DataPipeHolder::From(v8::Isolate* isolate,
|
||||
const std::string& id) {
|
||||
gin_helper::Handle<DataPipeHolder> DataPipeHolder::From(v8::Isolate* isolate,
|
||||
const std::string& id) {
|
||||
v8::MaybeLocal<v8::Object> object = AllDataPipeHolders().Get(isolate, id);
|
||||
if (!object.IsEmpty()) {
|
||||
gin::Handle<DataPipeHolder> handle;
|
||||
gin_helper::Handle<DataPipeHolder> handle;
|
||||
if (gin::ConvertFromV8(isolate, object.ToLocalChecked(), &handle))
|
||||
return handle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user