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:
Cheng Zhao 2019-09-06 14:52:54 +09:00 committed by GitHub
parent 7be1905023
commit 2c23e44ed9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 515 additions and 323 deletions

View file

@ -17,6 +17,7 @@ web_contents.patch
webview_cross_drag.patch
disable_user_gesture_requirement_for_beforeunload_dialogs.patch
gin_enable_disable_v8_platform.patch
gin_dictionary_default_constructor.patch
blink-worker-enable-csp-in-file-scheme.patch
disable-redraw-lock.patch
v8_context_snapshot_generator.patch

View file

@ -0,0 +1,37 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 4 Oct 2018 14:57:02 -0700
Subject: gin_dictionary_default_constructor.patch
Add default constructor for gin::Dictionary.
This is required for automatically converting arguments for functions that
take gin::Dictionary as parameter.
diff --git a/gin/dictionary.cc b/gin/dictionary.cc
index 95e00072700c..7643347890a5 100644
--- a/gin/dictionary.cc
+++ b/gin/dictionary.cc
@@ -6,6 +6,10 @@
namespace gin {
+Dictionary::Dictionary()
+ : isolate_(nullptr) {
+}
+
Dictionary::Dictionary(v8::Isolate* isolate)
: isolate_(isolate) {
}
diff --git a/gin/dictionary.h b/gin/dictionary.h
index 2645d328b4c1..43b227dd7e48 100644
--- a/gin/dictionary.h
+++ b/gin/dictionary.h
@@ -24,6 +24,7 @@ namespace gin {
//
class GIN_EXPORT Dictionary {
public:
+ Dictionary();
explicit Dictionary(v8::Isolate* isolate);
Dictionary(v8::Isolate* isolate, v8::Local<v8::Object> object);
Dictionary(const Dictionary& other);