Do not rely on Constructor to call Init
This makes it deterministic when the JavaScript is initialized, which can make our logic more clear.
This commit is contained in:
parent
84bb82866d
commit
1505a46ed0
11 changed files with 44 additions and 44 deletions
|
@ -18,7 +18,8 @@ namespace atom {
|
|||
|
||||
namespace api {
|
||||
|
||||
MenuMac::MenuMac(v8::Isolate* isolate) : Menu(isolate) {
|
||||
MenuMac::MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
|
||||
: Menu(isolate, wrapper) {
|
||||
}
|
||||
|
||||
void MenuMac::PopupAt(Window* window, int x, int y, int positioning_item) {
|
||||
|
@ -94,8 +95,8 @@ void Menu::SendActionToFirstResponder(const std::string& action) {
|
|||
}
|
||||
|
||||
// static
|
||||
mate::WrappableBase* Menu::Create(v8::Isolate* isolate) {
|
||||
return new MenuMac(isolate);
|
||||
mate::WrappableBase* Menu::New(mate::Arguments* args) {
|
||||
return new MenuMac(args->isolate(), args->GetThis());
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue