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:
parent
89d5b6cd5b
commit
e3f358a45a
95 changed files with 555 additions and 419 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue