chore: remove native_mate (Part 7) (#20561)
* refactor: use gin converters in api::Protocol * refactor: convert JS constructor impl to gin * refactor: use InitWithArgs helper * fix: gin_helper::Dictionary should behave the same with mate * fix cpplint warnings * refactor: no more need to patch gin/dictionary.h
This commit is contained in:
parent
6c6bff81ac
commit
1ecfcc8c70
43 changed files with 274 additions and 368 deletions
|
@ -108,11 +108,10 @@ TopLevelWindow::TopLevelWindow(v8::Isolate* isolate,
|
|||
#endif
|
||||
}
|
||||
|
||||
TopLevelWindow::TopLevelWindow(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> wrapper,
|
||||
TopLevelWindow::TopLevelWindow(gin::Arguments* args,
|
||||
const mate::Dictionary& options)
|
||||
: TopLevelWindow(isolate, options) {
|
||||
InitWith(isolate, wrapper);
|
||||
: TopLevelWindow(args->isolate(), options) {
|
||||
InitWithArgs(args);
|
||||
// Init window after everything has been setup.
|
||||
window()->InitFromOptions(options);
|
||||
}
|
||||
|
@ -1057,11 +1056,11 @@ void TopLevelWindow::RemoveFromParentChildWindows() {
|
|||
}
|
||||
|
||||
// static
|
||||
mate::WrappableBase* TopLevelWindow::New(mate::Arguments* args) {
|
||||
mate::WrappableBase* TopLevelWindow::New(gin::Arguments* args) {
|
||||
mate::Dictionary options = mate::Dictionary::CreateEmpty(args->isolate());
|
||||
args->GetNext(&options);
|
||||
|
||||
return new TopLevelWindow(args->isolate(), args->GetThis(), options);
|
||||
return new TopLevelWindow(args, options);
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue