chore: remove native_mate (Part 3) (#20131)
* use gin converter in atom_api_menu * please only put necessary includes in header Having include in header means they have dependency relationship, putting arbitrary includes really really really really really makes refacoring much harder. * remove some simple uses of callback_converter_deprecated.h * use gin callback converter in file_dialog code * use gin in ErrorThrower * use gin in atom_bundle_mover * fix mistake in node stream * deprecate native_mate version of event_emitter_caller * use gin in node_bindings * remove usages of native_mate event_emitter_caller.h except for EventEmitter * fix compilation on Windows * gin::Arguments behaves differently on GetNext * just use StringToV8
This commit is contained in:
parent
7be1905023
commit
2c23e44ed9
61 changed files with 515 additions and 323 deletions
|
@ -97,6 +97,7 @@ class Arguments {
|
|||
v8::Local<v8::Value> ThrowTypeError(const std::string& message) const;
|
||||
|
||||
v8::Isolate* isolate() const { return isolate_; }
|
||||
const v8::FunctionCallbackInfo<v8::Value>& info() const { return *info_; }
|
||||
|
||||
private:
|
||||
v8::Isolate* isolate_ = nullptr;
|
||||
|
|
|
@ -5,13 +5,11 @@
|
|||
#ifndef NATIVE_MATE_NATIVE_MATE_FUNCTION_TEMPLATE_H_
|
||||
#define NATIVE_MATE_NATIVE_MATE_FUNCTION_TEMPLATE_H_
|
||||
|
||||
#include "../shell/common/error_util.h"
|
||||
#include "../shell/common/gin_helper/destroyable.h"
|
||||
#include "../shell/common/gin_helper/error_thrower.h"
|
||||
#include "base/callback.h"
|
||||
#include "base/logging.h"
|
||||
#include "native_mate/arguments.h"
|
||||
#include "native_mate/wrappable_base.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
// =============================== NOTICE ===============================
|
||||
// Do not add code here, native_mate is being removed. Any new code
|
||||
|
@ -122,8 +120,8 @@ inline bool GetNextArgument(Arguments* args,
|
|||
inline bool GetNextArgument(Arguments* args,
|
||||
int create_flags,
|
||||
bool is_first,
|
||||
electron::util::ErrorThrower* result) {
|
||||
*result = electron::util::ErrorThrower(args->isolate());
|
||||
gin_helper::ErrorThrower* result) {
|
||||
*result = gin_helper::ErrorThrower(args->isolate());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue